|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.terracotta.management.user.dao.impl.IniFileUserInfoDao
public final class IniFileUserInfoDao
An implementation of UserInfoDao that uses a file in the Shiro Ini format as a datastore.
com.tc.management.security.ini. If that JVM property is not set, it will look
to ${user.home}/.tc/mgmt/security.ini.
| Constructor Summary | |
|---|---|
IniFileUserInfoDao()
|
|
IniFileUserInfoDao(File iniFile)
A constructor that allows the ini file location used to be explicitly set. |
|
IniFileUserInfoDao(File iniFile,
boolean createFile)
A constructor that allows the ini file location used to be explicitly set. |
|
| Method Summary | |
|---|---|
void |
create(UserInfo user)
Create the submitted obj. |
void |
createOrUpdate(UserInfo user)
Create or update the submitted obj. |
void |
delete(UserInfo user)
Deletes the submitted obj |
void |
evict(UserInfo user)
Evicts the obj from persistent cache. |
void |
flush()
Synchronizes persistence layer's state with the datastore. |
UserInfo |
getById(String username)
Returns the obj T with the given id, or null if there is no such entity. |
boolean |
hasUserInfos()
Determines whether or not UserInfo objects are currently available. |
void |
truncate()
Truncates the datastore. |
void |
validate(boolean establish)
Validates the underlying datastore. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IniFileUserInfoDao()
throws DataAccessException
DataAccessException
public IniFileUserInfoDao(File iniFile)
throws DataAccessException
iniFile - the file holding security data
DataAccessException
public IniFileUserInfoDao(File iniFile,
boolean createFile)
throws DataAccessException
iniFile - the file holding security datacreateFile - will create the file, if not already existent
DataAccessException| Method Detail |
|---|
public UserInfo getById(String username)
throws DataAccessException
getById in interface GenericDao<UserInfo,String>username - the id of the entity to return
DataAccessException
public void create(UserInfo user)
throws DataAccessException
create in interface GenericDao<UserInfo,String>user - obj to be created
DataAccessException
public void createOrUpdate(UserInfo user)
throws DataAccessException
createOrUpdate in interface GenericDao<UserInfo,String>user - the obj to create or update.
DataAccessException
public void delete(UserInfo user)
throws DataAccessException
delete in interface GenericDao<UserInfo,String>user - obj to delete
DataAccessExceptionpublic void flush()
flush in interface GenericDao<UserInfo,String>public void evict(UserInfo user)
evict in interface GenericDao<UserInfo,String>user - the obj to evict
public boolean hasUserInfos()
throws DataAccessException
UserInfo objects are currently available.
hasUserInfos in interface UserInfoDaoUserInfo objects are available, false if not
DataAccessException - if the store cannot be accessed to make the determination
public void truncate()
throws DataAccessException
UserInfoDao
truncate in interface UserInfoDaoDataAccessException - if the store cannot be truncated
public void validate(boolean establish)
throws DataAccessException
validate in interface UserInfoDaoestablish - a boolean value indicating whether or not an attempt should be made to try and setup the
underlying datastore for UserInfo objects if it doesn't already exist. If true, the store
will be established if possible in the event that validation fails.
DataAccessException - if the could not be established
DatastoreNotFoundException - if the store cannot be validated
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||