com.ibm.di.api.remote
Interface TDIProperties

All Superinterfaces:
Remote
All Known Implementing Classes:
TDIPropertiesImpl

public interface TDIProperties
extends Remote

Remote Server API interface to TDIProperties. Wrapper API to expose the functionality available from com.ibm.di.config.interfaces.TDIProperties

See Also:
TDIProperties

Method Summary
 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.
 TDIPropertyStore getDefaultStore()
          Returns the default property store.
 TDIPropertyStore getPasswordStore()
          Returns the password store.
 Object getProperty(String key)
          Gets the property value from the property store chosen by TDIProperties.
 Object getProperty(String propertyStoreName, String key)
          Returns the property value from the named property store.
 TDIPropertyStore getPropertyStore(String name)
          Returns the named property store.
 String[] getPropertyStoreKeys(String propertyStoreName)
          Returns an array containing all the property keys in the named property store.
 List 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(String propertyStoreName, String key)
          Returns whether specified property is encrypted or not.
 void removeProperty(String propertyStoreName, String key)
          Removes a property in the named property store.
 void removePropertyStore(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(String key, Object value)
          Sets the property in the property store chosen by TDIProperties.
 TDIPropertyStore setProperty(String key, Object value, boolean protect)
          Sets the property in the property store chosen by TDIProperties.
 void setProperty(String propertyStoreName, String key, Object value)
          Sets the property in the named property store.
 void setProperty(String propertyStoreName, String key, Object value, boolean protect)
          Sets the property in the named property store.
 String trimKey(String key)
          Trims the key from a given string.
 

Method Detail

commit

void commit()
            throws RemoteException,
                   Exception
Does a commit on all property stores.

Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

getProperty

Object getProperty(String key)
                   throws RemoteException,
                          Exception
Gets the property value from the property store chosen by TDIProperties.

Parameters:
key - The property name
Returns:
The property value
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

getProperty

Object getProperty(String propertyStoreName,
                   String key)
                   throws RemoteException,
                          Exception
Returns the property value from the named property store.

Parameters:
propertyStoreName - The name of the property store
key - The property value
Returns:
The property value
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

getPropertyStoreKeys

String[] getPropertyStoreKeys(String propertyStoreName)
                              throws RemoteException,
                                     Exception
Returns an array containing all the property keys in the named property store.

Parameters:
propertyStoreName - The name of the property store
Returns:
The propertyStoreKeys value
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

setProperty

TDIPropertyStore setProperty(String key,
                             Object value)
                             throws RemoteException,
                                    Exception
Sets the property in the property store chosen by TDIProperties.

Parameters:
key - The property name
value - The new property value
Returns:
the TDIPropertyStore to which the key/value pair was written
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

setProperty

TDIPropertyStore setProperty(String key,
                             Object value,
                             boolean protect)
                             throws RemoteException,
                                    Exception
Sets the property in the property store chosen by 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:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

setProperty

void setProperty(String propertyStoreName,
                 String key,
                 Object value)
                 throws RemoteException,
                        Exception
Sets the property in the named property store.

Parameters:
propertyStoreName - The name of the property store
key - The property name
value - The new property value
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

setProperty

void setProperty(String propertyStoreName,
                 String key,
                 Object value,
                 boolean protect)
                 throws RemoteException,
                        Exception
Sets the property in the named property store.

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:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

removeProperty

void removeProperty(String propertyStoreName,
                    String key)
                    throws RemoteException,
                           Exception
Removes a property in the named property store.

Parameters:
propertyStoreName - The name of the property store
key - The property to delete
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

addPropertyStore

void addPropertyStore(PropertyStoreConfig config)
                      throws RemoteException,
                             Exception
Adds a property store to the end of the list of TDI-P's list of property stores.

Parameters:
config - The property store configuration
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

insertPropertyStore

void insertPropertyStore(PropertyStoreConfig config,
                         int atIndex)
                         throws RemoteException,
                                Exception
Inserts a connector interface at the given index. See addPropertyStore() for a description of parameters.

Parameters:
config - The property store configuration
atIndex - The position where the new connector is placed (-1 = END, 0 = First)
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

removePropertyStore

void removePropertyStore(String propertyStoreName)
                         throws RemoteException,
                                Exception
Removes a property store from TDI-P. The connector interface is closed and then removed.

Parameters:
propertyStoreName - The name of the property store
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

getPropertyStoreNames

List getPropertyStoreNames()
                           throws Exception,
                                  RemoteException
Returns a list of property store names in use by TDI-P.

Returns:
The propertyStoreNames value
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

getDefaultStore

TDIPropertyStore getDefaultStore()
                                 throws Exception,
                                        RemoteException
Returns the default property store.

Returns:
the default property store
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

setDefaultStore

void setDefaultStore(TDIPropertyStore defaultStore)
                     throws Exception,
                            RemoteException
Sets the default property store.

Parameters:
defaultStore - the new default property store
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

getPasswordStore

TDIPropertyStore getPasswordStore()
                                  throws Exception,
                                         RemoteException
Returns the password store.

Returns:
the password store
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

setPasswordStore

void setPasswordStore(TDIPropertyStore passwordStore)
                      throws Exception,
                             RemoteException
Sets the password store.

Parameters:
passwordStore - the new password store
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

getPropertyStore

TDIPropertyStore getPropertyStore(String name)
                                  throws Exception,
                                         RemoteException
Returns the named property store.

Parameters:
name - the name of the property store
Returns:
the TDIPropertyStore with specified name
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

trimKey

String trimKey(String key)
               throws Exception,
                      RemoteException
Trims the key from a given string. For example trimKey("greeting:Hello, world!") will return the following string: "Hello, world!".

Parameters:
key - a string representing key:value pair
Returns:
string containing only the value
Throws:
Exception - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.

isPropertyEncrypted

boolean isPropertyEncrypted(String propertyStoreName,
                            String key)
                            throws Exception,
                                   RemoteException
Returns whether specified property is encrypted or not.

Parameters:
propertyStoreName - The name of the property store
key - The property value
Returns:
true if this property is encrypted; false otherwise
Throws:
Exception
RemoteException - if a communication-related exception occurs.