Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.security.drm
Class SQLRegistry

    java.lang.Object
      org.deegree.security.drm.SQLRegistry

All Implemented Interfaces:
  SecurityRegistry

    public final class SQLRegistry

extends Object
implements SecurityRegistry

This is an implementation of a `Registry` using an SQL-Database (via JDBC) as backend.

Version:
  $Revision: 18195 $
Author:
  Markus Schneider

Constructor Summary
`SQLRegistry()`

Method Summary
`void` | `abortTransaction(SecurityTransaction transaction)` Signals the `SQLRegistry` that the current transaction shall be aborted.
`void` | `beginTransaction(SecurityTransaction transaction)` Signals the `SQLRegistry` that a new transaction begins.
`void` | `clean(SecurityTransaction transaction)` Deletes all data from the `Registry` and sets the default objects (SEC_ADMIN user, role and group) and standard rights and privileges.
`void` | `commitTransaction(SecurityTransaction transaction)` Signals the `SQLRegistry` that the current transaction ends, i.e. the changes made by the transaction are made persistent.
`void` | `deregisterGroup(SecurityTransaction transaction, Group group)` Removes an existing `Group` from the `Registry` (including its relations).
`void` | `deregisterPrivilege(SecurityTransaction transaction, Privilege privilege)` Removes an existing Privilege from the `Registry` (including its relations).
`void` | `deregisterRightType(SecurityTransaction transaction, RightType type)` Removes an existing `RightType` from the `Registry` (including its relations).
`void` | `deregisterRole(SecurityTransaction transaction, Role role)` Removes an existing `Role` from the `Registry` (including its relations).
`void` | `deregisterSecuredObject(SecurityTransaction transaction, SecuredObject object)` Removes an existing `SecuredObject` from the `Registry` (including its associations).
`void` | `deregisterService(SecurityTransaction transaction, Service service)`
`void` | `deregisterUser(SecurityTransaction transaction, User user)` Removes an existing `User`from the `Registry` (including its relations).``
`void` | `editService(SecurityTransaction transaction, Service service, String newTitle, String newAddress)`
`Group[]` | `getAllGroups(SecurityAccess securityAccess)` Retrieves all `Group` s from the `Registry`.
`Role[]` | `getAllRoles(SecurityAccess securityAccess)` Retrieves all `Role` s from the `Registry`, except those that are only used internally (these have namespaces that begin with $).
`SecuredObject[]` | `getAllSecuredObjects(SecurityAccess securityAccess, String type)` Retrieves all `SecuredObject` s with the given type from the `Registry`.
`LinkedList<Service>` | `getAllServices(SecurityAccess access)`
`User[]` | `getAllUsers(SecurityAccess securityAccess)` Retrieves all `User` s from the `Registry`.
`Group` | `getGroupById(SecurityAccess securityAccess, int id)` Retrieves a `Group` from the `Registry`.
`Group` | `getGroupByName(SecurityAccess securityAccess, String name)` Retrieves a `Group` from the `Registry`.
`Group[]` | `getGroupsForGroup(SecurityAccess securityAccess, Group group)` Retrieves all `Group` s from the `Registry` that the given `Group` is a DIRECT member (i.e. not via inheritance) of.
`Group[]` | `getGroupsForUser(SecurityAccess securityAccess, User user)` Retrieves all `Group` s from the `Registry` that the given `User` is a DIRECT (i.e. not via inheritance) member of.
`Group[]` | `getGroupsInGroup(SecurityAccess securityAccess, Group group)` Retrieves all `Groups` s from the `Registry` that are members of another `Group` DIRECTLY (i.e. not via inheritance).
`Group[]` | `getGroupsWithRole(SecurityAccess securityAccess, Role role)` Retrieves all `Group` s from the `Registry` that are associated with a given `Role` DIRECTLY (i.e. not via inheritance).
`Privilege` | `getPrivilegeByName(SecurityAccess securityAccess, String name)` Retrieves a `Privilege` from the `Registry`.
`Privilege[]` | `getPrivilegesForRole(SecurityAccess securityAccess, Role role)` Retrieves all `Privileges` s from the `Registry` that are associated DIRECTLY (i.e. not via group memberships) with a given `Role`.
`Right[]` | `getRights(SecurityAccess securityAccess, SecurableObject object, Role role)` Retrieves the `Rights` from the `Registry` that are associated with a given `Role` and a `SecurableObject`.
`RightType` | `getRightTypeByName(SecurityAccess securityAccess, String name)` Retrieves a `Right` from the `Registry`.
`Role` | `getRoleById(SecurityAccess securityAccess, int id)` Retrieves a `Role` from the `Registry`.
`Role` | `getRoleByName(SecurityAccess securityAccess, String name)` Retrieves a `Role` from the `Registry`.
`Role[]` | `getRolesByNS(SecurityAccess securityAccess, String ns)` Retrieves all `Roles` s from the `Registry` that have a certain namespace.
`Role[]` | `getRolesForGroup(SecurityAccess securityAccess, Group group)` Retrieves all `Role` s from the `Registry` that are associated with a given `Group` DIRECTLY (i.e. not via inheritance).
`Role[]` | `getRolesForUser(SecurityAccess securityAccess, User user)` Retrieves all `Role` s from the `Registry` that are associated with a given `User` DIRECTLY (i.e. not via group memberships).
`SecuredObject` | `getSecuredObjectById(SecurityAccess securityAccess, int id)` Retrieves a `SecuredObject` from the `Registry`.
`SecuredObject` | `getSecuredObjectByName(SecurityAccess securityAccess, String name, String type)` Retrieves a `SecuredObject` from the `Registry`.
`SecuredObject[]` | `getSecuredObjectsByNS(SecurityAccess securityAccess, String ns, String type)` Retrieves all `SecuredObject` s from the `Registry` that have a certain namespace.
`Service` | `getServiceByAddress(SecurityAccess access, String address)`
`User` | `getUserById(SecurityAccess securityAccess, int id)` Retrieves a `User` from the `Registry`.
`User` | `getUserByName(SecurityAccess securityAccess, String name)` Retrieves a `User` from the `Registry`.
`User[]` | `getUsersInGroup(SecurityAccess securityAccess, Group group)` Retrieves all `User` s from the `Registry` that belong to the given `Group` DIRECTLY (i.e. not via inheritance).
`User[]` | `getUsersWithRole(SecurityAccess securityAccess, Role role)` Retrieves all `Users` s from the `Registry` that are associated DIRECTLY (i.e. not via group memberships) with a given `Role`.
`void` | `initialize(Properties properties)` Initializes the `SQLRegistry` -instance according to the contents of the submitted `Properties`.
`Group` | `registerGroup(SecurityTransaction transaction, String name, String title)` Adds a new group account to the `Registry`.
`Privilege` | `registerPrivilege(SecurityTransaction transaction, String name)` Adds a new `Privilege` to the `Registry`.
`RightType` | `registerRightType(SecurityTransaction transaction, String name)` Adds a new `Right` to the `Registry`.
`Role` | `registerRole(SecurityTransaction transaction, String name)` Adds a new role to the `Registry`.
`SecuredObject` | `registerSecuredObject(SecurityTransaction transaction, String type, String name, String title)` Adds a new `SecuredObject` to the `Registry`.
`Service` | `registerService(SecurityTransaction transaction, String address, String title, List<StringPair> objects, String type)`
`User` | `registerUser(SecurityTransaction transaction, String name, String password, String lastName, String firstName, String emailAddress)` Adds a new user account to the `Registry`.
`void` | `renameObject(SecurityTransaction transaction, Service service, String oldName, String newName)`
`void` | `setGroupsForGroup(SecurityTransaction transaction, Group group, Group[] groups)` Sets the `Group` s that a given `Group` is member of DIRECTLY (i.e. not via inheritance).
`void` | `setGroupsForUser(SecurityTransaction transaction, User user, Group[] groups)` Sets the `Group` s that a given `User` is member of DIRECTLY (i.e. not via inheritance).
`void` | `setGroupsInGroup(SecurityTransaction transaction, Group group, Group[] groups)` Sets the `Groups` s that are members of a given `Group` DIRECTLY (i.e. not via inheritance).
`void` | `setGroupsWithRole(SecurityTransaction transaction, Role role, Group[] groups)` Sets the `Group` s that a given `Role` is associated to DIRECTLY (i.e. not via inheritance).
`void` | `setPrivilegesForRole(SecurityTransaction transaction, Role role, Privilege[] privileges)` Sets all `Privilege` s that are associated with a given `Role`.
`void` | `setRights(SecurityTransaction transaction, SecurableObject[] objects, Role role, Right right)` Sets one `Right` to be associated with a given `Role` and all given `SecurableObjects`.
`void` | `setRights(SecurityTransaction transaction, SecurableObject object, Role role, Right[] rights)` Sets the `Rights` to be associated with a given `Role` and `SecurableObject`.
`void` | `setRolesForGroup(SecurityTransaction transaction, Group group, Role[] roles)` Sets the `Role` s that a given `Group` is associated to directly (i.e. not via inheritance).
`void` | `setRolesForUser(SecurityTransaction transaction, User user, Role[] roles)` Sets the `Role` s that a given `User` is directly associated to (i.e. not via `Group` membership).
`void` | `setUsersInGroup(SecurityTransaction transaction, Group group, User[] users)` Sets the `User` s that are members of a given `Group` DIRECTLY (i.e. not via inheritance).
`void` | `setUsersWithRole(SecurityTransaction transaction, Role role, User[] users)` Sets the `User` s that a given `Role` is associated to DIRECTLY (i.e. not via `Group` membership).
`void` | `updateService(SecurityTransaction transaction, Service oldService, Service newService)`
`void` | `updateUser(SecurityTransaction transaction, User user)` Updates the metadata (name, email, etc.) of a `User` in the `Registry`.

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

