Interface PersistenceStrategy
-
- All Known Implementing Classes:
FilePersistenceStrategy
public interface PersistenceStrategy
Interface for anIdentity
persistence strategy (file, db, etc.).- Version:
- $Revision: 1.1 $
- Author:
- Marcus Moyses
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Identity
getIdentity(String name)
Retrieves anIdentity
from the backend.Identity
persistIdentity(Identity identity)
Persists theIdentity
in the backend.boolean
removeIdentity(Identity identity)
Removes anIdentity
from the backend.Identity
updateIdentity(Identity identity)
Updates theIdentity
in the backend.
-
-
-
Method Detail
-
persistIdentity
Identity persistIdentity(Identity identity)
Persists theIdentity
in the backend.- Parameters:
identity
-Identity
to be persisted.- Returns:
- the persisted
Identity
ornull
if persistence failed.
-
getIdentity
Identity getIdentity(String name)
Retrieves anIdentity
from the backend.- Parameters:
name
- unique name of theIdentity
.- Returns:
- the
Identity
ornull
if not found.
-
updateIdentity
Identity updateIdentity(Identity identity)
Updates theIdentity
in the backend.- Parameters:
identity
-Identity
to be updated.- Returns:
- the updated
Identity
ornull
if the update was not successful.
-
removeIdentity
boolean removeIdentity(Identity identity)
Removes anIdentity
from the backend.- Parameters:
identity
-Identity
to be removed.- Returns:
true
if successfully removed,false
otherwise.
-
-