|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SecurityRegistry
This is an interface for datastores that are able to stores the following object types and their relations:
User
Group
Role
SecurableObject
Right / RightType
Privilege
Method Summary | |
---|---|
void |
abortTransaction(SecurityTransaction transaction)
Signals the Registry that the transaction shall be aborted. |
void |
beginTransaction(SecurityTransaction transaction)
Signals the Registry that a new transaction starts. |
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 Registry that the current transaction ends. |
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 associated rights). |
void |
deregisterService(SecurityTransaction transaction,
Service service)
|
void |
deregisterUser(SecurityTransaction transaction,
User user)
Removes an existing User |
void |
editService(SecurityTransaction securityTransaction,
Service service,
java.lang.String newTitle,
java.lang.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 end with a $ symbol); |
SecuredObject[] |
getAllSecuredObjects(SecurityAccess securityAccess,
java.lang.String type)
Retrieves all SecuredObject s from the Registry . |
java.util.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,
java.lang.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 belongs to. |
Group[] |
getGroupsForUser(SecurityAccess securityAccess,
User user)
Retrieves all Group s from the Registry that the given User belongs to. |
Group[] |
getGroupsInGroup(SecurityAccess securityAccess,
Group group)
Retrieves all Group s from the Registry belong to the given Group . |
Group[] |
getGroupsWithRole(SecurityAccess securityAccess,
Role role)
Retrieves all Group s from the Registry that are associated with a given
Role . |
Privilege |
getPrivilegeByName(SecurityAccess securityAccess,
java.lang.String name)
Retrieves a Privilege from the Registry . |
Privilege[] |
getPrivilegesForRole(SecurityAccess securityAccess,
Role role)
Retrieves all Privileges s from the Registry that are associated 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,
java.lang.String name)
Retrieves a RightType from the Registry . |
Role |
getRoleById(SecurityAccess securityAccess,
int id)
Retrieves a Role from the Registry . |
Role |
getRoleByName(SecurityAccess securityAccess,
java.lang.String name)
Retrieves a Role from the Registry . |
Role[] |
getRolesByNS(SecurityAccess securityAccess,
java.lang.String ns)
Retrieves all Role 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 group memberships). |
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). |
java.util.LinkedList<Service> |
getRolesServices(SecurityAccess access,
Role role)
|
SecuredObject |
getSecuredObjectById(SecurityAccess securityAccess,
int id)
Retrieves a SecuredObject from the Registry . |
SecuredObject |
getSecuredObjectByName(SecurityAccess securityAccess,
java.lang.String name,
java.lang.String type)
Retrieves a SecuredObject from the Registry . |
SecuredObject[] |
getSecuredObjectsByNS(SecurityAccess securityAccess,
java.lang.String ns,
java.lang.String type)
Retrieves all SecuredObject s from the Registry that have a certain namespace. |
Service |
getServiceByAddress(SecurityAccess access,
java.lang.String address)
|
User |
getUserById(SecurityAccess securityAccess,
int id)
Retrieves a User from the Registry . |
User |
getUserByName(SecurityAccess securityAccess,
java.lang.String name)
Retrieves a User from the Registry . |
User[] |
getUsersInGroup(SecurityAccess securityAccess,
Group group)
Retrieves all User s from the Registry belong to the given Group . |
User[] |
getUsersWithRole(SecurityAccess securityAccess,
Role role)
Retrieves all Users s from the Registry that are associated DIRECTLY (SecurityAccess
securityAccess, i.e. not via group memberships) with a given Role . |
void |
initialize(java.util.Properties properties)
Initializes the Registry -instance according to the contents of the submitted
Properties . |
Group |
registerGroup(SecurityTransaction transaction,
java.lang.String name,
java.lang.String title)
Adds a new Group-account to the Registry . |
Privilege |
registerPrivilege(SecurityTransaction transaction,
java.lang.String name)
Adds a new Privilege to the Registry . |
RightType |
registerRightType(SecurityTransaction transaction,
java.lang.String name)
Adds a new RightType to the Registry . |
Role |
registerRole(SecurityTransaction transaction,
java.lang.String name)
Adds a new role to the Registry . |
SecuredObject |
registerSecuredObject(SecurityTransaction transaction,
java.lang.String type,
java.lang.String name,
java.lang.String title)
Adds a new SecuredObject to the Registry . |
Service |
registerService(SecurityTransaction transaction,
java.lang.String address,
java.lang.String title,
java.util.List<StringPair> objects,
java.lang.String type)
|
User |
registerUser(SecurityTransaction transaction,
java.lang.String name,
java.lang.String password,
java.lang.String lastName,
java.lang.String firstName,
java.lang.String mailAddress)
Adds a new User-account to the Registry . |
void |
renameObject(SecurityTransaction securityTransaction,
Service service,
java.lang.String oldName,
java.lang.String newName)
|
void |
setGroupsForGroup(SecurityTransaction transaction,
Group group,
Group[] groups)
Sets the Groups s that a given Group is member of DIRECTLY (i.e. not via group
membership). |
void |
setGroupsForUser(SecurityTransaction transaction,
User user,
Group[] groups)
Sets the Group s that a given User is a DIRECT member of. |
void |
setGroupsInGroup(SecurityTransaction transaction,
Group group,
Group[] groups)
Sets the Groups s that are members of a given Group . |
void |
setGroupsWithRole(SecurityTransaction transaction,
Role role,
Group[] groups)
Sets the Group s that a given Role is associated to. |
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. |
void |
setRolesForUser(SecurityTransaction transaction,
User user,
Role[] roles)
Sets the Role s that a given User is directly associated to. |
void |
setServicesRights(SecurityTransaction transaction,
java.util.Collection<java.lang.Integer> services,
Role role)
Sets the services an user has access to. |
void |
setUsersInGroup(SecurityTransaction transaction,
Group group,
User[] users)
Sets the User s that are members of a given Group . |
void |
setUsersWithRole(SecurityTransaction transaction,
Role role,
User[] users)
Sets the User s that a given Role is associated to. |
void |
updateService(SecurityTransaction securityTransaction,
Service oldService,
Service newService)
|
void |
updateUser(SecurityTransaction transaction,
User user)
Updates the metadata (name, email, etc.) of a User in the Registry . |
Method Detail |
---|
void initialize(java.util.Properties properties) throws GeneralSecurityException
Registry
-instance according to the contents of the submitted
Properties
.
The supported keys and values depend on the concrete implementation.
properties
-
GeneralSecurityException
void beginTransaction(SecurityTransaction transaction) throws GeneralSecurityException
Registry
that a new transaction starts.
Only one transaction can be active at a time.
transaction
-
GeneralSecurityException
void commitTransaction(SecurityTransaction transaction) throws GeneralSecurityException
Registry
that the current transaction ends. Changes made during the transaction are now
made persistent.
transaction
-
GeneralSecurityException
void abortTransaction(SecurityTransaction transaction) throws GeneralSecurityException
Registry
that the transaction shall be aborted. Changes made by the transaction are
undone.
transaction
-
GeneralSecurityException
void clean(SecurityTransaction transaction) throws GeneralSecurityException
Registry
and sets the default objects (SEC_ADMIN user, role and group) and
standard rights and privileges.
transaction
-
GeneralSecurityException
User registerUser(SecurityTransaction transaction, java.lang.String name, java.lang.String password, java.lang.String lastName, java.lang.String firstName, java.lang.String mailAddress) throws GeneralSecurityException
Registry
.
transaction
- name
- password
- lastName
- firstName
- mailAddress
-
GeneralSecurityException
- this is a DuplicateException
if the group already existedvoid deregisterUser(SecurityTransaction transaction, User user) throws GeneralSecurityException
User from the Registry
.
- Parameters:
transaction
- user
-
- Throws:
GeneralSecurityException
void updateUser(SecurityTransaction transaction, User user) throws GeneralSecurityException
User
in the Registry
.
transaction
- user
-
GeneralSecurityException
- this is a DuplicateException
if a user with the new name already existedUser getUserByName(SecurityAccess securityAccess, java.lang.String name) throws GeneralSecurityException
User
from the Registry
.
securityAccess
- name
-
GeneralSecurityException
- this is an UnknownException
if the user is not known to the Registry
User getUserById(SecurityAccess securityAccess, int id) throws GeneralSecurityException
User
from the Registry
.
securityAccess
- id
-
GeneralSecurityException
- this is an UnknownException
if the user is not known to the Registry
User[] getAllUsers(SecurityAccess securityAccess) throws GeneralSecurityException
User
s from the Registry
.
securityAccess
-
GeneralSecurityException
User[] getUsersWithRole(SecurityAccess securityAccess, Role role) throws GeneralSecurityException
Users
s from the Registry
that are associated DIRECTLY (SecurityAccess
securityAccess, i.e. not via group memberships) with a given Role
.
securityAccess
- role
-
GeneralSecurityException
User[] getUsersInGroup(SecurityAccess securityAccess, Group group) throws GeneralSecurityException
User
s from the Registry
belong to the given Group
.
securityAccess
- group
-
GeneralSecurityException
void setUsersInGroup(SecurityTransaction transaction, Group group, User[] users) throws GeneralSecurityException
User
s that are members of a given Group
.
transaction
- group
- users
-
GeneralSecurityException
void setUsersWithRole(SecurityTransaction transaction, Role role, User[] users) throws GeneralSecurityException
User
s that a given Role
is associated to.
transaction
- role
- users
-
GeneralSecurityException
Group registerGroup(SecurityTransaction transaction, java.lang.String name, java.lang.String title) throws GeneralSecurityException
Registry
.
transaction
- name
- title
-
GeneralSecurityException
- this is a DuplicateException
if the group already existedvoid deregisterGroup(SecurityTransaction transaction, Group group) throws GeneralSecurityException
Group
from the Registry
(including its relations).
transaction
- group
-
GeneralSecurityException
Group getGroupByName(SecurityAccess securityAccess, java.lang.String name) throws GeneralSecurityException
Group
from the Registry
.
securityAccess
- name
-
GeneralSecurityException
- this is an UnknownException
if the group is not known to the Registry
Group getGroupById(SecurityAccess securityAccess, int id) throws GeneralSecurityException
Group
from the Registry
.
securityAccess
- id
-
GeneralSecurityException
- this is an UnknownException
if the group is not known to the Registry
Group[] getAllGroups(SecurityAccess securityAccess) throws GeneralSecurityException
Group
s from the Registry
.
securityAccess
-
GeneralSecurityException
Group[] getGroupsForUser(SecurityAccess securityAccess, User user) throws GeneralSecurityException
Group
s from the Registry
that the given User
belongs to.
securityAccess
- user
-
GeneralSecurityException
Group[] getGroupsForGroup(SecurityAccess securityAccess, Group group) throws GeneralSecurityException
Group
s from the Registry
that the given Group
belongs to.
securityAccess
- group
-
GeneralSecurityException
Group[] getGroupsInGroup(SecurityAccess securityAccess, Group group) throws GeneralSecurityException
Group
s from the Registry
belong to the given Group
.
securityAccess
- group
-
GeneralSecurityException
Group[] getGroupsWithRole(SecurityAccess securityAccess, Role role) throws GeneralSecurityException
Group
s from the Registry
that are associated with a given
Role
.
securityAccess
- role
-
GeneralSecurityException
void setGroupsForUser(SecurityTransaction transaction, User user, Group[] groups) throws GeneralSecurityException
Group
s that a given User
is a DIRECT member of.
transaction
- user
- groups
-
GeneralSecurityException
void setGroupsInGroup(SecurityTransaction transaction, Group group, Group[] groups) throws GeneralSecurityException
Groups
s that are members of a given Group
.
transaction
- group
- groups
-
GeneralSecurityException
void setGroupsWithRole(SecurityTransaction transaction, Role role, Group[] groups) throws GeneralSecurityException
Group
s that a given Role
is associated to.
transaction
- role
- groups
-
GeneralSecurityException
void setGroupsForGroup(SecurityTransaction transaction, Group group, Group[] groups) throws GeneralSecurityException
Groups
s that a given Group
is member of DIRECTLY (i.e. not via group
membership).
transaction
- group
- groups
-
GeneralSecurityException
Role registerRole(SecurityTransaction transaction, java.lang.String name) throws GeneralSecurityException
Registry
.
transaction
- name
-
GeneralSecurityException
- this is a DuplicateException
if the role already existedvoid deregisterRole(SecurityTransaction transaction, Role role) throws GeneralSecurityException
Role
from the Registry
(including its relations).
transaction
- role
-
GeneralSecurityException
Role getRoleByName(SecurityAccess securityAccess, java.lang.String name) throws GeneralSecurityException
Role
from the Registry
.
securityAccess
- name
-
GeneralSecurityException
- this is an UnknownException
if the role is not known to the Registry
Role[] getRolesByNS(SecurityAccess securityAccess, java.lang.String ns) throws GeneralSecurityException
Role
s from the Registry
that have a certain namespace.
securityAccess
- ns
-
GeneralSecurityException
Role getRoleById(SecurityAccess securityAccess, int id) throws GeneralSecurityException
Role
from the Registry
.
securityAccess
- id
-
GeneralSecurityException
- this is an UnknownException
if the role is not known to the Registry
Role[] getAllRoles(SecurityAccess securityAccess) throws GeneralSecurityException
Role
s from the Registry
, except those that are only used internally
(these end with a $ symbol);
securityAccess
-
GeneralSecurityException
Role[] getRolesForUser(SecurityAccess securityAccess, User user) throws GeneralSecurityException
Role
s from the Registry
that are associated with a given
User
DIRECTLY (i.e. not via group memberships).
securityAccess
- user
-
GeneralSecurityException
Role[] getRolesForGroup(SecurityAccess securityAccess, Group group) throws GeneralSecurityException
Role
s from the Registry
that are associated with a given
Group
DIRECTLY (i.e. not via group memberships).
securityAccess
- group
-
GeneralSecurityException
void setRolesForUser(SecurityTransaction transaction, User user, Role[] roles) throws GeneralSecurityException
Role
s that a given User
is directly associated to.
transaction
- user
- roles
-
GeneralSecurityException
void setRolesForGroup(SecurityTransaction transaction, Group group, Role[] roles) throws GeneralSecurityException
Role
s that a given Group
is associated to.
transaction
- group
- roles
-
GeneralSecurityException
SecuredObject registerSecuredObject(SecurityTransaction transaction, java.lang.String type, java.lang.String name, java.lang.String title) throws GeneralSecurityException
SecuredObject
to the Registry
.
transaction
- type
- name
- title
-
GeneralSecurityException
- this is a DuplicateException
if the object already existedvoid deregisterSecuredObject(SecurityTransaction transaction, SecuredObject object) throws GeneralSecurityException
SecuredObject
from the Registry
(including its associated rights).
transaction
- object
-
GeneralSecurityException
SecuredObject getSecuredObjectByName(SecurityAccess securityAccess, java.lang.String name, java.lang.String type) throws GeneralSecurityException
SecuredObject
from the Registry
.
securityAccess
- name
- type
-
GeneralSecurityException
- this is an UnknownException
if the SecuredObject
is not known to the
Registry
SecuredObject[] getSecuredObjectsByNS(SecurityAccess securityAccess, java.lang.String ns, java.lang.String type) throws GeneralSecurityException
SecuredObject
s from the Registry
that have a certain namespace.
securityAccess
- ns
- type
-
GeneralSecurityException
SecuredObject getSecuredObjectById(SecurityAccess securityAccess, int id) throws GeneralSecurityException
SecuredObject
from the Registry
.
securityAccess
- id
-
GeneralSecurityException
- this is an UnknownException
if the SecuredObject
is not known to the
Registry
SecuredObject[] getAllSecuredObjects(SecurityAccess securityAccess, java.lang.String type) throws GeneralSecurityException
SecuredObject
s from the Registry
.
securityAccess
- type
-
GeneralSecurityException
Privilege registerPrivilege(SecurityTransaction transaction, java.lang.String name) throws GeneralSecurityException
Privilege
to the Registry
.
transaction
- name
-
GeneralSecurityException
- this is a DuplicateException
if the Privilege
already existedvoid deregisterPrivilege(SecurityTransaction transaction, Privilege privilege) throws GeneralSecurityException
Registry
(including its relations).
transaction
- privilege
-
GeneralSecurityException
Privilege getPrivilegeByName(SecurityAccess securityAccess, java.lang.String name) throws GeneralSecurityException
Privilege
from the Registry
.
securityAccess
- name
-
GeneralSecurityException
- this is an UnknownException
if the privilege is not known to the Registry
Privilege[] getPrivilegesForRole(SecurityAccess securityAccess, Role role) throws GeneralSecurityException
Privileges
s from the Registry
that are associated with a given
Role
.
securityAccess
- role
-
GeneralSecurityException
void setPrivilegesForRole(SecurityTransaction transaction, Role role, Privilege[] privileges) throws GeneralSecurityException
Privilege
s that are associated with a given Role
.
transaction
- role
- privileges
-
GeneralSecurityException
RightType registerRightType(SecurityTransaction transaction, java.lang.String name) throws GeneralSecurityException
RightType
to the Registry
.
transaction
- name
-
GeneralSecurityException
- this is a DuplicateException
if the RightType
already existedvoid deregisterRightType(SecurityTransaction transaction, RightType type) throws GeneralSecurityException
RightType
from the Registry
(including its relations).
transaction
- type
-
GeneralSecurityException
RightType getRightTypeByName(SecurityAccess securityAccess, java.lang.String name) throws GeneralSecurityException
RightType
from the Registry
.
securityAccess
- name
-
GeneralSecurityException
- this is an UnknownException
if the RightType
is not known to the
Registry
Right[] getRights(SecurityAccess securityAccess, SecurableObject object, Role role) throws GeneralSecurityException
Rights
from the Registry
that are associated with a given
Role
and a SecurableObject
.
securityAccess
- object
- role
-
GeneralSecurityException
void setRights(SecurityTransaction transaction, SecurableObject object, Role role, Right[] rights) throws GeneralSecurityException
Rights
to be associated with a given Role
and SecurableObject
.
transaction
- object
- role
- rights
-
GeneralSecurityException
void setServicesRights(SecurityTransaction transaction, java.util.Collection<java.lang.Integer> services, Role role) throws GeneralSecurityException
transaction
- services
- the ids of the accessible servicesrole
-
GeneralSecurityException
void setRights(SecurityTransaction transaction, SecurableObject[] objects, Role role, Right right) throws GeneralSecurityException
Right
to be associated with a given Role
and all given
SecurableObjects
.
transaction
- objects
- role
- right
-
GeneralSecurityException
Service getServiceByAddress(SecurityAccess access, java.lang.String address) throws GeneralSecurityException
access
- address
-
GeneralSecurityException
Service registerService(SecurityTransaction transaction, java.lang.String address, java.lang.String title, java.util.List<StringPair> objects, java.lang.String type) throws GeneralSecurityException
transaction
- address
- title
- objects
- type
-
GeneralSecurityException
void deregisterService(SecurityTransaction transaction, Service service) throws GeneralSecurityException
transaction
- service
-
GeneralSecurityException
java.util.LinkedList<Service> getAllServices(SecurityAccess access) throws GeneralSecurityException
access
-
GeneralSecurityException
void updateService(SecurityTransaction securityTransaction, Service oldService, Service newService) throws GeneralSecurityException
securityTransaction
- oldService
- newService
-
GeneralSecurityException
void renameObject(SecurityTransaction securityTransaction, Service service, java.lang.String oldName, java.lang.String newName) throws GeneralSecurityException
securityTransaction
- service
- oldName
- newName
-
GeneralSecurityException
void editService(SecurityTransaction securityTransaction, Service service, java.lang.String newTitle, java.lang.String newAddress) throws GeneralSecurityException
securityTransaction
- service
- newTitle
- newAddress
-
GeneralSecurityException
java.util.LinkedList<Service> getRolesServices(SecurityAccess access, Role role) throws GeneralSecurityException
access
- role
-
GeneralSecurityException
|
deegree 2.5 (2011/06/29 09:44 build-8-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