Constructor Detail

### SQLRegistry

    public SQLRegistry()

Method Detail

### clean

    public void clean(SecurityTransaction transaction)
               throws GeneralSecurityException

  Description copied from interface: `SecurityRegistry`
  Deletes all data from the `Registry` and sets the default objects (SEC_ADMIN user, role and group) and standard rights and privileges.

  Specified by:
    `clean` in interface `SecurityRegistry`
  Throws:
    `GeneralSecurityException`

### registerUser

    public User registerUser(SecurityTransaction transaction,
                             String name,
                             String password,
                             String lastName,
                             String firstName,
                             String emailAddress)
                      throws GeneralSecurityException

  Adds a new user account to the `Registry`.

  Specified by:
    `registerUser` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `name` -
  Returns:
    the new user
  Throws:
    `GeneralSecurityException` - this is a `DuplicateException` if the group already existed

### deregisterUser

    public void deregisterUser(SecurityTransaction transaction,
                               User user)
                        throws GeneralSecurityException

  Removes an existing `User`from the `Registry` (including its relations).

  ``
  Specified by:
    `deregisterUser` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `user` -
  Throws:
    `GeneralSecurityException`

### updateUser

    public void updateUser(SecurityTransaction transaction,
                           User user)
                    throws GeneralSecurityException

  Updates the metadata (name, email, etc.) of a `User` in the `Registry`.

  Specified by:
    `updateUser` in interface `SecurityRegistry`
  Throws:
    `GeneralSecurityException` - this is a `DuplicateException` if a user with the new name already existed

