com.opensymphony.user.provider.hibernate
Class HibernateBaseProvider

java.lang.Object
  extended bycom.opensymphony.user.provider.hibernate.HibernateBaseProvider
All Implemented Interfaces:
java.io.Serializable, UserProvider
Direct Known Subclasses:
HibernateAccessProvider, HibernateCredentialsProvider, HibernateProfileProvider

public abstract class HibernateBaseProvider
extends java.lang.Object
implements UserProvider

Author:
Matthew E. Porter
See Also:
Serialized Form

Field Summary
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
HibernateBaseProvider()
           
 
Method Summary
 boolean create(java.lang.String name)
          Create new Entity with given name.
 HibernateGroupDAO getGroupDAO()
           
 HibernateUserDAO getUserDAO()
           
 boolean init(java.util.Properties properties)
          Called by UserManager before any other method.
 java.util.List list()
          Returns List of names (Strings) of all Entities that can be accessed by this UserProvider If this UserProvider cannot retrieve a list of names, null is to be returned.
 boolean load(java.lang.String name, Entity.Accessor accessor)
          Load Entity.
 boolean remove(java.lang.String name)
          Create Entity with given name.
 boolean store(java.lang.String name, Entity.Accessor accessor)
          Stores changes to Entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.opensymphony.user.provider.UserProvider
flushCaches, handles
 

Field Detail

log

protected static org.apache.commons.logging.Log log
Constructor Detail

HibernateBaseProvider

public HibernateBaseProvider()
Method Detail

getGroupDAO

public HibernateGroupDAO getGroupDAO()

getUserDAO

public HibernateUserDAO getUserDAO()

create

public boolean create(java.lang.String name)
Create new Entity with given name.

Specified by:
create in interface UserProvider
Returns:
Whether entity was successfully created.

init

public boolean init(java.util.Properties properties)
Called by UserManager before any other method. Allows for UserProvider specific initialization.

Specified by:
init in interface UserProvider
Parameters:
properties - Extra properties passed across by UserManager.

list

public java.util.List list()
Returns List of names (Strings) of all Entities that can be accessed by this UserProvider If this UserProvider cannot retrieve a list of names, null is to be returned. If there are no current Entities stored by this provider, an empty List is to be returned. The order of names returned can be determined by the UserProvider (it may or may not be relevant). This List should be immutable.

Specified by:
list in interface UserProvider

load

public boolean load(java.lang.String name,
                    Entity.Accessor accessor)
Load Entity.

Specified by:
load in interface UserProvider
Returns:
Whether entity was successfully loaded.

remove

public boolean remove(java.lang.String name)
Create Entity with given name.

Specified by:
remove in interface UserProvider
Returns:
Whether entity was successfully removed.

store

public boolean store(java.lang.String name,
                     Entity.Accessor accessor)
Stores changes to Entity.

Specified by:
store in interface UserProvider
Returns:
Whether changes to entity were successfully stored.

See www.opensymphony.com for more information.