|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.security.authorization.AbstractACLTemplate
public abstract class AbstractACLTemplate
AbstractACLTemplate...
| Field Summary | |
|---|---|
protected String |
path
Path of the node this ACL template has been created for. |
protected ValueFactory |
valueFactory
The value factory |
| Fields inherited from interface org.apache.jackrabbit.core.security.authorization.AccessControlConstants |
|---|
N_ACCESSCONTROL, N_POLICY, NT_REP_ACCESS_CONTROL, NT_REP_ACCESS_CONTROLLABLE, NT_REP_ACE, NT_REP_ACL, NT_REP_DENY_ACE, NT_REP_GRANT_ACE, NT_REP_PRINCIPAL_ACCESS_CONTROL, P_GLOB, P_PRINCIPAL_NAME, P_PRIVILEGES |
| Constructor Summary | |
|---|---|
protected |
AbstractACLTemplate(String path,
ValueFactory valueFactory)
|
| Method Summary | |
|---|---|
boolean |
addAccessControlEntry(Principal principal,
Privilege[] privileges)
|
boolean |
addEntry(Principal principal,
Privilege[] privileges,
boolean isAllow)
Same as JackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean, Map) using
some implementation specific restrictions. |
protected abstract void |
checkValidEntry(Principal principal,
Privilege[] privileges,
boolean isAllow,
Map<String,Value> restrictions)
Validates the given parameters to create a new ACE and throws an AccessControlException if any of them is invalid. |
AccessControlEntry[] |
getAccessControlEntries()
|
protected abstract List<AccessControlEntry> |
getEntries()
Return the list of entries, if they are held in a orderable list. |
String |
getPath()
Returns the path of the node this policy has been created for. |
boolean |
isEmpty()
Returns true if this policy does not yet define any
entries. |
void |
orderBefore(AccessControlEntry srcEntry,
AccessControlEntry destEntry)
If the AccessControlList implementation supports
reordering of entries the specified srcEntry is inserted
at the position of the specified destEntry. |
int |
size()
Returns the number of entries or 0 if the policy is empty. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.jackrabbit.api.security.JackrabbitAccessControlList |
|---|
addEntry, getRestrictionNames, getRestrictionType |
| Methods inherited from interface javax.jcr.security.AccessControlList |
|---|
removeAccessControlEntry |
| Field Detail |
|---|
protected final String path
protected final ValueFactory valueFactory
| Constructor Detail |
|---|
protected AbstractACLTemplate(String path,
ValueFactory valueFactory)
| Method Detail |
|---|
protected abstract void checkValidEntry(Principal principal,
Privilege[] privileges,
boolean isAllow,
Map<String,Value> restrictions)
throws AccessControlException
AccessControlException if any of them is invalid. Otherwise
this method returns silently.
principal - The principal to create the ACE for.privileges - The privileges to be granted/denied by the ACE.isAllow - Defines if the priveleges are allowed or denied.restrictions - The additional restrictions.
AccessControlException - If any of the given params is invalid.protected abstract List<AccessControlEntry> getEntries()
orderBefore(AccessControlEntry, AccessControlEntry)public String getPath()
JackrabbitAccessControlPolicy
getPath in interface JackrabbitAccessControlPolicyJackrabbitAccessControlPolicy.getPath()
public boolean addEntry(Principal principal,
Privilege[] privileges,
boolean isAllow)
throws AccessControlException,
RepositoryException
JackrabbitAccessControlListJackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean, Map) using
some implementation specific restrictions.
addEntry in interface JackrabbitAccessControlListprincipal - the principal to add the entry forprivileges - the privileges to addisAllow - if true if this is a positive (allow) entry
AccessControlException - If any of the given parameter is invalid
or cannot be handled by the implementation.
RepositoryException - If another error occurs.JackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean)public int size()
JackrabbitAccessControlListis empty.
size in interface JackrabbitAccessControlListis empty.JackrabbitAccessControlList.size()public boolean isEmpty()
JackrabbitAccessControlListtrue if this policy does not yet define any
entries.
isEmpty in interface JackrabbitAccessControlListJackrabbitAccessControlList.isEmpty()
public void orderBefore(AccessControlEntry srcEntry,
AccessControlEntry destEntry)
throws AccessControlException,
UnsupportedRepositoryOperationException,
RepositoryException
JackrabbitAccessControlListAccessControlList implementation supports
reordering of entries the specified srcEntry is inserted
at the position of the specified destEntry.
If destEntry is null the entry is moved to the
end of the list.
If srcEntry and destEntry are the same no
changes are made.
orderBefore in interface JackrabbitAccessControlListsrcEntry - The access control entry to be moved within the list.destEntry - The entry before which the srcEntry will be moved.
AccessControlException - If any of the given entries is invalid or
cannot be handled by the implementation.
UnsupportedRepositoryOperationException - If ordering is not supported.
RepositoryException - If another error occurs.JackrabbitAccessControlList.orderBefore(javax.jcr.security.AccessControlEntry, javax.jcr.security.AccessControlEntry)
public AccessControlEntry[] getAccessControlEntries()
throws RepositoryException
getAccessControlEntries in interface AccessControlListRepositoryExceptionAccessControlList.getAccessControlEntries()
public boolean addAccessControlEntry(Principal principal,
Privilege[] privileges)
throws AccessControlException,
RepositoryException
addAccessControlEntry in interface AccessControlListAccessControlException
RepositoryExceptionAccessControlList.addAccessControlEntry(java.security.Principal , javax.jcr.security.Privilege[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||