Interface PersistenceStrategy
-
- All Known Implementing Classes:
FilePersistenceStrategy
public interface PersistenceStrategyInterface for anIdentitypersistence strategy (file, db, etc.).- Version:
- $Revision: 1.1 $
- Author:
- Marcus Moyses
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IdentitygetIdentity(String name)Retrieves anIdentityfrom the backend.IdentitypersistIdentity(Identity identity)Persists theIdentityin the backend.booleanremoveIdentity(Identity identity)Removes anIdentityfrom the backend.IdentityupdateIdentity(Identity identity)Updates theIdentityin the backend.
-
-
-
Method Detail
-
persistIdentity
Identity persistIdentity(Identity identity)
Persists theIdentityin the backend.- Parameters:
identity-Identityto be persisted.- Returns:
- the persisted
Identityornullif persistence failed.
-
getIdentity
Identity getIdentity(String name)
Retrieves anIdentityfrom the backend.- Parameters:
name- unique name of theIdentity.- Returns:
- the
Identityornullif not found.
-
updateIdentity
Identity updateIdentity(Identity identity)
Updates theIdentityin the backend.- Parameters:
identity-Identityto be updated.- Returns:
- the updated
Identityornullif the update was not successful.
-
removeIdentity
boolean removeIdentity(Identity identity)
Removes anIdentityfrom the backend.- Parameters:
identity-Identityto be removed.- Returns:
trueif successfully removed,falseotherwise.
-
-