|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MCRAccessInterface
This serves as an interface to an underlying access controll system.
| Method Summary | |
|---|---|
void |
addRule(String permission,
Element rule,
String description)
adds an access rule for an "a priori-permission" like "create-document" |
void |
addRule(String id,
String permission,
Element rule,
String description)
adds an access rule for an ID to an access system. |
boolean |
checkPermission(Element rule)
determines whether the current user has the permission to perform a certain action. |
boolean |
checkPermission(String permission)
determines whether the current user has the permission to perform a certain action. |
boolean |
checkPermission(String permission,
MCRUser user)
determines whether a given user has the permission to perform a certain action. |
boolean |
checkPermission(String id,
String permission)
determines whether the current user has the permission to perform a certain action. |
boolean |
checkPermission(String id,
String permission,
MCRUser user)
determines whether a given user has the permission to perform a certain action. |
void |
createRule(Element rule,
String creator,
String description)
create an access rule in the rulestore using an rule string in plain text |
void |
createRule(String rule,
String creator,
String description)
create an access rule in the rulestore using an rule string in plain text |
Collection<String> |
getAccessPermissionsFromConfiguration()
list all object-related Access Permissions that are defined in configuration files |
Collection<String> |
getAllControlledIDs()
lists all String IDs, a permission is assigned to. |
String |
getNormalizedRuleString(Element rule)
generate rule string from xml |
Collection<String> |
getPermissions()
lists all a-priori permissions like "create-document". |
Collection<String> |
getPermissionsForID(String id)
lists all permissions defined for the id. |
Element |
getRule(String permission)
exports a access rule for a "a priori permission" as JDOM element. |
Element |
getRule(String id,
String permission)
exports a access rule as JDOM element. |
String |
getRuleDescription(String permission)
returns the prosa description of a defined rule for a "a priori" permission like "create-document". |
String |
getRuleDescription(String id,
String permission)
returns the prosa description of a defined rule. |
boolean |
hasRule(String id)
checks wether a rule with the id is defined. |
boolean |
hasRule(String id,
String permission)
checks wether a rule with the id and
permission is defined. |
void |
removeAllRules(String id)
removes all rules of the id. |
void |
removeRule(String permission)
removes a rule for an "a priori permission" like "create-document" |
void |
removeRule(String id,
String permission)
removes a rule. |
void |
updateRule(String permission,
Element rule,
String description)
updates an access rule for an "a priori permission" of an access system like "create-document". |
void |
updateRule(String id,
String permission,
Element rule,
String description)
updates an access rule for an ID to an access system. |
| Method Detail |
|---|
void createRule(String rule,
String creator,
String description)
rule - the rule string in plain textcreator - description - a String description of the rule in prosa
void createRule(Element rule,
String creator,
String description)
rule - the rule string as xmlcreator - description - a String description of the rule in prosaString getNormalizedRuleString(Element rule)
rule -
void addRule(String id,
String permission,
Element rule,
String description)
throws MCRException
id serves as an identifier for the concrete underlying
rule, e.g. a MCRObjectID.
id - the ID-String of the objectpermission - the access permission for the rulerule - the access ruledescription - a String description of the rule in prosa
MCRException - if an error occured
void addRule(String permission,
Element rule,
String description)
throws MCRException
permission - the access permission for the rule (e.g. "create-document")rule - the access ruledescription - a String description of the rule in prosa
MCRException - if an error occured
void removeRule(String id,
String permission)
throws MCRException
id serves as an identifier
for the concrete underlying rule, e.g. a MCRObjectID.
id - the ID-String of the objectpermission - the access permission for the rule
MCRException - if an error occured
void removeRule(String permission)
throws MCRException
permission - the access permission for the rule
MCRException - if an error occured
void removeAllRules(String id)
throws MCRException
id. The parameter
id serves as an identifier for the concrete underlying
rule, e.g. a MCRObjectID.
id - the ID-String of the object
MCRException - if an errow was occured
void updateRule(String id,
String permission,
Element rule,
String description)
throws MCRException
id serves as an identifier for the concrete underlying
rule, e.g. a MCRObjectID.
id - the ID-String of the objectpermission - the access permission for the rulerule - the access ruledescription - a String description of the rule in prosa
MCRException - if an errow was occured
void updateRule(String permission,
Element rule,
String description)
throws MCRException
permission - the access permission for the rulerule - the access ruledescription - a String description of the rule in prosa
MCRException - if an errow was occured
boolean checkPermission(String id,
String permission)
MCRSession instance which can be retrieved by
MCRSession currentSession = MCRSessionMgr.getCurrentSession();The parameter
id serves as an identifier for the concrete
underlying rule, e.g. a MCRObjectID.
id - the ID-String of the objectpermission - the permission/action to be granted, e.g. "read"
MCRSessionMgr.getCurrentSession(),
MCRSession
boolean checkPermission(String id,
String permission,
MCRUser user)
id serves as an identifier for the concrete
underlying rule, e.g. a MCRObjectID.
id - the ID-String of the objectpermission - the permission/action to be granted, e.g. "read"user - the MCRUser, whose permissions are checked
MCRSessionMgr.getCurrentSession(),
MCRSessionboolean checkPermission(String permission)
MCRSession instance which can be retrieved by
MCRSession currentSession = MCRSessionMgr.getCurrentSession();This method is used for checking "a priori permissions" like "create-document" where a String ID does not exist yet
permission - the permission/action to be granted, e.g. "create-document"
MCRSessionMgr.getCurrentSession(),
MCRSession
boolean checkPermission(String permission,
MCRUser user)
permission - the permission/action to be granted, e.g. "create-document"user - the MCRUser, whose permissions are checked
MCRSessionMgr.getCurrentSession(),
MCRSessionboolean checkPermission(Element rule)
MCRSession instance which can be retrieved by
MCRSession currentSession = MCRSessionMgr.getCurrentSession();
rule - the jdom-representation of a mycore access rule
MCRSessionMgr.getCurrentSession(),
MCRSession
Element getRule(String id,
String permission)
id - the ID-String of the objectpermission - the access permission for the rule
null if no rule is
definedElement getRule(String permission)
permission - the access permission for the rule
null if no rule is
definedString getRuleDescription(String permission)
permission - the access permission for the rule
String getRuleDescription(String id,
String permission)
id - the ID-String of the objectpermission - the access permission for the rule
Collection<String> getPermissionsForID(String id)
id.
The parameter id serves as an identifier for the concrete
underlying rule, e.g. a MCRObjectID.
id -
List of all for id defined
permissionCollection<String> getPermissions()
List of all defined permissionsCollection<String> getAccessPermissionsFromConfiguration()
Collection<String> getAllControlledIDs()
id serves as an identifier for the concrete
underlying rule, e.g. a MCRObjectID.
List of all String IDs
boolean hasRule(String id,
String permission)
id and
permission is defined.
id - the ID-String of the objectpermission - the access permission for the rule
boolean hasRule(String id)
id is defined.
id - the ID-String of the object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||