### getUserByName

    public User getUserByName(SecurityAccess securityAccess,
                              String name)
                       throws GeneralSecurityException

  Retrieves a `User` from the `Registry`.

  Specified by:
    `getUserByName` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `name` -
  Returns:
    the user
  Throws:
    `GeneralSecurityException` - this is an `UnknownException` if the user is not known to the `Registry`

### getUserById

    public User getUserById(SecurityAccess securityAccess,
                            int id)
                     throws GeneralSecurityException

  Retrieves a `User` from the `Registry`.

  Specified by:
    `getUserById` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `id` -
  Returns:
    the user
  Throws:
    `GeneralSecurityException` - this is an `UnknownException` if the user is not known to the `Registry`

### getAllUsers

    public User[] getAllUsers(SecurityAccess securityAccess)
                       throws GeneralSecurityException

  Retrieves all `User` s from the `Registry`.

  Specified by:
    `getAllUsers` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
  Returns:
    the users
  Throws:
    `GeneralSecurityException`

### getUsersWithRole

    public User[] getUsersWithRole(SecurityAccess securityAccess,
                                   Role role)
                            throws GeneralSecurityException

  Retrieves all `Users` s from the `Registry` that are associated DIRECTLY (i.e. not via group memberships) with a given `Role`.

  Specified by:
    `getUsersWithRole` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `role` -
  Returns:
    the users
  Throws:
    `GeneralSecurityException`

