org.jboss.security.identity.plugins
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 Summary
 org.jboss.security.identity.Identity getIdentity(String name)
          Retrieves an Identity from the backend.
 org.jboss.security.identity.Identity persistIdentity(org.jboss.security.identity.Identity identity)
          Persists the Identity in the backend.
 boolean removeIdentity(org.jboss.security.identity.Identity identity)
          Removes an Identity from the backend.
 org.jboss.security.identity.Identity updateIdentity(org.jboss.security.identity.Identity identity)
          Updates the Identity in the backend.
 

Method Detail

persistIdentity

org.jboss.security.identity.Identity persistIdentity(org.jboss.security.identity.Identity identity)
Persists the Identity in the backend.

Parameters:
identity - Identity to be persisted.
Returns:
the persisted Identity or null if persistence failed.

getIdentity

org.jboss.security.identity.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

org.jboss.security.identity.Identity updateIdentity(org.jboss.security.identity.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(org.jboss.security.identity.Identity identity)
Removes an Identity from the backend.

Parameters:
identity - Identity to be removed.
Returns:
true if successfully removed, false otherwise.


Copyright © 2009 JBoss Inc.. All Rights Reserved.