Interface AccessAssertion

All Superinterfaces:
ConfigurationObject
All Known Implementing Classes:
AlwaysAllowAssertion, AndAccessAssertion, RoleAccessAssertion

public interface AccessAssertion extends ConfigurationObject
An access assertion is a check that the current user has particular access/properties to allow access to a particular resource like a template or completed report.

All implementations must be serializable.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    assertAccess(String resourceDescription, Object protectedResource)
    Checks that the user can access the resource.
    Deep copy of this access assertion.
    org.json.JSONObject
    Encode the assertion as JSON for later loading.
    void
    unmarshal(org.json.JSONObject encodedAssertion)
    Load the assertion properties from the JSON data.

    Methods inherited from interface org.mapfish.print.config.ConfigurationObject

    validate
  • Method Details

    • assertAccess

      void assertAccess(String resourceDescription, Object protectedResource)
      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.

      Parameters:
      resourceDescription - a string describing the resource for logging and exception throwing purposes
      protectedResource - the resource being protected.
    • marshal

      org.json.JSONObject marshal()
      Encode the assertion as JSON for later loading. Each call should return a unique JSON object.
    • unmarshal

      void unmarshal(org.json.JSONObject encodedAssertion)
      Load the assertion properties from the JSON data.
      Parameters:
      encodedAssertion - the assertion encoded as JSON.
    • copy

      Deep copy of this access assertion.
      Returns:
      the copy