### getUsersInGroup

    public User[] getUsersInGroup(SecurityAccess securityAccess,
                                  Group group)
                           throws GeneralSecurityException

  Retrieves all `User` s from the `Registry` that belong to the given `Group` DIRECTLY (i.e. not via inheritance).

  Specified by:
    `getUsersInGroup` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `group` -
  Returns:
    the users
  Throws:
    `GeneralSecurityException`

### registerGroup

    public Group registerGroup(SecurityTransaction transaction,
                               String name,
                               String title)
                        throws GeneralSecurityException

  Adds a new group account to the `Registry`.

  Specified by:
    `registerGroup` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `name` -
  Returns:
    the group
  Throws:
    `GeneralSecurityException` - this is a `DuplicateException` if the group already existed

### deregisterGroup

    public void deregisterGroup(SecurityTransaction transaction,
                                Group group)
                         throws GeneralSecurityException

  Removes an existing `Group` from the `Registry` (including its relations).

  Specified by:
    `deregisterGroup` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `group` -
  Throws:
    `GeneralSecurityException`

### getGroupByName

    public Group getGroupByName(SecurityAccess securityAccess,
                                String name)
                         throws GeneralSecurityException

  Retrieves a `Group` from the `Registry`.

  Specified by:
    `getGroupByName` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `name` -
  Returns:
    the group
  Throws:
    `GeneralSecurityException` - this is an `UnknownException` if the group is not known to the `Registry`

### getGroupById

    public Group getGroupById(SecurityAccess securityAccess,
                              int id)
                       throws GeneralSecurityException

  Retrieves a `Group` from the `Registry`.

  Specified by:
    `getGroupById` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `id` -
  Returns:
    the group
  Throws:
    `GeneralSecurityException` - this is an `UnknownException` if the group is not known to the `Registry`

### getAllGroups

    public Group[] getAllGroups(SecurityAccess securityAccess)
                         throws GeneralSecurityException

  Retrieves all `Group` s from the `Registry`.

  Specified by:
    `getAllGroups` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
  Returns:
    the groups
  Throws:
    `GeneralSecurityException`

### registerRole

    public Role registerRole(SecurityTransaction transaction,
                             String name)
                      throws GeneralSecurityException

  Adds a new role to the `Registry`.

  Specified by:
    `registerRole` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `name` -
  Returns:
    the role
  Throws:
    `GeneralSecurityException` - this is a `DuplicateException` if the role already existed

### deregisterRole

    public void deregisterRole(SecurityTransaction transaction,
                               Role role)
                        throws GeneralSecurityException

  Removes an existing `Role` from the `Registry` (including its relations).

  Specified by:
    `deregisterRole` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `role` -
  Throws:
    `GeneralSecurityException`

### getRoleByName

    public Role getRoleByName(SecurityAccess securityAccess,
                              String name)
                       throws GeneralSecurityException

  Retrieves a `Role` from the `Registry`.

  Specified by:
    `getRoleByName` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `name` -
  Returns:
    the role
  Throws:
    `GeneralSecurityException` - this is an `UnknownException` if the role is not known to the `Registry`

### getRolesByNS

    public Role[] getRolesByNS(SecurityAccess securityAccess,
                               String ns)
                        throws GeneralSecurityException

  Retrieves all `Roles` s from the `Registry` that have a certain namespace.

  Specified by:
    `getRolesByNS` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `ns` - null for default namespace
  Returns:
    the roles
  Throws:
    `GeneralSecurityException`

