|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Authorizable
Base Class for Objects which act on the Repository.
This can be Users, eg. the authenticated
subject, or Groups of Users.
The Authorizable is related to a Session via
the User-ID.
Allow to adapt the Authoirzable to Other resources like its Home, Prferences etc.
Adaptable| Field Summary | |
|---|---|
static String |
PROPERTY_DESCRIPTION
|
static String |
PROPERTY_EMAIL
|
static String |
PROPERTY_ID
|
static String |
PROPERTY_NAME
|
static String |
PROPERTY_PRINCIPAL
|
| Method Summary | |
|---|---|
String |
getHomePath()
|
String |
getID()
The ID is a unique identifier within the UserManager this User has been
acquired from.The following must be true: |
String |
getName()
A human readable Name. |
Principal |
getPrincipal()
|
Privilege |
getPrivilege(String privilege)
|
Collection<Privilege> |
getPrivileges()
|
String |
getProperty(String name)
Some property. |
Iterator<String> |
getPropertyNames()
Returns the names of properties present with this Authorizable. |
void |
grantPrivilege(String privilege)
|
boolean |
hasPermission(String privilege)
|
boolean |
hasPermissionOn(String privilege,
String resourcePath)
|
boolean |
isUser()
If an Authorizable is a User according
this test-method a cast to User Class
MUST be possible. |
Iterator<Group> |
memberOf()
The Groups a Authorizable is member of. Transitive membership is not resolved. |
void |
remove()
delete this Authorizable |
boolean |
removeProperty(String name)
Removes the property with the given name. |
void |
revokePrivilege(String privilege)
|
void |
setProperty(String name,
String value)
Set an arbitrary property to this Authorizable. |
| Methods inherited from interface org.apache.sling.api.adapter.Adaptable |
|---|
adaptTo |
| Field Detail |
|---|
static final String PROPERTY_PRINCIPAL
static final String PROPERTY_ID
static final String PROPERTY_NAME
static final String PROPERTY_DESCRIPTION
static final String PROPERTY_EMAIL
| Method Detail |
|---|
boolean isUser()
User according
this test-method a cast to User Class
MUST be possible.
UserString getID()
UserManager this User has been
acquired from.String id = "userId" User u = userManger.get(id); u.extractID().equals(id);
UserManager.get(String)String getName()
Principal getPrincipal()
Iterator<String> getPropertyNames()
this Authorizable.
getProperty(String)String getProperty(String name)
name - of the Property
nullif property does not exist or does not have a value
void setProperty(String name,
String value)
throws AccessDeniedException
Authorizable.
name - name of the Property to setvalue - to set
AccessDeniedException - the session, aquireing thie
Authroizable is not allowed to write authorizables
boolean removeProperty(String name)
throws AccessDeniedException
name - of the Property to remove
AccessDeniedException - the session, aquireing thie
Authroizable is not allowed to write authorizablesIterator<Group> memberOf()
String getHomePath()
boolean hasPermission(String privilege)
privilege - identifier of the privilege (eg. workflow/privilege/start)
Privilege.isPathDependent() privilege is pathDependant}grantPrivilege(String)
boolean hasPermissionOn(String privilege,
String resourcePath)
privilege - identifier of the privilege (eg. workflow/privilege/start)resourcePath - path of the resource
Privilege.isPathDependent() privilege is pathDependant}.
it has additionaly to grant on the given resource-pathgrantPrivilege(String),
Privilege.isGranted(String)
Privilege getPrivilege(String privilege)
throws AccessDeniedException
privilege - identifier of the privilege (eg. workflow/privilege/start)
AccessDeniedException - in case the session that acquired
this authorizable is not allowed read PrivilegesgrantPrivilege(String)
void grantPrivilege(String privilege)
throws AccessDeniedException
privilege - identifier to grant the current Authorizable
AccessDeniedException - in case the session that acquired
this authorizable is not allowed grant Privileges
void revokePrivilege(String privilege)
throws AccessDeniedException
privilege - identifier of the privilege to remove from this Authorizable
AccessDeniedException - in case the session that acquired
this authorizable is not allowed revoke Privileges
Collection<Privilege> getPrivileges()
throws AccessDeniedException
AccessDeniedException - in case the session that acquired
this authorizable is not allowed read Privileges
void remove()
throws AccessDeniedException
AccessDeniedException - in case the session that acquired
this authorizable is not allowed to remove this
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||