psdi.util

Class EncryptProperties

  • All Implemented Interfaces:
    UpgConstants


    public class EncryptProperties
    extends CommonShell
    This encrypts certain protected entries in the properties file and re-write the file in a partially encrypted format. If the file has already been encrypted, an error will be thrown.

    The -f argument specifies the name of the properties file. If this param is not specified, the default "maximo.properties" will be encrypted.

    The -k parameter specifies the directory of the properties file. There is no default.

    The -z parameter is optional. When the -z param is specified, the original file is renamed *.properties_org and the new file will have the original filename. When this param is not specified, the original cleartext copy of the file is simply deleted.

    • Constructor Detail

      • EncryptProperties

        public EncryptProperties()
        This constructor does nothing. Used when running from the DOS prompt.
      • EncryptProperties

        public EncryptProperties(MXServer server)
    • Method Detail

      • setupFromPropfile

        public java.lang.String setupFromPropfile(java.lang.String propfile,
                                                  java.lang.String user,
                                                  java.lang.String password,
                                                  java.lang.String url,
                                                  java.lang.String rootDirName,
                                                  java.lang.String propdir)
                                           throws java.lang.Exception
        CommonShell method overridden.
        Overrides:
        setupFromPropfile in class CommonShell
        Parameters:
        propfile - Name of properties file
        user - Username when not connecting via MXServer (optional). Must be a superuser. Defaults to mxe.db.user.
        password - Password when not connecting via MXServer (optional). Must be a superuser. Defaults to mxe.db.password.
        url - Database url (alias) (optional). Defaults to mxe.db.url.
        rootDirName - The name of the MXServer root directory.
        propdir - The name of the directory containing the properties file.
        Returns:
        Database url
        Throws:
        java.lang.Exception
      • endSetupInstance

        public void endSetupInstance(java.lang.String outdir,
                                     java.lang.String outfile,
                                     java.util.HashMap params)
                              throws java.lang.Exception
        Process -g, -z parameters, set value for upgrade and db2TextScript.
        Overrides:
        endSetupInstance in class CommonShell
        Parameters:
        outdir - Not used.
        outfile - Not used.
        params - Parameters (see class javadocs).
        Throws:
        java.lang.Exception
      • main

        public static void main(java.lang.String[] argv)
        Param -f = filename for properties file. If not specified, uses maximo.properties. Param -k is the property file directory.