### getRoleById

    public Role getRoleById(SecurityAccess securityAccess,
                            int id)
                     throws GeneralSecurityException

  Retrieves a `Role` from the `Registry`.

  Specified by:
    `getRoleById` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `id` -
  Returns:
    the role
  Throws:
    `GeneralSecurityException` - this is an `UnknownException` if the role is not known to the `Registry`

### getAllRoles

    public Role[] getAllRoles(SecurityAccess securityAccess)
                       throws GeneralSecurityException

  Retrieves all `Role` s from the `Registry`, except those that are only used internally (these have namespaces that begin with $).

  Specified by:
    `getAllRoles` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
  Returns:
    the roles
  Throws:
    `GeneralSecurityException`

### registerSecuredObject

    public SecuredObject registerSecuredObject(SecurityTransaction transaction,
                                               String type,
                                               String name,
                                               String title)
                                        throws GeneralSecurityException

  Adds a new `SecuredObject` to the `Registry`.

  Specified by:
    `registerSecuredObject` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `type` -
    `name` -
    `title` -
  Returns:
    the new object
  Throws:
    `GeneralSecurityException` - this is a `DuplicateException` if the object already existed

### deregisterSecuredObject

    public void deregisterSecuredObject(SecurityTransaction transaction,
                                        SecuredObject object)
                                 throws GeneralSecurityException

  Removes an existing `SecuredObject` from the `Registry` (including its associations).

  Specified by:
    `deregisterSecuredObject` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `object` -
  Throws:
    `GeneralSecurityException`

### getSecuredObjectByName

    public SecuredObject getSecuredObjectByName(SecurityAccess securityAccess,
                                                String name,
                                                String type)
                                         throws GeneralSecurityException

  Retrieves a `SecuredObject` from the `Registry`.

  Specified by:
    `getSecuredObjectByName` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `name` -
  Returns:
    the object
  Throws:
    `GeneralSecurityException` - this is an `UnknownException` if the object is not known to the `Registry`

### getSecuredObjectById

    public SecuredObject getSecuredObjectById(SecurityAccess securityAccess,
                                              int id)
                                       throws GeneralSecurityException

  Retrieves a `SecuredObject` from the `Registry`.

  Specified by:
    `getSecuredObjectById` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `id` -
  Returns:
    the object
  Throws:
    `GeneralSecurityException` - this is an `UnknownException` if the object is not known to the `Registry`

### getSecuredObjectsByNS

    public SecuredObject[] getSecuredObjectsByNS(SecurityAccess securityAccess,
                                                 String ns,
                                                 String type)
                                          throws GeneralSecurityException

  Retrieves all `SecuredObject` s from the `Registry` that have a certain namespace.

  Specified by:
    `getSecuredObjectsByNS` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `ns` - null for default namespace
    `type` -
  Returns:
    the objects
  Throws:
    `GeneralSecurityException`

### getAllSecuredObjects

    public SecuredObject[] getAllSecuredObjects(SecurityAccess securityAccess,
                                                String type)
                                         throws GeneralSecurityException

  Retrieves all `SecuredObject` s with the given type from the `Registry`.

  Specified by:
    `getAllSecuredObjects` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `type` -
  Returns:
    the objects
  Throws:
    `GeneralSecurityException`

### registerPrivilege

    public Privilege registerPrivilege(SecurityTransaction transaction,
                                       String name)
                                throws GeneralSecurityException

  Adds a new `Privilege` to the `Registry`.

  Specified by:
    `registerPrivilege` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `name` -
  Returns:
    the privilege
  Throws:
    `GeneralSecurityException` - this is a `DuplicateException` if the `Privilege` already existed

### deregisterPrivilege

    public void deregisterPrivilege(SecurityTransaction transaction,
                                    Privilege privilege)
                             throws GeneralSecurityException

  Removes an existing Privilege from the `Registry` (including its relations).

  Specified by:
    `deregisterPrivilege` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `privilege` -
  Throws:
    `GeneralSecurityException`

