|
||||||||||
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, NF, 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_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. |
protected abstract List<? extends 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. |
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 .
If destEntry is null the entry is moved to the
end of the list.
If srcChildRelPath and destChildRelPath are the same no changes are made. |
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, isEmpty, size |
Methods inherited from interface javax.jcr.security.AccessControlList |
---|
getAccessControlEntries, 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<? extends AccessControlEntry> getEntries() throws UnsupportedRepositoryOperationException, RepositoryException
UnsupportedRepositoryOperationException
- If the implementation
does not held the entries in a list.
RepositoryException
orderBefore(AccessControlEntry, AccessControlEntry)
public String getPath()
JackrabbitAccessControlPolicy
getPath
in interface JackrabbitAccessControlPolicy
JackrabbitAccessControlPolicy.getPath()
public boolean addEntry(Principal principal, Privilege[] privileges, boolean isAllow) throws AccessControlException, RepositoryException
JackrabbitAccessControlList
JackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean, Map)
using
some implementation specific restrictions.
addEntry
in interface JackrabbitAccessControlList
principal
- 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 void orderBefore(AccessControlEntry srcEntry, AccessControlEntry destEntry) throws AccessControlException, UnsupportedRepositoryOperationException, RepositoryException
JackrabbitAccessControlList
AccessControlList
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 srcChildRelPath and destChildRelPath are the same no changes are made.
orderBefore
in interface JackrabbitAccessControlList
srcEntry
- The access control entry to be moved within the list.destEntry
- The entry before which the srcEntry
will be moved.
AccessControlException
UnsupportedRepositoryOperationException
RepositoryException
public boolean addAccessControlEntry(Principal principal, Privilege[] privileges) throws AccessControlException, RepositoryException
addAccessControlEntry
in interface AccessControlList
AccessControlException
RepositoryException
AccessControlList.addAccessControlEntry(java.security.Principal , javax.jcr.security.Privilege[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |