Class FilePersistenceStrategy

    • Constructor Detail

      • FilePersistenceStrategy

        public FilePersistenceStrategy​(String path)
        Create a new FilePersistenceStrategy.
        Parameters:
        path - directory where the files will be stored.
    • Method Detail

      • persistIdentity

        public Identity persistIdentity​(Identity identity)
        Description copied from interface: PersistenceStrategy
        Persists the Identity in the backend.
        Specified by:
        persistIdentity in interface PersistenceStrategy
        Parameters:
        identity - Identity to be persisted.
        Returns:
        the persisted Identity or null if persistence failed.
      • removeIdentity

        public boolean removeIdentity​(Identity identity)
        Description copied from interface: PersistenceStrategy
        Removes an Identity from the backend.
        Specified by:
        removeIdentity in interface PersistenceStrategy
        Parameters:
        identity - Identity to be removed.
        Returns:
        true if successfully removed, false otherwise.
      • updateIdentity

        public Identity updateIdentity​(Identity identity)
        Description copied from interface: PersistenceStrategy
        Updates the Identity in the backend.
        Specified by:
        updateIdentity in interface PersistenceStrategy
        Parameters:
        identity - Identity to be updated.
        Returns:
        the updated Identity or null if the update was not successful.