|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.config.interfaces.TDIPropertyStore
public class TDIPropertyStore
Represents a property store
Field Summary | |
---|---|
static Log |
logger
This is the logger object used by this class and other configuration drivers. |
static String |
PROTECT_VAL_PREFIX
|
Constructor Summary | |
---|---|
TDIPropertyStore()
|
|
TDIPropertyStore(PropertyStoreConfig psc)
Constructor for the TDIPropertyStore object |
|
TDIPropertyStore(PropertyStoreConfig psc,
TDIProperties context)
Constructor for the TDIPropertyStore object |
Method Summary | |
---|---|
boolean |
accepts(String propertyName)
Returns true if we accept this propertyname. |
boolean |
canDelete()
Returns true if the connector supports Delete mode and is not readonly |
boolean |
canIterate()
Returns true if the connector supports Iterator mode |
boolean |
canRead()
Returns true if the connector supports Lookup mode |
boolean |
canWrite()
Returns true if the connector supports Update mode and is not readonly |
void |
commit()
Flushes cached changes to target system |
Iterator |
entries()
Returns an Iterator over all property Entries |
RawConnectorConfig |
getConnectionConfig()
Return the config for the underlying Connector. |
Exception |
getException()
Returns the last Exception thrown by the connector while iterating |
String |
getName()
Gets the short name of this TDIPropertyStore |
Object |
getProperty(String key)
Returns the named property |
Entry |
getPropertyEntry(String key)
Returns the Entry object for a key. |
boolean |
hasNext()
Returns true if the Iterator has more values. |
void |
initialize(TDIProperties context)
Initializes data structures. |
boolean |
isModified()
Returns true if the properties have been modified, but not saved yet |
Iterator |
keys()
Returns an Iterator over all property keys |
void |
log(String msg)
Logs a message. |
void |
logerror(String msg,
Exception err)
Logs an error message. |
Object |
next()
Return the next value from an Iterator. |
void |
reconnect()
Reinitializes the connector. |
void |
reload()
Reloads the information from the connector |
void |
remove()
Dummy method to implement Iterator. |
void |
removeProperty(String key)
Removes a named property. |
void |
setModified(boolean modified)
Sets the modified flag. |
void |
setProperty(Entry entry)
Sets a named property to the given value. |
void |
setProperty(String key,
Object value)
Sets the named property to the given value |
void |
setProperty(String key,
Object value,
boolean protect)
Sets the named property to the given value, with optional protection |
boolean |
supportsMode(String mode)
Returns true if the connector supports this mode |
void |
terminate()
Terminates the connector |
Iterator |
values()
Returns an Iterator over all property values |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Log logger
public static final String PROTECT_VAL_PREFIX
Constructor Detail |
---|
public TDIPropertyStore()
public TDIPropertyStore(PropertyStoreConfig psc) throws Exception
psc
- Configuration of the property store
Exception
- if the operation does not succeedpublic TDIPropertyStore(PropertyStoreConfig psc, TDIProperties context) throws Exception
psc
- The PropertyStoreConfigcontext
- The TDIProperties context
Exception
Method Detail |
---|
public void initialize(TDIProperties context) throws Exception
context
- The TDIProperties context. Not used.
Exception
- If any problem occurs during loading or initializing the
connector.public void log(String msg)
msg
- The message to logpublic void logerror(String msg, Exception err)
msg
- The message to logerr
- The Exceptionpublic void reload()
public void reconnect() throws Exception
Exception
- If there is any problem with initializing the connectorpublic void terminate() throws Exception
Exception
- If there is a problem with terminating the connectorpublic void commit() throws Exception
Exception
public boolean canIterate()
public boolean canWrite()
public boolean canDelete()
public boolean canRead()
public boolean accepts(String propertyName)
propertyName
- Property name to check
public String getName()
public boolean supportsMode(String mode)
mode
- The mode to check
public Object getProperty(String key) throws Exception
key
- The property name to find
Exception
- Any Exception thrown by the connectorpublic Entry getPropertyEntry(String key) throws Exception
key
- The name of the attribute to find
Exception
- Any Exception thrown by the connectorpublic void setProperty(String key, Object value) throws Exception
key
- The name of the propertyvalue
- The new property value, null means delete
Exception
- If key is missing, or any Exception thrown by the
connectorpublic void setProperty(String key, Object value, boolean protect) throws Exception
key
- The name of the propertyvalue
- The new property value, null means deleteprotect
- True if the value should be protected (encrypted)
Exception
- If key is missing, or any Exception thrown by the
connectorpublic void setProperty(Entry entry) throws Exception
entry
- The Entry object containing property name and value
Exception
- If key is missing, or any Exception thrown by the connectorpublic void removeProperty(String key) throws Exception
key
- The name of the property to remove
Exception
- If key is missing, or the Property store is readonly, or any
Exception thrown by the connectorpublic Iterator keys()
public Iterator values()
public Iterator entries()
public boolean hasNext()
hasNext
in interface Iterator
public Object next()
next
in interface Iterator
public void remove()
remove
in interface Iterator
public Exception getException()
public boolean isModified()
public void setModified(boolean modified)
public RawConnectorConfig getConnectionConfig()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |