Class AlwaysAllowAssertion

java.lang.Object
org.mapfish.print.config.access.AlwaysAllowAssertion
All Implemented Interfaces:
AccessAssertion, ConfigurationObject

public final class AlwaysAllowAssertion extends Object implements AccessAssertion
This assertion always allows access.
  • Field Details

    • INSTANCE

      public static final AlwaysAllowAssertion INSTANCE
      A public instance that can be used by all resource in the default case.
  • Constructor Details

    • AlwaysAllowAssertion

      public AlwaysAllowAssertion()
  • Method Details

    • assertAccess

      public void assertAccess(String resourceDescription, Object protectedResource)
      Description copied from interface: AccessAssertion
      Checks that the user can access the resource.

      Will throw AuthenticationCredentialsNotFoundException 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.

      Specified by:
      assertAccess in interface AccessAssertion
      Parameters:
      resourceDescription - a string describing the resource for logging and exception throwing purposes
      protectedResource - the resource being protected.
    • marshal

      public org.json.JSONObject marshal()
      Description copied from interface: AccessAssertion
      Encode the assertion as JSON for later loading. Each call should return a unique JSON object.
      Specified by:
      marshal in interface AccessAssertion
    • unmarshal

      public void unmarshal(org.json.JSONObject encodedAssertion)
      Description copied from interface: AccessAssertion
      Load the assertion properties from the JSON data.
      Specified by:
      unmarshal in interface AccessAssertion
      Parameters:
      encodedAssertion - the assertion encoded as JSON.
    • validate

      public void validate(List<Throwable> validationErrors, Configuration configuration)
      Description copied from interface: ConfigurationObject
      validate that the configuration was correct.
      Specified by:
      validate in interface ConfigurationObject
      Parameters:
      validationErrors - a list to add any detected errors to.
      configuration - the containing configuration
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • copy

      public AccessAssertion copy()
      Description copied from interface: AccessAssertion
      Deep copy of this access assertion.
      Specified by:
      copy in interface AccessAssertion
      Returns:
      the copy