### getPrivilegeByName

    public Privilege getPrivilegeByName(SecurityAccess securityAccess,
                                        String name)
                                 throws GeneralSecurityException

  Retrieves a `Privilege` from the `Registry`.

  Specified by:
    `getPrivilegeByName` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `name` -
  Returns:
    the privilege
  Throws:
    `GeneralSecurityException` - this is an `UnknownException` if the privilege is not known to the `Registry`

### getPrivilegesForRole

    public Privilege[] getPrivilegesForRole(SecurityAccess securityAccess,
                                            Role role)
                                     throws GeneralSecurityException

  Retrieves all `Privileges` s from the `Registry` that are associated DIRECTLY (i.e. not via group memberships) with a given `Role`.

  Specified by:
    `getPrivilegesForRole` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `role` -
  Returns:
    the privileges
  Throws:
    `GeneralSecurityException`

### setPrivilegesForRole

    public void setPrivilegesForRole(SecurityTransaction transaction,
                                     Role role,
                                     Privilege[] privileges)
                              throws GeneralSecurityException

  Sets all `Privilege` s that are associated with a given `Role`.

  Specified by:
    `setPrivilegesForRole` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `role` -
    `privileges` -
  Throws:
    `GeneralSecurityException`

### registerRightType

    public RightType registerRightType(SecurityTransaction transaction,
                                       String name)
                                throws GeneralSecurityException

  Adds a new `Right` to the `Registry`.

  Specified by:
    `registerRightType` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `name` -
  Returns:
    the right type
  Throws:
    `GeneralSecurityException` - this is a `DuplicateException` if the `Right` already existed

### deregisterRightType

    public void deregisterRightType(SecurityTransaction transaction,
                                    RightType type)
                             throws GeneralSecurityException

  Removes an existing `RightType` from the `Registry` (including its relations).

  Specified by:
    `deregisterRightType` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `type` -
  Throws:
    `GeneralSecurityException`

### getRightTypeByName

    public RightType getRightTypeByName(SecurityAccess securityAccess,
                                        String name)
                                 throws GeneralSecurityException

  Retrieves a `Right` from the `Registry`.

  Specified by:
    `getRightTypeByName` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `name` -
  Returns:
    the right type
  Throws:
    `GeneralSecurityException` - this is an `UnknownException` if the `Right` is not known to the `Registry`

### getRights

    public Right[] getRights(SecurityAccess securityAccess,
                             SecurableObject object,
                             Role role)
                      throws GeneralSecurityException

  Retrieves the `Rights` from the `Registry` that are associated with a given `Role` and a `SecurableObject`.

  Specified by:
    `getRights` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `object` -
    `role` -
  Returns:
    the rights
  Throws:
    `GeneralSecurityException`

### setRights

    public void setRights(SecurityTransaction transaction,
                          SecurableObject object,
                          Role role,
                          Right[] rights)
                   throws GeneralSecurityException

  Sets the `Rights` to be associated with a given `Role` and `SecurableObject`.

  Specified by:
    `setRights` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `object` -
    `role` -
    `rights` -
  Throws:
    `GeneralSecurityException`

### setRights

    public void setRights(SecurityTransaction transaction,
                          SecurableObject[] objects,
                          Role role,
                          Right right)
                   throws GeneralSecurityException

  Sets one `Right` to be associated with a given `Role` and all given `SecurableObjects`.

  Specified by:
    `setRights` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `objects` -
    `role` -
    `right` -
  Throws:
    `GeneralSecurityException`

### getGroupsForUser

    public Group[] getGroupsForUser(SecurityAccess securityAccess,
                                    User user)
                             throws GeneralSecurityException

  Retrieves all `Group` s from the `Registry` that the given `User` is a DIRECT (i.e. not via inheritance) member of.

  Specified by:
    `getGroupsForUser` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `user` -
  Returns:
    the groups
  Throws:
    `GeneralSecurityException`

### getGroupsInGroup

    public Group[] getGroupsInGroup(SecurityAccess securityAccess,
                                    Group group)
                             throws GeneralSecurityException

  Retrieves all `Groups` s from the `Registry` that are members of another `Group` DIRECTLY (i.e. not via inheritance).

  Specified by:
    `getGroupsInGroup` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `group` -
  Returns:
    the groups
  Throws:
    `GeneralSecurityException`

