|
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 |
java.lang.Object org.deegree.security.drm.SecurityAccess org.deegree.security.drm.SecurityTransaction
public class SecurityTransaction
Field Summary |
---|
Fields inherited from class org.deegree.security.drm.SecurityAccess |
---|
registry, user |
Constructor Summary | |
---|---|
SecurityTransaction(User user,
SecurityRegistry registry,
Role adminRole)
|
Method Summary | |
---|---|
void |
addRights(SecurableObject object,
Role role,
Right[] additionalRights)
Adds the specified Rights on the passed object to the passed role. |
void |
addRights(SecurableObject object,
Role role,
RightType[] types)
Adds the specified Rights on the passed object to the passed role. |
Role[] |
addRoles(Role[] roles,
Role role)
Returns the conjunction of an array of roles plus a single role. |
void |
clean()
Deletes all data from the underlying Registry and sets the default objects (SEC_ADMIN user, role and
group) and standard rights and privileges. |
void |
deregisterGroup(Group group)
Removes a Group from the Registry . |
void |
deregisterRole(Role role)
Removes a Role from the Registry . |
void |
deregisterSecuredObject(SecuredObject object)
Removes a SecuredObject from the Registry . |
void |
deregisterService(Service service)
|
void |
deregisterUser(User user)
Removes a User from the Registry . |
void |
editService(Service service,
java.lang.String newTitle,
java.lang.String newAddress)
|
long |
getTimestamp()
|
Group |
registerGroup(java.lang.String name,
java.lang.String title)
Registers a new Group to the Registry . |
Role |
registerRole(java.lang.String name)
Registers a new Role to the Registry . |
SecuredObject |
registerSecuredObject(java.lang.String type,
java.lang.String name,
java.lang.String title)
Registers a new SecuredObject to the Registry . |
Service |
registerService(java.lang.String address,
java.lang.String title,
java.util.List<StringPair> objects,
java.lang.String type)
|
User |
registerUser(java.lang.String name,
java.lang.String password,
java.lang.String lastName,
java.lang.String firstName,
java.lang.String mailAddress)
Registers a new User to the Registry . |
void |
removeRights(SecurableObject object,
Role role,
RightType[] types)
Removes all rights of the specified types that the role may have on the given SecurableObject . |
void |
renameObject(Service service,
java.lang.String oldName,
java.lang.String newName)
|
(package private) void |
renew()
|
void |
setGroupsForGroup(Group group,
Group[] newGroups)
Sets the Group s that a given Group is a DIRECT member of. |
void |
setGroupsForUser(User user,
Group[] newGroups)
Sets the Groups that a given User is a DIRECT member of. |
void |
setGroupsInGroup(Group group,
Group[] groups)
Sets the members (groups) for a group. |
void |
setGroupsWithRole(Role role,
Group[] groups)
Sets the groups to be associated with the given role. |
void |
setPrivilegesForRole(Role role,
Privilege[] privileges)
Sets the privileges for a certain role. |
void |
setRights(SecurableObject[] objects,
Role role,
Right right)
Sets one certain right that a certain role has on the given objects. |
void |
setRights(SecurableObject object,
Role role,
Right[] rights)
Sets the Rights that a certain role has on a given object. |
void |
setServicesRights(java.util.Collection<java.lang.Integer> services,
Role role)
|
void |
setUsersInGroup(Group group,
User[] users)
Sets the members (users) in a group. |
void |
setUsersWithRole(Role role,
User[] users)
Sets the users to be associated with the given role (DIRECTLY, i.e. not via group memberships). |
java.lang.String |
toString()
|
void |
updateService(Service oldService,
Service newService)
|
void |
updateUser(User user)
Updates the data of an existing User in the Registry . |
Methods inherited from class org.deegree.security.drm.SecurityAccess |
---|
checkForPrivilege, checkForRight, findGroupCycle, getAllGroups, getAllRoles, getAllRolesForGroup, getAllRolesForUser, getAllSecuredObjects, getAllServices, getAllUsers, getGroupById, getGroupByName, getPrivilegeByName, getRightByName, getRoleById, getRoleByName, getRolesByNS, getRolesServices, getSecuredObjectById, getSecuredObjectByName, getSecuredObjectsByNS, getServiceByAddress, getUser, getUserById, getUserByName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
SecurityTransaction(User user, SecurityRegistry registry, Role adminRole)
user
- registry
- adminRole
- Method Detail |
---|
public Role[] addRoles(Role[] roles, Role role)
roles
- role
-
public void clean() throws GeneralSecurityException
Registry
and sets the default objects (SEC_ADMIN user, role and
group) and standard rights and privileges.
GeneralSecurityException
public void deregisterGroup(Group group) throws GeneralSecurityException, UnauthorizedException
Group
from the Registry
.
This means:
group
-
GeneralSecurityException
UnauthorizedException
public void deregisterRole(Role role) throws GeneralSecurityException, UnauthorizedException
Role
from the Registry
.
This means:
role
-
GeneralSecurityException
UnauthorizedException
public void deregisterSecuredObject(SecuredObject object) throws GeneralSecurityException, UnauthorizedException
SecuredObject
from the Registry
.
This means:
object
-
GeneralSecurityException
UnauthorizedException
public void deregisterUser(User user) throws GeneralSecurityException, UnauthorizedException
User
from the Registry
.
This means:
user
-
GeneralSecurityException
UnauthorizedException
public long getTimestamp()
public Group registerGroup(java.lang.String name, java.lang.String title) throws GeneralSecurityException
Group
to the Registry
.
This means:
name
- title
-
GeneralSecurityException
public Role registerRole(java.lang.String name) throws GeneralSecurityException
Role
to the Registry
.
This means:
name
-
GeneralSecurityException
public SecuredObject registerSecuredObject(java.lang.String type, java.lang.String name, java.lang.String title) throws GeneralSecurityException
SecuredObject
to the Registry
.
This means:
type
- name
- title
-
GeneralSecurityException
public User registerUser(java.lang.String name, java.lang.String password, java.lang.String lastName, java.lang.String firstName, java.lang.String mailAddress) throws GeneralSecurityException
User
to the Registry
.
This means:
name
- password
- null means that password checking is disabledlastName
- firstName
- mailAddress
-
GeneralSecurityException
public void updateUser(User user) throws GeneralSecurityException
User
in the Registry
.
NOTE: Only performed if acting user has the 'update'-right on the user.
user
-
GeneralSecurityException
public void setGroupsForGroup(Group group, Group[] newGroups) throws GeneralSecurityException, UnauthorizedException
Group
s that a given Group
is a DIRECT member of.
NOTE: Only performed if the acting user has the 'grant'-right for all the groups that are requested to be added /
removed.
group
- newGroups
-
GeneralSecurityException
UnauthorizedException
public void setGroupsForUser(User user, Group[] newGroups) throws GeneralSecurityException, UnauthorizedException
Groups
that a given User
is a DIRECT member of.
NOTE: Only performed if the acting user has the 'grant'-right for all the groups that are requested to be added /
removed.
user
- newGroups
-
GeneralSecurityException
UnauthorizedException
public void setGroupsInGroup(Group group, Group[] groups) throws GeneralSecurityException, UnauthorizedException
group
- groups
-
GeneralSecurityException
UnauthorizedException
public void setGroupsWithRole(Role role, Group[] groups) throws GeneralSecurityException, UnauthorizedException
role
- groups
-
GeneralSecurityException
- if not permitted
UnauthorizedException
public void setPrivilegesForRole(Role role, Privilege[] privileges) throws GeneralSecurityException
role
- privileges
-
GeneralSecurityException
- if not permittedpublic void setServicesRights(java.util.Collection<java.lang.Integer> services, Role role) throws GeneralSecurityException
transaction
- services
- role
-
GeneralSecurityException
public void setRights(SecurableObject object, Role role, Right[] rights) throws GeneralSecurityException, UnauthorizedException
Rights
that a certain role has on a given object.
NOTE: Only performed if the acting user has the 'update'-right on the role and the 'grant'-right on the securable
object.
object
- role
- rights
-
GeneralSecurityException
- if not permitted
UnauthorizedException
public void setRights(SecurableObject[] objects, Role role, Right right) throws GeneralSecurityException, UnauthorizedException
objects
- role
- right
-
GeneralSecurityException
- if not permitted
UnauthorizedException
public void addRights(SecurableObject object, Role role, Right[] additionalRights) throws GeneralSecurityException, UnauthorizedException
Rights
on the passed object to the passed role. If they are already present,
nothing happens.
object
- role
- additionalRights
-
GeneralSecurityException
UnauthorizedException
public void addRights(SecurableObject object, Role role, RightType[] types) throws UnauthorizedException, GeneralSecurityException
Rights
on the passed object to the passed role. If they are already present,
nothing happens.
object
- role
- types
-
UnauthorizedException
GeneralSecurityException
public void removeRights(SecurableObject object, Role role, RightType[] types) throws GeneralSecurityException, UnauthorizedException
SecurableObject
.
object
- role
- types
-
GeneralSecurityException
UnauthorizedException
public void setUsersInGroup(Group group, User[] users) throws GeneralSecurityException, UnauthorizedException
group
- users
-
GeneralSecurityException
UnauthorizedException
public void setUsersWithRole(Role role, User[] users) throws GeneralSecurityException, UnauthorizedException
role
- users
-
GeneralSecurityException
- if not permitted
UnauthorizedException
public java.lang.String toString()
toString
in class java.lang.Object
public Service registerService(java.lang.String address, java.lang.String title, java.util.List<StringPair> objects, java.lang.String type) throws GeneralSecurityException
address
- title
- objects
- type
-
GeneralSecurityException
public void deregisterService(Service service) throws GeneralSecurityException
service
-
GeneralSecurityException
public void updateService(Service oldService, Service newService) throws ReadWriteLockInvalidException, GeneralSecurityException
oldService
- newService
-
ReadWriteLockInvalidException
GeneralSecurityException
public void renameObject(Service service, java.lang.String oldName, java.lang.String newName) throws ReadWriteLockInvalidException, GeneralSecurityException
service
- oldName
- newName
-
ReadWriteLockInvalidException
GeneralSecurityException
public void editService(Service service, java.lang.String newTitle, java.lang.String newAddress) throws GeneralSecurityException
service
- newTitle
- newAddress
-
GeneralSecurityException
void renew()
|
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