Interface PersistenceStrategy

  • All Known Implementing Classes:
    FilePersistenceStrategy

    public interface PersistenceStrategy
    Interface for an Identity persistence strategy (file, db, etc.).
    Version:
    $Revision: 1.1 $
    Author:
    Marcus Moyses
    • Method Detail

      • persistIdentity

        Identity persistIdentity​(Identity identity)
        Persists the Identity in the backend.
        Parameters:
        identity - Identity to be persisted.
        Returns:
        the persisted Identity or null if persistence failed.
      • getIdentity

        Identity getIdentity​(String name)
        Retrieves an Identity from the backend.
        Parameters:
        name - unique name of the Identity.
        Returns:
        the Identity or null if not found.
      • updateIdentity

        Identity updateIdentity​(Identity identity)
        Updates the Identity in the backend.
        Parameters:
        identity - Identity to be updated.
        Returns:
        the updated Identity or null if the update was not successful.
      • removeIdentity

        boolean removeIdentity​(Identity identity)
        Removes an Identity from the backend.
        Parameters:
        identity - Identity to be removed.
        Returns:
        true if successfully removed, false otherwise.