Class CmsUpdateDBCmsUsers

    • Constructor Detail

      • CmsUpdateDBCmsUsers

        public CmsUpdateDBCmsUsers()
                            throws java.io.IOException
        Default constructor.

        Throws:
        java.io.IOException - if the default sql queries property file could not be read
    • Method Detail

      • addUserDateCreated

        protected void addUserDateCreated​(CmsSetupDb dbCon)
                                   throws java.sql.SQLException
        Adds the new column USER_DATECREATED to the CMS_USERS table.

        Parameters:
        dbCon - the db connection interface
        Throws:
        java.sql.SQLException - if something goes wrong
      • addWebusersToGroup

        protected void addWebusersToGroup​(CmsSetupDb dbCon,
                                          org.opencms.util.CmsUUID id)
                                   throws java.sql.SQLException
        Adds all webusers to the new previously created webusers group.

        Parameters:
        dbCon - the db connection interface
        id - the id of the new webusers group
        Throws:
        java.sql.SQLException - if something goes wrong
      • checkUserDataTable

        protected boolean checkUserDataTable​(CmsSetupDb dbCon)
        Checks if the CMS_USERDATA table exists.

        Parameters:
        dbCon - the db connection interface
        Returns:
        true if it exists, false if not.
      • createUserDataTable

        protected void createUserDataTable​(CmsSetupDb dbCon)
                                    throws java.sql.SQLException
        Creates the CMS_USERDATA table if it does not exist yet.

        Parameters:
        dbCon - the db connection interface
        Throws:
        java.sql.SQLException - if soemthing goes wrong
      • createWebusersGroup

        protected org.opencms.util.CmsUUID createWebusersGroup​(CmsSetupDb dbCon)
                                                        throws java.sql.SQLException
        creates a new group for the webusers.

        Parameters:
        dbCon - the db connection interface
        Returns:
        the id of the new generated group
        Throws:
        java.sql.SQLException - if something goes wrong
      • removeUnnecessaryColumns

        protected void removeUnnecessaryColumns​(CmsSetupDb dbCon)
                                         throws java.sql.SQLException
        Removes the columns USER_INFO, USER_ADDRESS, USER_DESCRIPTION and USER_TYPE from the CMS_USERS table.

        Parameters:
        dbCon - the db connection interface
        Throws:
        java.sql.SQLException - if something goes wrong
      • writeAdditionalUserInfo

        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.

        Parameters:
        dbCon - the db connection interface
        id - the user id
        additionalInfo - the additional info of the user
      • writeUserInfo

        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.

        Parameters:
        dbCon - the db connection interface
        id - the user id
        key - the data key
        value - the data value