Package org.javlo.user
Class InternalDBUserFactory
- java.lang.Object
-
- org.javlo.user.UserFactory
-
- org.javlo.user.InternalDBUserFactory
-
- All Implemented Interfaces:
Serializable
,IUserFactory
public class InternalDBUserFactory extends UserFactory
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
DB_NAME
static Logger
logger
-
Fields inherited from class org.javlo.user.UserFactory
USER_FACTORY_KEY, userInfoList
-
Fields inherited from interface org.javlo.user.IUserFactory
AUTO_LOGIN_AGE_SEC, TOKEN_PARAM
-
-
Constructor Summary
Constructors Constructor Description InternalDBUserFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addUserInfo(IUserInfo userInfo)
User
autoLogin(javax.servlet.http.HttpServletRequest request, String login)
void
clearUserInfoList()
UserInfo
createUserInfos()
void
deleteUser(String login)
protected Connection
getConnection()
RoleWrapper
getRoleWrapper(ContentContext ctx, User user)
static InternalDBUserFactory
getTestInstance()
User
getUser(String login)
List<IUserInfo>
getUserInfoList()
IUserInfo
getUserInfos(String id)
void
init(GlobalContext globalContext, javax.servlet.http.HttpSession session)
boolean
isStandardStorage()
check if the user system use standard storage system of wcmsUser
login(javax.servlet.http.HttpServletRequest request, String login, String password)
void
mergeUserInfo(IUserInfo userInfo)
protected void
releaseConnection(Connection conn)
void
releaseUserInfoList()
void
reload(GlobalContext globalContext, javax.servlet.http.HttpSession session)
void
store()
void
updateUserInfo(IUserInfo userInfo)
-
Methods inherited from class org.javlo.user.UserFactory
addOrModifyUserInfo, adminFakeLogin, checkUserAviability, createPasswordChangeKey, createUser, createUserFactory, createUserFactory, getAllRoles, getCurrentUser, getFileName, getInternetAddress, getInternetAddress, getPasswordChangeWidthKey, getRoleList, getSessionKey, getTokenCreateIfNotExist, getUserByEmail, getUserInfoForRoles, load, login, logout, store, uploadNewAvatar, userListAsInternetAddressList
-
-
-
-
Field Detail
-
DB_NAME
public static final String DB_NAME
- See Also:
- Constant Field Values
-
logger
public static Logger logger
-
-
Method Detail
-
getConnection
protected Connection getConnection()
-
releaseConnection
protected void releaseConnection(Connection conn)
-
getTestInstance
public static final InternalDBUserFactory getTestInstance()
-
addUserInfo
public void addUserInfo(IUserInfo userInfo) throws UserAllreadyExistException
- Specified by:
addUserInfo
in interfaceIUserFactory
- Overrides:
addUserInfo
in classUserFactory
- Throws:
UserAllreadyExistException
-
autoLogin
public User autoLogin(javax.servlet.http.HttpServletRequest request, String login)
- Specified by:
autoLogin
in interfaceIUserFactory
- Overrides:
autoLogin
in classUserFactory
-
clearUserInfoList
public void clearUserInfoList()
- Specified by:
clearUserInfoList
in interfaceIUserFactory
- Overrides:
clearUserInfoList
in classUserFactory
-
createUserInfos
public UserInfo createUserInfos()
- Specified by:
createUserInfos
in interfaceIUserFactory
- Overrides:
createUserInfos
in classUserFactory
-
deleteUser
public void deleteUser(String login)
- Specified by:
deleteUser
in interfaceIUserFactory
- Overrides:
deleteUser
in classUserFactory
-
getUser
public User getUser(String login)
- Specified by:
getUser
in interfaceIUserFactory
- Overrides:
getUser
in classUserFactory
-
getUserInfoList
public List<IUserInfo> getUserInfoList()
- Specified by:
getUserInfoList
in interfaceIUserFactory
- Overrides:
getUserInfoList
in classUserFactory
-
getUserInfos
public IUserInfo getUserInfos(String id)
- Specified by:
getUserInfos
in interfaceIUserFactory
- Overrides:
getUserInfos
in classUserFactory
-
init
public void init(GlobalContext globalContext, javax.servlet.http.HttpSession session)
- Specified by:
init
in interfaceIUserFactory
- Overrides:
init
in classUserFactory
-
isStandardStorage
public boolean isStandardStorage()
Description copied from interface:IUserFactory
check if the user system use standard storage system of wcms- Specified by:
isStandardStorage
in interfaceIUserFactory
- Overrides:
isStandardStorage
in classUserFactory
- Returns:
- true if standard system is used, false else a external system is used.
-
login
public User login(javax.servlet.http.HttpServletRequest request, String login, String password)
- Specified by:
login
in interfaceIUserFactory
- Overrides:
login
in classUserFactory
-
mergeUserInfo
public void mergeUserInfo(IUserInfo userInfo)
- Specified by:
mergeUserInfo
in interfaceIUserFactory
- Overrides:
mergeUserInfo
in classUserFactory
-
releaseUserInfoList
public void releaseUserInfoList()
- Specified by:
releaseUserInfoList
in interfaceIUserFactory
- Overrides:
releaseUserInfoList
in classUserFactory
-
reload
public void reload(GlobalContext globalContext, javax.servlet.http.HttpSession session)
- Specified by:
reload
in interfaceIUserFactory
- Overrides:
reload
in classUserFactory
-
store
public void store()
- Specified by:
store
in interfaceIUserFactory
- Overrides:
store
in classUserFactory
-
updateUserInfo
public void updateUserInfo(IUserInfo userInfo)
- Specified by:
updateUserInfo
in interfaceIUserFactory
- Overrides:
updateUserInfo
in classUserFactory
-
getRoleWrapper
public RoleWrapper getRoleWrapper(ContentContext ctx, User user)
- Specified by:
getRoleWrapper
in interfaceIUserFactory
- Overrides:
getRoleWrapper
in classUserFactory
-
-