public class CmsUpdateDBCmsUsers extends A_CmsUpdateDBPart
Unnecessary colums from CMS_USERS will be deleted and the new column USER_DATECREATED is added.
限定符和类型 | 字段和说明 |
---|---|
protected static java.lang.String |
QUERY_CREATE_TABLE_USERDATA
Constant for the query to create the user data table.
|
protected static java.lang.String |
QUERY_INSERT_CMS_USERDATA
Constant for the query to insert the new user data into the new table CMS_USERDATA.
|
m_poolData, m_queries
构造器和说明 |
---|
CmsUpdateDBCmsUsers()
Default constructor.
|
限定符和类型 | 方法和说明 |
---|---|
protected void |
addUserDateCreated(CmsSetupDb dbCon)
Adds the new column USER_DATECREATED to the CMS_USERS table.
|
protected void |
addWebusersToGroup(CmsSetupDb dbCon,
CmsUUID id)
Adds all webusers to the new previously created webusers group.
|
protected boolean |
checkUserDataTable(CmsSetupDb dbCon)
Checks if the CMS_USERDATA table exists.
|
protected void |
createUserDataTable(CmsSetupDb dbCon)
Creates the CMS_USERDATA table if it does not exist yet.
|
protected CmsUUID |
createWebusersGroup(CmsSetupDb dbCon)
creates a new group for the webusers.
|
protected void |
internalExecute(CmsSetupDb dbCon)
Does the hard work.
|
protected void |
removeUnnecessaryColumns(CmsSetupDb dbCon)
Removes the columns USER_INFO, USER_ADDRESS, USER_DESCRIPTION and USER_TYPE from the CMS_USERS table.
|
protected void |
writeAdditionalUserInfo(CmsSetupDb dbCon,
java.lang.String id,
java.util.Map<java.lang.String,java.lang.Object> additionalInfo)
Writes the additional user infos to the database.
|
protected void |
writeUserInfo(CmsSetupDb dbCon,
java.lang.String id,
java.lang.String key,
java.lang.Object value)
Writes one set of additional user info (key and its value) to the CMS_USERDATA table.
|
execute, getPoolData, getPropertyFileLocation, isKeepHistory, loadQueryProperties, readQuery
protected static final java.lang.String QUERY_CREATE_TABLE_USERDATA
protected static final java.lang.String QUERY_INSERT_CMS_USERDATA
public CmsUpdateDBCmsUsers() throws java.io.IOException
java.io.IOException
- if the default sql queries property file could not be readprotected void internalExecute(CmsSetupDb dbCon)
A_CmsUpdateDBPart
internalExecute
在类中 A_CmsUpdateDBPart
dbCon
- the db connection interfaceA_CmsUpdateDBPart.internalExecute(org.opencms.setup.CmsSetupDb)
protected void addUserDateCreated(CmsSetupDb dbCon) throws java.sql.SQLException
dbCon
- the db connection interfacejava.sql.SQLException
- if something goes wrongprotected void addWebusersToGroup(CmsSetupDb dbCon, CmsUUID id) throws java.sql.SQLException
dbCon
- the db connection interfaceid
- the id of the new webusers groupjava.sql.SQLException
- if something goes wrongprotected boolean checkUserDataTable(CmsSetupDb dbCon)
dbCon
- the db connection interfaceprotected void createUserDataTable(CmsSetupDb dbCon) throws java.sql.SQLException
dbCon
- the db connection interfacejava.sql.SQLException
- if soemthing goes wrongprotected CmsUUID createWebusersGroup(CmsSetupDb dbCon) throws java.sql.SQLException
dbCon
- the db connection interfacejava.sql.SQLException
- if something goes wrongprotected void removeUnnecessaryColumns(CmsSetupDb dbCon) throws java.sql.SQLException
dbCon
- the db connection interfacejava.sql.SQLException
- if something goes wrongprotected void writeAdditionalUserInfo(CmsSetupDb dbCon, java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> additionalInfo)
dbCon
- the db connection interfaceid
- the user idadditionalInfo
- the additional info of the userprotected void writeUserInfo(CmsSetupDb dbCon, java.lang.String id, java.lang.String key, java.lang.Object value)
dbCon
- the db connection interfaceid
- the user idkey
- the data keyvalue
- the data value