Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.infodesire.infobit.dao
Class AclDAO

    java.lang.Object
      |
      +--com.infodesire.infobit.dao.BaseDAO
            |
            +--com.infodesire.infobit.dao.AclDAO

All Implemented Interfaces:
  AclManager

public final class AclDAO
extends BaseDAO
implements AclManager

DAO for ACL. encapsulates all aspects of ACL life and management. Currently ACL manipulation is allowed only for those holding "supersuser" permission according to respective security manager

Version:
  $Revision: 1.7 $
Author:
  konstantin

Constructor Summary
`AclDAO(SecurityProvider sec, SessionProvider sess)` construct dao for ACL

Method Summary
`Acl` | `createAcl(java.lang.String name)` create new ACL.
`Capability` | `createCapability(java.lang.String name)` create capability
`Acl` | `getAcl(java.lang.String name)` find acl by name
`Capability` | `getCapability(java.lang.String name)` find capability by name
`void` | `grantPermission(Acl acl, Capability capability, java.lang.String role)` grant permission for acl on given capability
`java.util.Collection` | `listAcl()` list all ACL entities known to system.
`java.util.Collection` | `listCapabilities()` list all capabilities entities known to system.
`void` | `removeAcl(Acl acl)` remove acl in question but only if no infobit uses it.
`void` | `removeCapability(Capability cap)` remove certain capability
`void` | `revokePermission(Acl acl, Capability capability, java.lang.String role)` DOCUMENT METHOD
`Acl` | `updateAcl(Acl acl)` update given ACL
`void` | `updateCapability(Capability cap)` update instance of capability

Methods inherited from class com.infodesire.infobit.dao.BaseDAO
`doLoad, getSecurityProvider, getSessionProvider, performQuery, performQuery, setSecurityProvider, setSessionProvider`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AclDAO

    public AclDAO(SecurityProvider sec,
                  SessionProvider sess)

  construct dao for ACL

Parameters:
  `sec` - Description of Parameter
  `sess` - Description of Parameter

Method Detail

### getAcl

    public Acl getAcl(java.lang.String name)
               throws InfobitException

  find acl by name

  Specified by:
    `getAcl` in interface `AclManager`
  Parameters:
    `name` - Description of Parameter
  Returns:
    The Acl value
  Throws:
    `InfobitException` - Description of Exception

### getCapability

    public Capability getCapability(java.lang.String name)
                             throws InfobitException

  find capability by name

  Specified by:
    `getCapability` in interface `AclManager`
  Parameters:
    `name` - Description of Parameter
  Returns:
    The Acl value
  Throws:
    `InfobitException` - Description of Exception

### createCapability

    public Capability createCapability(java.lang.String name)
                                throws InfobitException,
                                       InfobitSecurityException

  create capability

  Specified by:
    `createCapability` in interface `AclManager`
  Parameters:
    `name` - Description of Parameter
  Returns:
    Description of the Returned Value
  Throws:
    `InfobitException` - Description of Exception
    `InfobitSecurityException` - Description of Exception

### updateCapability

    public void updateCapability(Capability cap)
                          throws InfobitException,
                                 InfobitSecurityException

  update instance of capability

  Specified by:
    `updateCapability` in interface `AclManager`
  Parameters:
    `cap` - Description of Parameter
  Throws:
    `InfobitException` - Description of Exception
    `InfobitSecurityException` - Description of Exception

### removeCapability

    public void removeCapability(Capability cap)
                          throws InfobitException,
                                 InfobitSecurityException

  remove certain capability

  Specified by:
    `removeCapability` in interface `AclManager`
  Parameters:
    `cap` - Description of Parameter
  Throws:
    `InfobitException` - Description of Exception
    `InfobitSecurityException` - Description of Exception

### createAcl

    public Acl createAcl(java.lang.String name)
                  throws InfobitException,
                         InfobitSecurityException

  create new ACL. if caller has sufficient permissions

  Specified by:
    `createAcl` in interface `AclManager`
  Parameters:
    `name` - name for a new acl
  Returns:
    Description of the Returned Value
  Throws:
    `InfobitException` - will be thrown if something goes wrong. like duplicate name or insufficient permissions
    `InfobitSecurityException` - Description of Exception

### removeAcl

    public void removeAcl(Acl acl)
                   throws InfobitException,
                          InfobitIntegrityException,
                          InfobitSecurityException

  remove acl in question but only if no infobit uses it.

  Specified by:
    `removeAcl` in interface `AclManager`
  Parameters:
    `acl` - Description of Parameter
  Throws:
    `InfobitException` - will be thrown if acl still referenced by infobits.
    `InfobitSecurityException` - Description of Exception
    `InfobitIntegrityException` - Description of Exception

### updateAcl

    public Acl updateAcl(Acl acl)
                  throws InfobitException,
                         InfobitSecurityException

  update given ACL

  Specified by:
    `updateAcl` in interface `AclManager`
  Parameters:
    `acl` - Description of Parameter
  Returns:
    Description of the Returned Value
  Throws:
    `InfobitException` - Description of Exception
    `InfobitSecurityException` - Description of Exception

### listAcl

    public java.util.Collection listAcl()
                                 throws InfobitException

  list all ACL entities known to system.

  Specified by:
    `listAcl` in interface `AclManager`
  Returns:
    Description of the Returned Value
  Throws:
    `InfobitException` - Description of Exception

### listCapabilities

    public java.util.Collection listCapabilities()
                                          throws InfobitException

  list all capabilities entities known to system.

  Specified by:
    `listCapabilities` in interface `AclManager`
  Returns:
    Description of the Returned Value
  Throws:
    `InfobitException` - Description of Exception

### grantPermission

    public void grantPermission(Acl acl,
                                Capability capability,
                                java.lang.String role)
                         throws InfobitException,
                                InfobitSecurityException

  grant permission for acl on given capability

  Specified by:
    `grantPermission` in interface `AclManager`
  Parameters:
    `capability` - Description of Parameter
    `role` - Description of Parameter
    `acl` - Description of Parameter
  Throws:
    `InfobitException` - Description of Exception
    `InfobitSecurityException` - Description of Exception

### revokePermission

    public void revokePermission(Acl acl,
                                 Capability capability,
                                 java.lang.String role)
                          throws InfobitException,
                                 InfobitSecurityException

  DOCUMENT METHOD

  Specified by:
    `revokePermission` in interface `AclManager`
  Parameters:
    `capability` - Description of Parameter
    `role` - Description of Parameter
    `acl` - Description of Parameter
  Throws:
    `InfobitException` - Description of Exception
    `InfobitSecurityException` - Description of Exception

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003 Information Desire GmbH. All Rights Reserved.