Interface AccessAssertion

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method 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.
      org.json.JSONObject marshal()
      Encode the assertion as JSON for later loading.
      void unmarshal​(org.json.JSONObject encodedAssertion)
      Load the assertion properties from the JSON data.
    • Method Detail

      • assertAccess

        void assertAccess​(java.lang.String resourceDescription,
                          java.lang.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

        AccessAssertion copy()
        Deep copy of this access assertion.
        Returns:
        the copy