com.bemoko.live.platform.content.dao
Class ProfileDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
com.bemoko.commons.dao.BemokoHibernateDaoSupport<M,N>
com.bemoko.live.platform.content.dao.LiveHibernateDaoSupport<Profile,String>
com.bemoko.live.platform.content.dao.ProfileDao
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean
public class ProfileDao
- extends LiveHibernateDaoSupport<Profile,String>
| Fields inherited from class org.springframework.dao.support.DaoSupport |
logger |
| Methods inherited from class com.bemoko.commons.dao.BemokoHibernateDaoSupport |
contains, create, createAndSave, createAndSave, createAndSaveAndFlush, createAndSaveAndFlush, delete, delete, deleteAndFlush, deleteAndFlush, deleteForce, deleteForce, deleteForceAndFlush, deleteForceAndFlush, deleteWhere, deleteWhereDirect, execute, executeSQL, find, find, findFirst, findFirstWhere, findFirstWhereWithSubsetFromAll, findWhere, findWhereWithSubsetFromAll, flush, get, getCount, getCountWhere, getDomainClass, getFirstOrNull, getFromString, getIdentifierValue, getOrCreate, getOrCreateAndSave, getTableName, getValidator, initDao, isUsingQueries, load, merge, mergeAndFlush, reget, reload, save, saveAndFlush, saveOrUpdate, saveOrUpdateAndFlush, selectSQL, setUsingQueries, setValidator, sync, update, updateAndFlush, validate, validateAndSave, validateAndSaveAndFlush |
| Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport |
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
| Methods inherited from class org.springframework.dao.support.DaoSupport |
afterPropertiesSet |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProfileDao
public ProfileDao()
ProfileDao
public ProfileDao(org.hibernate.SessionFactory sessionFactory)
create
public Profile create()
- Overrides:
create in class BemokoHibernateDaoSupport<Profile,String>
setLastAccessedPersistPeriod
public void setLastAccessedPersistPeriod(int lastAccessedPersistPeriod)
- Set the time period in seconds which the last accessed time won't be
updated if the last accessed time is less than that period a go.
- Parameters:
lastAccessedPersistPeriod -
getLastAccessedPersistPeriod
public int getLastAccessedPersistPeriod()
get
public Profile get(String domain,
String containerUid)
- Load a profile from the global identity referenced by the domain and the
container UID
getFromDefaultCredentials
public Profile getFromDefaultCredentials(String containerUid)
sync
@Deprecated
public void sync(com.bemoko.live.platform.context.identity.LocalIdentity identity)
- Deprecated. sync functionality is not necessary now that profile
information is loaded within in each interaction (albeit via a
secondary layer cache)
- Sync the profile in the identity with the persistent store
- Parameters:
identity -
populateProfile
public void populateProfile(ActiveUser user,
com.bemoko.live.platform.context.LiveContextParameters contextParameters)
- Populate the active user context with user profile information. This gets
the model ready for plugins and FreeMarker.
- Parameters:
user - contextParameters -
populateProfile
public void populateProfile(com.bemoko.live.platform.context.identity.LocalIdentity identity)
updateLastAccessed
public boolean updateLastAccessed(Profile profile)
createWithDefaultCredentialsAndSave
public Profile createWithDefaultCredentialsAndSave(String username,
String password)
throws UnsupportedEncodingException,
LiveException
- Throws:
UnsupportedEncodingException
LiveException
assignDefaultCredentials
public void assignDefaultCredentials(Profile profile,
String username,
String password)
throws UnsupportedEncodingException,
LiveException
- Throws:
UnsupportedEncodingException
LiveException
createWithDefaultCredentialsAndSaveAndFlush
public Profile createWithDefaultCredentialsAndSaveAndFlush(String username,
String password)
throws UnsupportedEncodingException,
LiveException
- Throws:
UnsupportedEncodingException
LiveException
deleteWithDefaultCredentials
public void deleteWithDefaultCredentials(Profile profile)
- Delete the profile along with any credentials they may have defined in the
default authentication domain
- Parameters:
profile -
getCredentialsDao
public CredentialsDao getCredentialsDao()
setCredentialsDao
public void setCredentialsDao(CredentialsDao credentialsDao)
getGlobalIdentityDao
public GlobalIdentityDao getGlobalIdentityDao()
setGlobalIdentityDao
public void setGlobalIdentityDao(GlobalIdentityDao globalIdentityDao)