Package org.opencms.setup.db.update6to7
Class CmsUpdateDBUpdateOU
java.lang.Object
org.opencms.setup.db.A_CmsUpdateDBPart
org.opencms.setup.db.update6to7.CmsUpdateDBUpdateOU
- All Implemented Interfaces:
I_CmsUpdateDBPart
- Direct Known Subclasses:
CmsUpdateDBUpdateOU
,CmsUpdateDBUpdateOU
,CmsUpdateDBUpdateOU
This class upgrades the database tables containing new OU columns.
These tables are cms_groups cms_history_principals cms_history_projects cms_projects cms_users
- Since:
- 7.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
Constant for the GROUP_OU column.protected static final String
Constant for the PROJECT_OU column.protected static final String
Constant for the query that adds the ous to the table.protected static final String
Constant for the alteration of the table.protected static final String
Constant for the replacement in the SQL query for the columnname.protected static final String
Constant for the replacement in the SQL query for the tablename.protected static final String
Constant for the CMS_BACKUP_PROJECTS table.protected static final String
Constant for the CMS_GROUPS table.protected static final String
Constant for the CMS_USERS table.protected static final String
Constant for the CMS_PROJECTS table.protected static final String
Constant for the USER_OU column.Fields inherited from class org.opencms.setup.db.A_CmsUpdateDBPart
m_poolData, m_queries
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
findOUColumn
(CmsSetupDb dbCon, String table, String ouColumn) Checks if the column USER_OU is found in the resultset.protected void
internalExecute
(CmsSetupDb dbCon) Does the hard work.protected int
updateOUs
(CmsSetupDb dbCon, String table, String ouColumn) Updates the database tables with the new OUs if necessary for the given table.Methods inherited from class org.opencms.setup.db.A_CmsUpdateDBPart
execute, getPoolData, getPropertyFileLocation, isKeepHistory, loadQueryProperties, readQuery
-
Field Details
-
GROUP_OU_COLUMN
Constant for the GROUP_OU column.- See Also:
-
PROJECT_OU_COLUMN
Constant for the PROJECT_OU column.- See Also:
-
QUERY_ADD_OUS_TO_TABLE
Constant for the query that adds the ous to the table.- See Also:
-
QUERY_KEY_ALTER_TABLE
Constant for the alteration of the table.- See Also:
-
REPLACEMENT_COLUMNNAME
Constant for the replacement in the SQL query for the columnname.- See Also:
-
REPLACEMENT_TABLENAME
Constant for the replacement in the SQL query for the tablename.- See Also:
-
TABLE_BACKUP_PROJECTS
Constant for the CMS_BACKUP_PROJECTS table.- See Also:
-
TABLE_CMS_GROUPS
Constant for the CMS_GROUPS table.- See Also:
-
TABLE_CMS_USERS
Constant for the CMS_USERS table.- See Also:
-
TABLE_PROJECTS
Constant for the CMS_PROJECTS table.- See Also:
-
USER_OU_COLUMN
Constant for the USER_OU column.- See Also:
-
-
Constructor Details
-
CmsUpdateDBUpdateOU
Constructor.- Throws:
IOException
- if the sql queries properties file could not be read
-
-
Method Details
-
findOUColumn
Checks if the column USER_OU is found in the resultset.- Parameters:
dbCon
- the db connection interfacetable
- the table to checkouColumn
- the type of OU to find (e.g. USER_OU or GROUP_OU)- Returns:
- true if the column is in the result set, false if not
-
internalExecute
Description copied from class:A_CmsUpdateDBPart
Does the hard work.- Specified by:
internalExecute
in classA_CmsUpdateDBPart
- Parameters:
dbCon
- the db connection interface- See Also:
-
updateOUs
Updates the database tables with the new OUs if necessary for the given table.- Parameters:
dbCon
- the db connection interfacetable
- the table to updateouColumn
- the column to insert- Returns:
- true if everything worked fine, false if not
-