public final class AndAccessAssertion extends java.lang.Object implements AccessAssertion
| Constructor and Description |
|---|
AndAccessAssertion() |
| Modifier and Type | Method and Description |
|---|---|
void |
assertAccess(java.lang.String resourceDescription,
java.lang.Object protectedResource)
Checks that the user can access the resource.
|
AccessAssertion |
copy()
Deep copy of this access assertion.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
org.json.JSONObject |
marshal()
Encode the assertion as JSON for later loading.
|
void |
setPredicates(AccessAssertion... predicates)
Set all the Predicates/AccessAssertion that have to all pass in order for this assertion to pass.
|
void |
unmarshal(org.json.JSONObject encodedAssertion)
Load the assertion properties from the JSON data.
|
void |
validate(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
validate that the configuration was correct.
|
public void setPredicates(@Nonnull
AccessAssertion... predicates)
An exception is thrown if this method is called more than once.
predicates - the Predicates/AccessAssertionpublic void assertAccess(java.lang.String resourceDescription,
java.lang.Object protectedResource)
AccessAssertionAuthenticationCredentialsNotFoundException if the user has
not logged in or supplied credentials.
Will throw AccessDeniedException if the user is logged in but may not access
the resource.assertAccess in interface AccessAssertionresourceDescription - a string describing the resource for logging and exception throwing purposesprotectedResource - the resource being protected.public org.json.JSONObject marshal()
AccessAssertionmarshal in interface AccessAssertionpublic void unmarshal(org.json.JSONObject encodedAssertion)
AccessAssertionunmarshal in interface AccessAssertionencodedAssertion - the assertion encoded as JSON.public void validate(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
ConfigurationObjectvalidate in interface ConfigurationObjectvalidationErrors - a list to add any detected errors to.configuration - the containing configurationpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic AccessAssertion copy()
AccessAssertioncopy in interface AccessAssertion