public class FilePersistenceStrategy extends Object implements PersistenceStrategy
PersistenceStrategy that serializes the
Identity to a file.| Constructor and Description |
|---|
FilePersistenceStrategy(String path)
Create a new FilePersistenceStrategy.
|
| Modifier and Type | Method and Description |
|---|---|
Identity |
getIdentity(String name)
Retrieves an
Identity from the backend. |
Identity |
persistIdentity(Identity identity)
Persists the
Identity in the backend. |
boolean |
removeIdentity(Identity identity)
Removes an
Identity from the backend. |
Identity |
updateIdentity(Identity identity)
Updates the
Identity in the backend. |
public FilePersistenceStrategy(String path)
path - directory where the files will be stored.public Identity persistIdentity(Identity identity)
PersistenceStrategyIdentity in the backend.persistIdentity in interface PersistenceStrategyidentity - Identity to be persisted.Identity or null if persistence failed.PersistenceStrategy.persistIdentity(Identity).public Identity getIdentity(String name)
PersistenceStrategyIdentity from the backend.getIdentity in interface PersistenceStrategyname - unique name of the Identity.Identity or null if not found.PersistenceStrategy.getIdentity(String).public boolean removeIdentity(Identity identity)
PersistenceStrategyIdentity from the backend.removeIdentity in interface PersistenceStrategyidentity - Identity to be removed.true if successfully removed, false otherwise.PersistenceStrategy.removeIdentity(Identity).public Identity updateIdentity(Identity identity)
PersistenceStrategyIdentity in the backend.updateIdentity in interface PersistenceStrategyidentity - Identity to be updated.Identity or null if the update was not successful.PersistenceStrategy.updateIdentity(Identity).Copyright © 2017 JBoss by Red Hat. All rights reserved.