### getGroupsForGroup

    public Group[] getGroupsForGroup(SecurityAccess securityAccess,
                                     Group group)
                              throws GeneralSecurityException

  Retrieves all `Group` s from the `Registry` that the given `Group` is a DIRECT member (i.e. not via inheritance) of.

  Specified by:
    `getGroupsForGroup` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `group` -
  Returns:
    the groups
  Throws:
    `GeneralSecurityException`

### getGroupsWithRole

    public Group[] getGroupsWithRole(SecurityAccess securityAccess,
                                     Role role)
                              throws GeneralSecurityException

  Retrieves all `Group` s from the `Registry` that are associated with a given `Role` DIRECTLY (i.e. not via inheritance).

  Specified by:
    `getGroupsWithRole` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `role` -
  Returns:
    the groups
  Throws:
    `GeneralSecurityException`

### getRolesForUser

    public Role[] getRolesForUser(SecurityAccess securityAccess,
                                  User user)
                           throws GeneralSecurityException

  Retrieves all `Role` s from the `Registry` that are associated with a given `User` DIRECTLY (i.e. not via group memberships).

  Specified by:
    `getRolesForUser` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `user` -
  Returns:
    the roles
  Throws:
    `GeneralSecurityException`

### getRolesForGroup

    public Role[] getRolesForGroup(SecurityAccess securityAccess,
                                   Group group)
                            throws GeneralSecurityException

  Retrieves all `Role` s from the `Registry` that are associated with a given `Group` DIRECTLY (i.e. not via inheritance).

  Specified by:
    `getRolesForGroup` in interface `SecurityRegistry`
  Parameters:
    `securityAccess` -
    `group` -
  Returns:
    the roles
  Throws:
    `GeneralSecurityException`

### setGroupsForUser

    public void setGroupsForUser(SecurityTransaction transaction,
                                 User user,
                                 Group[] groups)
                          throws GeneralSecurityException

  Sets the `Group` s that a given `User` is member of DIRECTLY (i.e. not via inheritance).

  Specified by:
    `setGroupsForUser` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `user` -
    `groups` -
  Throws:
    `GeneralSecurityException`

### setGroupsForGroup

    public void setGroupsForGroup(SecurityTransaction transaction,
                                  Group group,
                                  Group[] groups)
                           throws GeneralSecurityException

  Sets the `Group` s that a given `Group` is member of DIRECTLY (i.e. not via inheritance).

  Specified by:
    `setGroupsForGroup` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `group` -
    `groups` -
  Throws:
    `GeneralSecurityException`

### setGroupsWithRole

    public void setGroupsWithRole(SecurityTransaction transaction,
                                  Role role,
                                  Group[] groups)
                           throws GeneralSecurityException

  Sets the `Group` s that a given `Role` is associated to DIRECTLY (i.e. not via inheritance).

  Specified by:
    `setGroupsWithRole` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `role` -
    `groups` -
  Throws:
    `GeneralSecurityException`

### setUsersWithRole

    public void setUsersWithRole(SecurityTransaction transaction,
                                 Role role,
                                 User[] users)
                          throws GeneralSecurityException

  Sets the `User` s that a given `Role` is associated to DIRECTLY (i.e. not via `Group` membership).

  Specified by:
    `setUsersWithRole` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `role` -
    `users` -
  Throws:
    `GeneralSecurityException`

### setUsersInGroup

    public void setUsersInGroup(SecurityTransaction transaction,
                                Group group,
                                User[] users)
                         throws GeneralSecurityException

  Sets the `User` s that are members of a given `Group` DIRECTLY (i.e. not via inheritance).

  Specified by:
    `setUsersInGroup` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `group` -
    `users` -
  Throws:
    `GeneralSecurityException`

### setGroupsInGroup

    public void setGroupsInGroup(SecurityTransaction transaction,
                                 Group group,
                                 Group[] groups)
                          throws GeneralSecurityException

  Sets the `Groups` s that are members of a given `Group` DIRECTLY (i.e. not via inheritance).

  Specified by:
    `setGroupsInGroup` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `group` -
    `groups` -
  Throws:
    `GeneralSecurityException`

