ISecurityConfig Interface

com.bea.ide.workspace.security
ISecurityConfig Interface

public interface ISecurityConfig

Represents a snapshot of the security configuration of the Workspace, presently including only Roles, but likely to extend in the future to users, and possibly other security information.

This object is mutable, and changes to it will be seen by other users of this object. However, this configuration does not become part of the workspace until IWorkspace.saveSecurityConfig() is called. This allows manipulation of the security configuration without automatically committing each change. If you wish to roll back the changes, simply allow this object to fall out of scope.

Method Summary

public ISecurityRole
createRole(String name, String description)
Creates a role from the given name and description.
public ISecurityRole
getRoleByName(String name)
Returns a role given its name.
public Set
getRoles()
Returns the set of roles in this config object.
public void
removeRole(ISecurityRole role)
Removes this role from this config object.

Method Detail

createRole(String, String) Method

public ISecurityRole createRole(String name, 
                                String description)
throws NameExistsException
Creates a role from the given name and description.

Exceptions

NameExistsException
if the given name is already in use by another role.

getRoleByName(String) Method

public ISecurityRole getRoleByName(String name)
Returns a role given its name. Returns null if the role is not found.


getRoles() Method

public Set getRoles()
Returns the set of roles in this config object. This set is unmodifiable. To add or remove roles, call createRole() or removeRole().


removeRole(ISecurityRole) Method

public void removeRole(ISecurityRole role)
Removes this role from this config object.