Class TDIPropertiesImpl

  • All Implemented Interfaces:
    TDIProperties, java.io.Serializable, java.rmi.Remote

    public class TDIPropertiesImpl
    extends APIRemoteObject
    implements TDIProperties
    Wrapper API to expose the functionality available from com.ibm.di.config.interfaces.TDIProperties.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.rmi.server.RemoteObject

        ref
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPropertyStore​(PropertyStoreConfig config)
      Adds a property store to the end of the list of TDI-P's list of property stores.
      void commit()
      Does a commit on all property stores.
      static TDIPropertiesImpl createInstance​(TDIProperties localTDIP, SessionImpl aSession)
      Creates TDIPropertiesImpl instance.
      TDIPropertyStore getDefaultStore()
      Returns the default property store.
      TDIPropertyStore getPasswordStore()
      Returns the password store.
      java.lang.Object getProperty​(java.lang.String key)
      Gets the property value from the property store chosen by TDIProperties.
      java.lang.Object getProperty​(java.lang.String propertyStoreName, java.lang.String key)
      Returns the property value from the named property store.
      TDIPropertyStore getPropertyStore​(java.lang.String name)
      Returns the named property store.
      java.lang.String[] getPropertyStoreKeys​(java.lang.String propertyStoreName)
      Returns an array containing all the property keys in the named property store.
      java.util.List<java.lang.String> getPropertyStoreNames()
      Returns a list of property store names in use by TDI-P.
      void insertPropertyStore​(PropertyStoreConfig config, int atIndex)
      Inserts a connector interface at the given index.
      boolean isPropertyEncrypted​(java.lang.String propertyStoreName, java.lang.String key)
      Returns whether specified property is encrypted or not.
      void removeProperty​(java.lang.String propertyStoreName, java.lang.String key)
      Removes a property in the named property store.
      void removePropertyStore​(java.lang.String propertyStoreName)
      Removes a property store from TDI-P.
      void setDefaultStore​(TDIPropertyStore defaultStore)
      Sets the default property store.
      void setPasswordStore​(TDIPropertyStore passwordStore)
      Sets the password store.
      TDIPropertyStore setProperty​(java.lang.String key, java.lang.Object value)
      Sets the property in the property store chosen by TDIProperties.
      TDIPropertyStore setProperty​(java.lang.String key, java.lang.Object value, boolean protect)
      Sets the property in the property store chosen by TDIProperties.
      void setProperty​(java.lang.String propertyStoreName, java.lang.String key, java.lang.Object value)
      Sets the property in the named property store.
      void setProperty​(java.lang.String propertyStoreName, java.lang.String key, java.lang.Object value, boolean protect)
      Sets the property in the named property store.
      java.lang.String trimKey​(java.lang.String key)
      Trims the key from a given string.
      • Methods inherited from class java.rmi.server.UnicastRemoteObject

        clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
      • Methods inherited from class java.rmi.server.RemoteServer

        getClientHost, getLog, setLog
      • Methods inherited from class java.rmi.server.RemoteObject

        equals, getRef, hashCode, toString, toStub
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • commit

        public void commit()
                    throws java.rmi.RemoteException,
                           java.lang.Exception
        Does a commit on all property stores.
        Specified by:
        commit in interface TDIProperties
        Throws:
        java.rmi.RemoteException - if a communication-related exception occurs.
        java.lang.Exception - if Runtime or Security exception occurs
      • getProperty

        public java.lang.Object getProperty​(java.lang.String key)
                                     throws java.rmi.RemoteException,
                                            java.lang.Exception
        Gets the property value from the property store chosen by TDIProperties.
        Specified by:
        getProperty in interface TDIProperties
        Parameters:
        key - The property name
        Returns:
        The property value
        Throws:
        java.rmi.RemoteException - if a communication-related exception occurs.
        java.lang.Exception - if Runtime or Security exception occurs
      • setProperty

        public TDIPropertyStore setProperty​(java.lang.String key,
                                            java.lang.Object value)
                                     throws java.rmi.RemoteException,
                                            java.lang.Exception
        Sets the property in the property store chosen by TDIProperties.
        Specified by:
        setProperty in interface TDIProperties
        Parameters:
        key - The property name
        value - The new property value
        Returns:
        the TDIPropertyStore to which the key/value pair was written
        Throws:
        java.rmi.RemoteException - if a communication-related exception occurs.
        java.lang.Exception - if Runtime or Security exception occurs
      • setProperty

        public TDIPropertyStore setProperty​(java.lang.String key,
                                            java.lang.Object value,
                                            boolean protect)
                                     throws java.rmi.RemoteException,
                                            java.lang.Exception
        Sets the property in the property store chosen by TDIProperties.
        Specified by:
        setProperty in interface TDIProperties
        Parameters:
        key - The property name
        value - The new property value
        protect - True if value should be protected (driver dependent)
        Returns:
        the TDIPropertyStore to which the key/value pair was written
        Throws:
        java.rmi.RemoteException - if a communication-related exception occurs.
        java.lang.Exception - if Runtime or Security exception occurs
      • removeProperty

        public void removeProperty​(java.lang.String propertyStoreName,
                                   java.lang.String key)
                            throws java.rmi.RemoteException,
                                   java.lang.Exception
        Removes a property in the named property store.
        Specified by:
        removeProperty in interface TDIProperties
        Parameters:
        propertyStoreName - The name of the property store
        key - The property to delete
        Throws:
        java.rmi.RemoteException - if a communication-related exception occurs.
        java.lang.Exception - if Runtime or Security exception occurs
      • getProperty

        public java.lang.Object getProperty​(java.lang.String propertyStoreName,
                                            java.lang.String key)
                                     throws java.rmi.RemoteException,
                                            java.lang.Exception
        Returns the property value from the named property store.
        Specified by:
        getProperty in interface TDIProperties
        Parameters:
        propertyStoreName - The name of the property store
        key - The property value
        Returns:
        The property value
        Throws:
        java.rmi.RemoteException - if a communication-related exception occurs.
        java.lang.Exception - if Runtime or Security exception occurs
      • setProperty

        public void setProperty​(java.lang.String propertyStoreName,
                                java.lang.String key,
                                java.lang.Object value)
                         throws java.rmi.RemoteException,
                                java.lang.Exception
        Sets the property in the named property store.
        Specified by:
        setProperty in interface TDIProperties
        Parameters:
        propertyStoreName - The name of the property store
        key - The property name
        value - The new property value
        Throws:
        java.rmi.RemoteException - if a communication-related exception occurs.
        java.lang.Exception - if Runtime or Security exception occurs
      • getPropertyStoreKeys

        public java.lang.String[] getPropertyStoreKeys​(java.lang.String propertyStoreName)
                                                throws java.rmi.RemoteException,
                                                       java.lang.Exception
        Returns an array containing all the property keys in the named property store.
        Specified by:
        getPropertyStoreKeys in interface TDIProperties
        Parameters:
        propertyStoreName - The name of the property store
        Returns:
        The propertyStoreKeys value
        Throws:
        java.rmi.RemoteException - if a communication-related exception occurs.
        java.lang.Exception - if Runtime or Security exception occurs
      • addPropertyStore

        public void addPropertyStore​(PropertyStoreConfig config)
                              throws java.rmi.RemoteException,
                                     java.lang.Exception
        Adds a property store to the end of the list of TDI-P's list of property stores.
        Specified by:
        addPropertyStore in interface TDIProperties
        Parameters:
        config - The property store configuration
        Throws:
        java.rmi.RemoteException - if a communication-related exception occurs.
        java.lang.Exception - if Runtime or Security exception occurs
      • insertPropertyStore

        public void insertPropertyStore​(PropertyStoreConfig config,
                                        int atIndex)
                                 throws java.rmi.RemoteException,
                                        java.lang.Exception
        Inserts a connector interface at the given index. See addPropertyStore() for a description of parameters.
        Specified by:
        insertPropertyStore in interface TDIProperties
        Parameters:
        config - The property store configuration
        atIndex - The position where the new connector is placed (-1 = END, 0 = First)
        Throws:
        java.rmi.RemoteException - if a communication-related exception occurs.
        java.lang.Exception - if Runtime or Security exception occurs
      • removePropertyStore

        public void removePropertyStore​(java.lang.String propertyStoreName)
                                 throws java.rmi.RemoteException,
                                        java.lang.Exception
        Removes a property store from TDI-P. The connector interface is closed and then removed.
        Specified by:
        removePropertyStore in interface TDIProperties
        Parameters:
        propertyStoreName - The name of the property store
        Throws:
        java.rmi.RemoteException - if a communication-related exception occurs.
        java.lang.Exception - if Runtime or Security exception occurs
      • getPropertyStoreNames

        public java.util.List<java.lang.String> getPropertyStoreNames()
                                                               throws java.lang.Exception,
                                                                      java.rmi.RemoteException
        Returns a list of property store names in use by TDI-P.
        Specified by:
        getPropertyStoreNames in interface TDIProperties
        Returns:
        The propertyStoreNames value
        Throws:
        java.lang.Exception - if Runtime or Security exception occurs
        java.rmi.RemoteException - if a communication-related exception occurs.
      • getDefaultStore

        public TDIPropertyStore getDefaultStore()
                                         throws java.lang.Exception,
                                                java.rmi.RemoteException
        Returns the default property store.
        Specified by:
        getDefaultStore in interface TDIProperties
        Returns:
        the default property store
        Throws:
        java.lang.Exception - if Runtime or Security exception occurs
        java.rmi.RemoteException - if a communication-related exception occurs.
      • setDefaultStore

        public void setDefaultStore​(TDIPropertyStore defaultStore)
                             throws java.lang.Exception,
                                    java.rmi.RemoteException
        Sets the default property store.
        Specified by:
        setDefaultStore in interface TDIProperties
        Parameters:
        defaultStore - the new default property store
        Throws:
        java.lang.Exception - if Runtime or Security exception occurs
        java.rmi.RemoteException - if a communication-related exception occurs.
      • getPasswordStore

        public TDIPropertyStore getPasswordStore()
                                          throws java.lang.Exception,
                                                 java.rmi.RemoteException
        Returns the password store.
        Specified by:
        getPasswordStore in interface TDIProperties
        Returns:
        the password store
        Throws:
        java.lang.Exception - if Runtime or Security exception occurs
        java.rmi.RemoteException - if a communication-related exception occurs.
      • setPasswordStore

        public void setPasswordStore​(TDIPropertyStore passwordStore)
                              throws java.lang.Exception,
                                     java.rmi.RemoteException
        Sets the password store.
        Specified by:
        setPasswordStore in interface TDIProperties
        Parameters:
        passwordStore - the new password store
        Throws:
        java.lang.Exception - if Runtime or Security exception occurs
        java.rmi.RemoteException - if a communication-related exception occurs.
      • getPropertyStore

        public TDIPropertyStore getPropertyStore​(java.lang.String name)
                                          throws java.lang.Exception,
                                                 java.rmi.RemoteException
        Returns the named property store.
        Specified by:
        getPropertyStore in interface TDIProperties
        Parameters:
        name - the name of the property store
        Returns:
        the TDIPropertyStore with specified name
        Throws:
        java.lang.Exception - if Runtime or Security exception occurs
        java.rmi.RemoteException - if a communication-related exception occurs.
      • trimKey

        public java.lang.String trimKey​(java.lang.String key)
                                 throws java.lang.Exception,
                                        java.rmi.RemoteException
        Trims the key from a given string. For example trimKey("greeting:Hello, world!") will return the following string: "Hello, world!".
        Specified by:
        trimKey in interface TDIProperties
        Parameters:
        key - a string representing key:value pair
        Returns:
        string containing only the value
        Throws:
        java.lang.Exception - if Runtime or Security exception occurs
        java.rmi.RemoteException - if a communication-related exception occurs.
      • setProperty

        public void setProperty​(java.lang.String propertyStoreName,
                                java.lang.String key,
                                java.lang.Object value,
                                boolean protect)
                         throws java.rmi.RemoteException,
                                java.lang.Exception
        Sets the property in the named property store.
        Specified by:
        setProperty in interface TDIProperties
        Parameters:
        propertyStoreName - The name of the property store
        key - The property name
        value - The new property value
        protect - True if value should be protected (driver dependent)
        Throws:
        java.rmi.RemoteException - if a communication-related exception occurs.
        java.lang.Exception - if Runtime or Security exception occurs
      • isPropertyEncrypted

        public boolean isPropertyEncrypted​(java.lang.String propertyStoreName,
                                           java.lang.String key)
                                    throws java.lang.Exception,
                                           java.rmi.RemoteException
        Returns whether specified property is encrypted or not.
        Specified by:
        isPropertyEncrypted in interface TDIProperties
        Parameters:
        propertyStoreName - The name of the property store
        key - The property value
        Returns:
        true if this property is encrypted; false otherwise
        Throws:
        java.lang.Exception
        java.rmi.RemoteException - if a communication-related exception occurs.
      • createInstance

        public static TDIPropertiesImpl createInstance​(TDIProperties localTDIP,
                                                       SessionImpl aSession)
                                                throws DIException,
                                                       java.rmi.RemoteException
        Creates TDIPropertiesImpl instance.
        Parameters:
        localTDIP - the local TDIProperties
        aSession - the SessionImpl object
        Returns:
        TDIPropertiesImpl object
        Throws:
        DIException - if Runtime or Security exception occurs.
        java.rmi.RemoteException - if a communication-related exception occurs.