### setRolesForUser

    public void setRolesForUser(SecurityTransaction transaction,
                                User user,
                                Role[] roles)
                         throws GeneralSecurityException

  Sets the `Role` s that a given `User` is directly associated to (i.e. not via `Group` membership).

  Specified by:
    `setRolesForUser` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `user` -
    `roles` -
  Throws:
    `GeneralSecurityException`

### setRolesForGroup

    public void setRolesForGroup(SecurityTransaction transaction,
                                 Group group,
                                 Role[] roles)
                          throws GeneralSecurityException

  Sets the `Role` s that a given `Group` is associated to directly (i.e. not via inheritance).

  Specified by:
    `setRolesForGroup` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `group` -
    `roles` -
  Throws:
    `GeneralSecurityException`

### initialize

    public void initialize(Properties properties)
                    throws GeneralSecurityException

  Initializes the `SQLRegistry` -instance according to the contents of the submitted `Properties`.

  Specified by:
    `initialize` in interface `SecurityRegistry`
  Parameters:
    `properties` -
  Throws:
    `GeneralSecurityException`

### beginTransaction

    public void beginTransaction(SecurityTransaction transaction)
                          throws GeneralSecurityException

  Signals the `SQLRegistry` that a new transaction begins. Only one transaction can be active at a time.

  Specified by:
    `beginTransaction` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
  Throws:
    `GeneralSecurityException`

### commitTransaction

    public void commitTransaction(SecurityTransaction transaction)
                           throws GeneralSecurityException

  Signals the `SQLRegistry` that the current transaction ends, i.e. the changes made by the transaction are made persistent.

  Specified by:
    `commitTransaction` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
  Throws:
    `GeneralSecurityException`

### abortTransaction

    public void abortTransaction(SecurityTransaction transaction)
                          throws GeneralSecurityException

  Signals the `SQLRegistry` that the current transaction shall be aborted. Changes made during the transaction are undone.

  Specified by:
    `abortTransaction` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
  Throws:
    `GeneralSecurityException`

### getServiceByAddress

    public Service getServiceByAddress(SecurityAccess access,
                                       String address)
                                throws GeneralSecurityException

  Specified by:
    `getServiceByAddress` in interface `SecurityRegistry`
  Parameters:
    `access` -
    `address` -
  Returns:
    the service from the db
  Throws:
    `GeneralSecurityException`

### registerService

    public Service registerService(SecurityTransaction transaction,
                                   String address,
                                   String title,
                                   List<StringPair> objects,
                                   String type)
                            throws GeneralSecurityException

  Specified by:
    `registerService` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `address` -
    `title` -
    `objects` -
    `type` -
  Returns:
    the new service object
  Throws:
    `GeneralSecurityException`

### deregisterService

    public void deregisterService(SecurityTransaction transaction,
                                  Service service)
                           throws GeneralSecurityException

  Specified by:
    `deregisterService` in interface `SecurityRegistry`
  Parameters:
    `transaction` -
    `service` -
  Throws:
    `GeneralSecurityException`

### getAllServices

    public LinkedList<Service> getAllServices(SecurityAccess access)
                                       throws GeneralSecurityException

  Specified by:
    `getAllServices` in interface `SecurityRegistry`
  Returns:
    all services
  Throws:
    `GeneralSecurityException`

### updateService

    public void updateService(SecurityTransaction transaction,
                              Service oldService,
                              Service newService)
                       throws GeneralSecurityException

  Specified by:
    `updateService` in interface `SecurityRegistry`
  Throws:
    `GeneralSecurityException`

### renameObject

    public void renameObject(SecurityTransaction transaction,
                             Service service,
                             String oldName,
                             String newName)
                      throws GeneralSecurityException

  Specified by:
    `renameObject` in interface `SecurityRegistry`
  Throws:
    `GeneralSecurityException`

### editService

    public void editService(SecurityTransaction transaction,
                            Service service,
                            String newTitle,
                            String newAddress)
                     throws GeneralSecurityException

  Specified by:
    `editService` in interface `SecurityRegistry`
  Throws:
    `GeneralSecurityException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org