|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.ac.impl.DefaultPolicy
public class DefaultPolicy
A DefaultPolicy is the own policy of a certain URL (not merged).
| Field Summary |
|---|
| Fields inherited from interface org.apache.lenya.ac.Policy |
|---|
RESULT_DENIED, RESULT_GRANTED, RESULT_NOT_MATCHED |
| Constructor Summary | |
|---|---|
DefaultPolicy()
|
|
| Method Summary | |
|---|---|
void |
addCredential(org.apache.lenya.ac.Credential credential)
Adds a credential to this policy. |
void |
addRole(org.apache.lenya.ac.Accreditable accreditable,
org.apache.lenya.ac.Role role,
java.lang.String method)
Adds a role to this policy for a certain accreditable and a certain role. |
int |
check(org.apache.lenya.ac.Identity identity,
org.apache.lenya.ac.Role role)
|
org.apache.lenya.ac.Credential |
getCredential(org.apache.lenya.ac.Accreditable accreditable,
org.apache.lenya.ac.Role role)
Returns the credentials for a certain accreditable. |
org.apache.lenya.ac.Credential[] |
getCredentials()
Returns the credentials of this policy in top-down order. |
org.apache.lenya.ac.Credential[] |
getCredentials(org.apache.lenya.ac.Identity identity)
|
boolean |
isEmpty()
|
boolean |
isSSLProtected()
|
protected boolean |
matches(org.apache.lenya.ac.Identity identity,
org.apache.lenya.ac.Accreditable accreditable)
|
void |
moveRoleDown(org.apache.lenya.ac.Accreditable accreditable,
org.apache.lenya.ac.Role role)
|
void |
moveRoleUp(org.apache.lenya.ac.Accreditable accreditable,
org.apache.lenya.ac.Role role)
|
protected void |
removeCredential(org.apache.lenya.ac.Credential credential)
Removes a credential. |
void |
removeRole(org.apache.lenya.ac.Accreditable accreditable,
org.apache.lenya.ac.Role role)
Removes a role from this policy for a certain accreditable and a certain role. |
void |
removeRoles(org.apache.lenya.ac.Accreditable accreditable)
Removes all roles for a certain accreditable. |
void |
setSSL(boolean ssl)
Sets if this policy requires SSL protection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultPolicy()
| Method Detail |
|---|
public void addCredential(org.apache.lenya.ac.Credential credential)
credential - A credential.
public void addRole(org.apache.lenya.ac.Accreditable accreditable,
org.apache.lenya.ac.Role role,
java.lang.String method)
addRole in interface org.apache.lenya.ac.ModifiablePolicyaccreditable - An accreditable.role - A role.
public void removeRole(org.apache.lenya.ac.Accreditable accreditable,
org.apache.lenya.ac.Role role)
throws org.apache.lenya.ac.AccessControlException
removeRole in interface org.apache.lenya.ac.ModifiablePolicyaccreditable - An accreditable.role - A role.
org.apache.lenya.ac.AccessControlException - if the accreditable-role pair is not
contained.public org.apache.lenya.ac.Credential[] getCredentials()
getCredentials in interface org.apache.lenya.ac.Policy
public org.apache.lenya.ac.Credential getCredential(org.apache.lenya.ac.Accreditable accreditable,
org.apache.lenya.ac.Role role)
accreditable - An accreditable.role -
public boolean isSSLProtected()
throws org.apache.lenya.ac.AccessControlException
isSSLProtected in interface org.apache.lenya.ac.Policyorg.apache.lenya.ac.AccessControlExceptionPolicy.isSSLProtected()public void setSSL(boolean ssl)
setSSL in interface org.apache.lenya.ac.ModifiablePolicyssl - A boolean value.
public boolean isEmpty()
throws org.apache.lenya.ac.AccessControlException
isEmpty in interface org.apache.lenya.ac.Policyorg.apache.lenya.ac.AccessControlExceptionPolicy.isEmpty()
protected void removeCredential(org.apache.lenya.ac.Credential credential)
throws org.apache.lenya.ac.AccessControlException
credential - The credential to remove.
org.apache.lenya.ac.AccessControlException - If the credential does not exist.
public void removeRoles(org.apache.lenya.ac.Accreditable accreditable)
throws org.apache.lenya.ac.AccessControlException
removeRoles in interface org.apache.lenya.ac.ModifiablePolicyaccreditable - The accreditable to remove all roles for.
org.apache.lenya.ac.AccessControlException - If no credential exists for this
accreditable.
public org.apache.lenya.ac.Credential[] getCredentials(org.apache.lenya.ac.Identity identity)
throws org.apache.lenya.ac.AccessControlException
getCredentials in interface org.apache.lenya.ac.Policyorg.apache.lenya.ac.AccessControlException
public void moveRoleDown(org.apache.lenya.ac.Accreditable accreditable,
org.apache.lenya.ac.Role role)
throws org.apache.lenya.ac.AccessControlException
moveRoleDown in interface org.apache.lenya.ac.ModifiablePolicyorg.apache.lenya.ac.AccessControlException
public void moveRoleUp(org.apache.lenya.ac.Accreditable accreditable,
org.apache.lenya.ac.Role role)
throws org.apache.lenya.ac.AccessControlException
moveRoleUp in interface org.apache.lenya.ac.ModifiablePolicyorg.apache.lenya.ac.AccessControlException
public int check(org.apache.lenya.ac.Identity identity,
org.apache.lenya.ac.Role role)
throws org.apache.lenya.ac.AccessControlException
check in interface org.apache.lenya.ac.Policyorg.apache.lenya.ac.AccessControlException
protected boolean matches(org.apache.lenya.ac.Identity identity,
org.apache.lenya.ac.Accreditable accreditable)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||