|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.sling.adapter.SlingAdaptable
com.day.cq.security.impl.CrxAuthorizable
public abstract class CrxAuthorizable
Implementation of an Authorizable backed by a CRX Repository Covenantee
Authorizable,
UserManager| Field Summary | |
|---|---|
protected static org.slf4j.Logger |
log
|
| Fields inherited from interface com.day.cq.security.Authorizable |
|---|
PROPERTY_DESCRIPTION, PROPERTY_EMAIL, PROPERTY_ID, PROPERTY_NAME, PROPERTY_PRINCIPAL |
| Method Summary | ||
|---|---|---|
|
adaptTo(Class<AdapterType> type)
Adapat to the Home if the type argument is a Node Class
Delegates all other Adapater types to AdapterFactory |
|
boolean |
equals(Object obj)
|
|
Privilege |
getEffectivePrivilege(String privilege)
The getPrivilege method, only accesses Privilges garanted to this Authorizable, the effective Privilege access additionally those inherited |
|
String |
getHomePath()
|
|
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)
|
|
int |
hashCode()
|
|
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 class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.day.cq.security.Authorizable |
|---|
getID, getName |
| Field Detail |
|---|
protected static final org.slf4j.Logger log
| Method Detail |
|---|
public boolean isUser()
User according
this test-method a cast to User Class
MUST be possible.
isUser in interface AuthorizableUserpublic Principal getPrincipal()
getPrincipal in interface Authorizablepublic String getProperty(String name)
getProperty in interface Authorizablename - of the Property
nullif property does not exist or does not have a valuepublic Iterator<String> getPropertyNames()
this Authorizable.
getPropertyNames in interface AuthorizableAuthorizable.getProperty(String)
public void setProperty(String name,
String value)
throws AccessDeniedException
Authorizable.
setProperty in interface Authorizablename - name of the Property to setvalue - to set
AccessDeniedException - the session, aquireing thie
Authroizable is not allowed to write authorizables
public boolean removeProperty(String name)
throws AccessControlException
removeProperty in interface Authorizablename - of the Property to remove
AccessControlExceptionpublic String getHomePath()
getHomePath in interface Authorizablepublic boolean hasPermission(String privilege)
hasPermission in interface Authorizableprivilege - identifier of the privilege (eg. workflow/privilege/start)
Privilege.isPathDependent() privilege is pathDependant}Authorizable.grantPrivilege(String)
public boolean hasPermissionOn(String privilege,
String resourcePath)
hasPermissionOn in interface Authorizableprivilege - 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-pathAuthorizable.grantPrivilege(String),
Privilege.isGranted(String)
public Privilege getPrivilege(String privilege)
throws AccessDeniedException
getPrivilege in interface Authorizableprivilege - identifier of the privilege (eg. workflow/privilege/start)
AccessDeniedException - in case the session that acquired
this authorizable is not allowed read PrivilegesAuthorizable.grantPrivilege(String)
public void grantPrivilege(String privilege)
throws AccessDeniedException
grantPrivilege in interface Authorizableprivilege - identifier to grant the current Authorizable
AccessDeniedException - in case the session that acquired
this authorizable is not allowed grant Privileges
public void revokePrivilege(String privilege)
throws AccessDeniedException
revokePrivilege in interface Authorizableprivilege - identifier of the privilege to remove from this Authorizable
AccessDeniedException - in case the session that acquired
this authorizable is not allowed revoke Privileges
public Collection<Privilege> getPrivileges()
throws AccessDeniedException
getPrivileges in interface AuthorizableAccessDeniedException - in case the session that acquired
this authorizable is not allowed read Privileges
public Privilege getEffectivePrivilege(String privilege)
throws AccessDeniedException
privilege - idedntifier to access
null if non is effective
AccessDeniedException - in case the current User does not have
permission to test privileges
todo: add if to check to apipublic Iterator<Group> memberOf()
memberOf in interface Authorizable
public void remove()
throws AccessDeniedException
remove in interface AuthorizableAccessDeniedException - in case the session that acquired
this authorizable is not allowed to remove thispublic <AdapterType> AdapterType adaptTo(Class<AdapterType> type)
Node Class
Delegates all other Adapater types to AdapterFactory
adaptTo in interface org.apache.sling.api.adapter.AdaptableadaptTo in class org.apache.sling.adapter.SlingAdaptabletype - Adapter type
Authorizable.getHomePath()public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||