psdi.server

Class MaxPropCache

  • java.lang.Object
    • psdi.server.MaxPropCache
    • Field Detail

      • requiredInFile

        public static java.lang.String[] requiredInFile
        Names of properties that must be specified in the properties file input to init(Properties). If any of these is not present in the properties file, an error will be thrown from init.
      • PROPLEVEL_PUBLIC

        public static java.lang.String PROPLEVEL_PUBLIC
        Maximo value for public security level from PROPSECURELEVEL domain.
      • PROPLEVEL_PRIVATE

        public static java.lang.String PROPLEVEL_PRIVATE
        Maximo value for private security level from PROPSECURELEVEL domain.
      • PROPLEVEL_SECURE

        public static java.lang.String PROPLEVEL_SECURE
      • PROPLEVEL_MTSECURE

        public static java.lang.String PROPLEVEL_MTSECURE
    • Constructor Detail

      • MaxPropCache

        public MaxPropCache()
    • Method Detail

      • init

        public void init(java.util.Properties propsFromFile)
                  throws java.lang.Exception
        Initialize all the cache objects to new and empty, and set loaded = False.
        Throws:
        java.lang.Exception
        See Also:
        MaximoCache.init()
      • override

        public void override(java.lang.String url,
                             java.lang.String user,
                             java.lang.String password,
                             java.lang.String schemaOwner)
                      throws java.lang.Exception
        Called after #init(Properties)init from CommonShell to support command-line parameters for database connectivity.
        Parameters:
        url - Override value for mxe.db.url
        user - Override value for mxe.db.user
        password - Override value for mxe.db.password
        schemaOwner - Override value for mxe.db.schemaowner
        Throws:
        java.lang.Exception
      • reloadFromFile

        public void reloadFromFile(java.util.Map envVariables)
                            throws java.lang.Exception
        Reload properties from the maximo.properties file and flush free db connections from the pool. This is used when reload key is FLUSH
        Throws:
        java.lang.Exception
        See Also:
        DBManager.reloadProperties(java.util.Properties)
      • reloadFromFile

        public void reloadFromFile()
                            throws java.lang.Exception
        Reload properties from the maximo.properties file. This is used when reload key includes !FILE! and supports use of WAS fine-grained application update of maximo.properties. The security algorithms and mxe.name cannot be reloaded.
        Throws:
        java.lang.Exception
        See Also:
        DBManager.reloadProperties(java.util.Properties)
      • getProperties

        public java.util.Properties getProperties()
        Return all properties that have been loaded into cache.
        Returns:
        Properties
      • getProperty

        public java.lang.String getProperty(java.lang.String propName)
        Return the value for a specified property name.

        If the property is not defined, this will return null. If the property is defined but has no value, this will return the empty string.

        Parameters:
        propname - Property name
      • getProperty

        public java.lang.String getProperty(java.lang.String propName,
                                            boolean checkExists)
        Return the value for a specified property name.

        If the property is not defined, this will return null. If the property is defined but has no value, this will return the empty string.

        Parameters:
        propname - Property name
      • getPropertyAsObject

        public java.lang.Object getPropertyAsObject(java.lang.String propName)
                                             throws MXException
        Return the object value for a specified property name. This will return either String, Integer or Boolean, depending on maxprop.maxtype.
        Parameters:
        propname - Property name
        Throws:
        MXException
      • getProperty

        public java.lang.String getProperty(java.lang.String propName,
                                            java.lang.String lang)
        Return the cached property value for the given language code. If the language-specific property is not defined, this will return the base value. This method is intended for retrieval of webclient settings.

        If the property is not defined, this will return null. If the property is defined but has no value, this will return the empty string.

        Parameters:
        propName - Property name
        lang - Language code
        Returns:
        Property value
      • propertyExistsInCache

        public boolean propertyExistsInCache(java.lang.String propName)
        Identifies whether the property exists in cache. This method is for use by classes that are using dynamically defined property names. Normally classes should be calling the getProperty method to get a value.
        Parameters:
        propname - Property name
        Returns:
        True if property exists in cache, else False.
      • getPublicProperty

        public java.lang.String getPublicProperty(java.lang.String propName)
      • getPublicProperty

        public java.lang.String getPublicProperty(java.lang.String propName,
                                                  java.lang.String lang)
        Return a property that is flagged as public.
        Parameters:
        propName - Property name
        lang - Language code
        Returns:
        Property value
        See Also:
        MaxPropCache.getProperty(String)
      • getProperty

        public java.lang.String getProperty(java.lang.String propName,
                                            java.lang.String lang,
                                            UserInfo userInfo,
                                            java.util.UUID uuid)
      • getProperty

        public java.lang.String getProperty(java.lang.String propName,
                                            UserInfo userInfo,
                                            java.util.UUID uuid)
      • propertyExistsInCache

        public boolean propertyExistsInCache(java.lang.String propName,
                                             java.lang.String lang)
        Identifies whether the property exists in cache. This method is for use by classes that are using dynamically defined property names. Normally classes should be calling the getProperty method to get a value.
        Parameters:
        propname - Property name
        lang - Language code. If language code is not applicable then call the method getProperty.
        Returns:
        True if property exists in cache, else False.
      • canTenantSee

        public boolean canTenantSee(java.lang.String propName)
        Returns false if propName is a hidden property (only DA and landlord can access and hidden to tenants). This method is used to prevent tenants from adding a property with the same name as hidden properties.
        Parameters:
        propName -
        Returns:
      • isEncrypted

        public boolean isEncrypted(java.lang.String propName)
        Return True if this property is flagged as "encrypted." For most properties, this will return False.
        Parameters:
        propname - Property name
        Returns:
        True if property is encrypted, else False.
      • getEncryptedProps

        public java.util.Set getEncryptedProps()
        Return the names of all the encrypted properties.
        Returns:
        Names of encrypted properties.
      • isPublic

        public boolean isPublic(java.lang.String propName)
        Return True if this property is flagged as "public." For most properties, this will return False.
        Parameters:
        propname - Property name
        Returns:
        True if property is public, else False.
      • isPrivate

        public boolean isPrivate(java.lang.String propName)
        Return True if this property is flagged as "private." For most properties, this will return False.
        Parameters:
        propname - Property name
        Returns:
        True if property is private, else False.
      • isMTSecure

        public boolean isMTSecure(java.lang.String propName)
        Return True if this property is flagged as "mtsecure." For most properties, this will return False.
        Parameters:
        propname - Property name
        Returns:
        True if property is MTSECURE, else False.
      • getPrivateProps

        public java.util.Set getPrivateProps()
        Return the names of all the private properties.
        Returns:
        Names of private properties.
      • getFilePropNames

        public java.util.Set getFilePropNames()
        Return the names of properties that were loaded from the properties file (as opposed to the database). These property values will never be overridden with values from the database or refreshed in any way after MXServer has started.
        Returns:
        Set of property names
      • singleToDoubleQuotes

        public java.lang.String singleToDoubleQuotes(java.lang.String in)
        Change single quote to two single quotes. Cloned from Util.