|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lenya.ac.impl.DefaultPolicy
public class DefaultPolicy
A DefaultPolicy is the own policy of a certain URL (not merged).
Constructor Summary | |
---|---|
DefaultPolicy()
|
Method Summary | |
---|---|
void |
addCredential(Credential credential)
Adds a credential to this policy. |
void |
addRole(Accreditable accreditable,
Role role)
Adds a role to this policy for a certain accreditable and a certain role. |
Credential |
getCredential(Accreditable accreditable)
Returns the credential for a certain accreditable. |
Credential[] |
getCredentials()
Returns the credentials of this policy. |
Role[] |
getRoles(Identity identity)
Returns all roles of a certain identity. |
boolean |
isEmpty()
Returns if the policy is empty. |
boolean |
isSSLProtected()
Returns if this policy requires SSL protection. |
protected void |
removeCredential(Credential credential)
Removes a credential. |
void |
removeRole(Accreditable accreditable,
Role role)
Removes a role from this policy for a certain accreditable and a certain role. |
void |
removeRoles(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(Credential credential)
credential
- A credential.public void addRole(Accreditable accreditable, Role role)
accreditable
- An accreditable.role
- A role.public void removeRole(Accreditable accreditable, Role role) throws AccessControlException
accreditable
- An accreditable.role
- A role.
AccessControlException
- if the accreditable-role pair is not contained.public Credential[] getCredentials()
public Role[] getRoles(Identity identity)
Policy
getRoles
in interface Policy
identity
- The identity.
Policy.getRoles(org.apache.lenya.ac.Identity)
public Credential getCredential(Accreditable accreditable)
accreditable
- An accreditable.
public boolean isSSLProtected() throws AccessControlException
Policy
isSSLProtected
in interface Policy
AccessControlException
- when something went wrong.Policy.isSSLProtected()
public void setSSL(boolean ssl)
ssl
- A boolean value.public boolean isEmpty() throws AccessControlException
Policy
isEmpty
in interface Policy
AccessControlException
- when something went wrong.Policy.isEmpty()
protected void removeCredential(Credential credential) throws AccessControlException
credential
- The credential to remove.
AccessControlException
- If the credential does not exist.public void removeRoles(Accreditable accreditable) throws AccessControlException
accreditable
- The accreditable to remove all roles for.
AccessControlException
- If no credential exists for this accreditable.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |