com.ibm.di.config.base
Class ConnectorConfigImpl

java.lang.Object
  extended by com.ibm.di.config.base.BaseConfigurationImpl
      extended by com.ibm.di.config.base.ConnectorConfigImpl
All Implemented Interfaces:
BaseConfiguration, ConnectorConfig, MetamergeConfigChangeListener, OperationsConfig, Serializable
Direct Known Subclasses:
ALMappingConfigImpl, FunctionConfigImpl

public class ConnectorConfigImpl
extends BaseConfigurationImpl
implements ConnectorConfig

This class implements the TDI Connector configuration.

See Also:
Serialized Form

Field Summary
protected  ParserConfig parserConfig
          Parser configuration.
 
Fields inherited from class com.ibm.di.config.base.BaseConfigurationImpl
NAME
 
Fields inherited from interface com.ibm.di.config.interfaces.ConnectorConfig
ADDONLY_MODE, BRANCH_MODE, CALL_REPLY_MODE, COMP_INIT_DEFAULT, COMP_INIT_EVERYTIME, COMP_INIT_MODIFIED, COMP_INIT_USE, DELETE_MODE, DELTA_MODE, DELTA_NO_DELETE, DELTA_NORMAL, DISABLED_STATE, ENABLED_STATE, FUNCTION_MODE, INPUT_MAP_NAME, ITERATOR_MODE, LOOKUP_MODE, MAPPING_MODE, OUTPUT_MAP_NAME, PASSIVE_STATE, REPLY_MODE, SCHEMA_INPUT, SCHEMA_OUTPUT, SCRIPT_MODE, SERVER_MODE, SERVER_OPTION_CONNECTOR, SERVER_OPTION_ENTRY, UPDATE_MODE
 
Fields inherited from interface com.ibm.di.config.interfaces.BaseConfiguration
CHILD_PATH_SEPARATOR, DISABLE_EXTPROPS, DISABLE_INHERITANCE, INHERIT_NONE, INHERIT_PARENT, ONE_LEVEL, RECURSIVE, RECURSIVE_ONELEVEL, RECURSIVE_SUBTREE, SEARCH_EXACTCASE, SEARCH_ONELEVEL, SEARCH_PARAMNAME, SEARCH_PARAMNAME_RE, SEARCH_PROPERTY, SEARCH_REGEX, SEARCH_SUBSTRING, SUBTREE
 
Constructor Summary
ConnectorConfigImpl()
          Non-arg constructor
ConnectorConfigImpl(Object config)
          Constructor with one parameter.
 
Method Summary
 OperationConfig createOperation(String name)
          This method creates a new operation object.
 boolean flatten(List<String> excludedNS)
          This method combines all values from this object and its inherited objects into one single config object.
 AttributeMapConfig getAttributeMap()
          Attribute Maps
 AttributeMapConfig getAttributeMap(boolean input)
          Gets the attributeMap attribute of the ConnectorConfig object
 AttributeMapConfig getAttributeMap(Object name)
          Gets the attributeMap attribute of the ConnectorConfig object
 CheckpointConfig getCheckpointConfig()
          
 Object getClone()
          
 boolean getComputeChanges()
          Returns the compute-changes flag for Update mode connector.
 RawConnectorConfig getConnectionConfig()
          Connection parameters
 String getConnectorScript()
          Script connectors
 int getDeltaBehavior()
          
 DeltaConfig getDeltaConfig()
          
 boolean getDeltaStrict()
          
 boolean getEnabled()
          Gets the enabled attribute of this object.
 HooksConfig getHooks()
          Hooks
 int getInitializeOption()
          
 String getLimitOption()
          Returns the Read Limit or Loop Limit for the Connector
 LinkCriteriaConfig getLinkCriteria()
          Link Criteria
 String getMode()
          
 OperationConfig getOperation(String name)
          This method returns the config for a given operation
 String getOperationCarrier()
          
 boolean getOperationCarrierIsProperty()
          
 ContainerConfig getOperations()
          This method returns a list of supported operations
 ParserConfig getParserConfig()
          Associated Parser configuration
 PoolDefConfig getPoolDefConfig()
          
 PoolInstanceConfig getPoolInstanceConfig()
          
 SchemaConfig getPublishedInitParams()
          Returns the Published Initialization Parameter Schema for the AssemblyLine
 ReconnectConfig getReconnectConfig()
          
 List<String> getReferences(List<String> list)
          
 boolean getReplyRequired()
          
 SandboxConfig getSandboxConfig()
          
 SchemaConfig getSchema(boolean input)
          
 SchemaConfig getSchema(String name)
          
 String getServerOption()
          
 boolean getSkipLookup()
          Gets the Skip Lookup option from the Connector.
 String getState()
          State (typically used in the AssemblyLine)
 void init()
          This method initializes the ConnectorConfig object, adds children to it and initializes them too.
 boolean isEntryFeed()
          
 void setAttributeMap(AttributeMapConfig attributeMap)
          Sets the attributeMap attribute of the ConnectorConfig object
 void setAttributeMap(AttributeMapConfig attributeMap, boolean input)
          Sets the attributeMap attribute of the ConnectorConfig object
 void setComputeChanges(boolean cc)
          Sets the compute-changes flag for Update mode connector.
 void setConnectionConfig(RawConnectorConfig rcc)
          Sets the connectionConfig attribute of the connector config.
 void setConnectorScript(String script)
          Sets the connectorScript attribute of the ConnectorConfig object
 void setDeltaBehavior(int behavior)
          Sets delta behavior.
 void setDeltaStrict(boolean strict)
          Sets the delta strict flag.
 void setEnabled(boolean enabled)
          Sets the enabled attribute of this object.
 void setInheritsFromRef(String ref)
          Sets the name of the object from which this object should inherit its values.
 void setInitializeOption(int option)
          This method sets the the initialization option for the component
 void setLimitOption(String option)
          Sets the Read Limit or Loop Limit for the Connector
 void setLinkCriteria(LinkCriteriaConfig linkCriteria)
          Sets the linkCriteria attribute of the ConnectorConfig object
 void setMode(String mode)
          Sets the mode attribute of the ConnectorConfig object
 void setOperationCarrier(String name)
          This method sets the name of the operation carrier
 void setOperationCarrierIsProperty(boolean isproperty)
          This method sets whether the operation carrier is an entry attribute or entry property.
 void setParserConfig(ParserConfig parser)
          Sets the parserConfig attribute of the ConnectorConfig object
 void setPublishedInitParams(SchemaConfig schema)
          Sets the Published Initialization Parameter Schema for the AssemblyLine
 void setSkipLookup(boolean skipLookup)
          Sets the Skip Lookup option to the Connector.
 void setState(String state)
          Sets the state attribute of the ConnectorConfig object
 void setupInheritanceChain()
          Established the inheritance chain for this object.
 boolean supportsSkipLookup()
          Checks whether the Connector supports Skip Lookup.
 void updateInheritsFrom(String ref)
          Sets the name of the object from which this object should inherit its values and calls the setupInheritanceChain to activate the change.
 
Methods inherited from class com.ibm.di.config.base.BaseConfigurationImpl
addListener, configurationChanged, deepClone, detachFromParent, expandPropertyValue, expandPropertyValue, fromEntry, getBooleanParameter, getChild, getChildForPath, getChildNames, getData, getDataIterator, getDebug, getDebug, getDebugBreak, getFlags, getInheritsFrom, getInheritsFromRef, getIntegerParameter, getKeys, getLogEnabled, getLongName, getMetamergeConfig, getModified, getModTS, getName, getNamespace, getNullBehavior, getNullBehaviorValue, getNullDefinition, getNullDefinitionValue, getParameter, getParameter, getParameter, getParameterPropertySource, getParameterPropertySourceFromValue, getParameterRaw, getParent, getParentName, getPath, getResHash, getScript, getScriptEngine, getShortName, getStringParameter, getSubstitutionMap, getUseConfigListeners, getUseListeners, getUserComment, hasParameter, isExpression, isParameterLocal, nameForChild, notifyChange, notifyChange, notifyChange, performNotifyChange, reattachToParent, removeListener, removeParameter, search, search, setBooleanParameter, setChild, setData, setDebug, setDebugBreak, setFlags, setInheritsFrom, setIntegerParameter, setLogEnabled, setMetamergeConfig, setModified, setModTS, setName, setName, setNullBehavior, setNullBehaviorValue, setNullDefinition, setNullDefinitionValue, setParameter, setParameter, setParameterPropertySource, setParent, setProtectedParameter, setScript, setScriptEngine, setStringParameter, setSubstitutionMap, setUseConfigListeners, setUseListeners, setUserComment, size, toEntry, toString, willExpandProps, willFlatten, willUseInherited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.di.config.interfaces.BaseConfiguration
addListener, detachFromParent, fromEntry, getBooleanParameter, getChild, getChildForPath, getChildNames, getData, getDataIterator, getDebug, getDebug, getDebugBreak, getFlags, getInheritsFrom, getInheritsFromRef, getIntegerParameter, getKeys, getLogEnabled, getMetamergeConfig, getModified, getModTS, getName, getNamespace, getNullBehavior, getNullBehaviorValue, getNullDefinition, getNullDefinitionValue, getParameter, getParameter, getParameter, getParameterPropertySource, getParameterRaw, getParent, getPath, getScript, getScriptEngine, getShortName, getStringParameter, getSubstitutionMap, getUseListeners, getUserComment, hasParameter, isExpression, isParameterLocal, nameForChild, notifyChange, notifyChange, notifyChange, reattachToParent, removeListener, removeParameter, search, search, setBooleanParameter, setChild, setData, setDebug, setDebugBreak, setFlags, setInheritsFrom, setIntegerParameter, setLogEnabled, setMetamergeConfig, setModified, setModTS, setName, setName, setNullBehavior, setNullBehaviorValue, setNullDefinition, setNullDefinitionValue, setParameter, setParameter, setParameterPropertySource, setParent, setProtectedParameter, setScript, setScriptEngine, setStringParameter, setSubstitutionMap, setUseListeners, setUserComment, size, toEntry, willFlatten
 

Field Detail

parserConfig

protected ParserConfig parserConfig
Parser configuration.

Constructor Detail

ConnectorConfigImpl

public ConnectorConfigImpl()
Non-arg constructor


ConnectorConfigImpl

public ConnectorConfigImpl(Object config)
Constructor with one parameter.

Parameters:
config -
Method Detail

init

public void init()
          throws Exception
This method initializes the ConnectorConfig object, adds children to it and initializes them too.

Specified by:
init in interface BaseConfiguration
Overrides:
init in class BaseConfigurationImpl
Throws:
Exception - if could not parse or initialize some configuration

setupInheritanceChain

public void setupInheritanceChain()
                           throws Exception
Established the inheritance chain for this object.

Specified by:
setupInheritanceChain in interface BaseConfiguration
Overrides:
setupInheritanceChain in class BaseConfigurationImpl
Throws:
Exception - if the operation could not be performed

updateInheritsFrom

public void updateInheritsFrom(String ref)
                        throws Exception
Sets the name of the object from which this object should inherit its values and calls the setupInheritanceChain to activate the change.

Specified by:
updateInheritsFrom in interface BaseConfiguration
Overrides:
updateInheritsFrom in class BaseConfigurationImpl
Parameters:
ref - The new inheritsFromRef value
Throws:
Exception - if the operation does not succeed

setInheritsFromRef

public void setInheritsFromRef(String ref)
Sets the name of the object from which this object should inherit its values.

Specified by:
setInheritsFromRef in interface BaseConfiguration
Overrides:
setInheritsFromRef in class BaseConfigurationImpl
Parameters:
ref - The new inheritsFromRef value

getMode

public String getMode()

Specified by:
getMode in interface ConnectorConfig
Returns:
Connector mode; if it is not set return default value of

setMode

public void setMode(String mode)
Sets the mode attribute of the ConnectorConfig object

Specified by:
setMode in interface ConnectorConfig
Parameters:
mode - The new mode value

getSchema

public SchemaConfig getSchema(String name)

Specified by:
getSchema in interface ConnectorConfig
Parameters:
name - name of the schema
Returns:
a named Schema config

getSchema

public SchemaConfig getSchema(boolean input)

Specified by:
getSchema in interface ConnectorConfig
Parameters:
input - input if true return Input schema else Output schema
Returns:
input or output schema config

getDeltaConfig

public DeltaConfig getDeltaConfig()

Specified by:
getDeltaConfig in interface ConnectorConfig
Returns:
the delta configuration

getPoolDefConfig

public PoolDefConfig getPoolDefConfig()

Specified by:
getPoolDefConfig in interface ConnectorConfig
Returns:
the Connector Pool definition configuration

getPoolInstanceConfig

public PoolInstanceConfig getPoolInstanceConfig()

Specified by:
getPoolInstanceConfig in interface ConnectorConfig
Returns:
the Connector Pool instance configuration

getConnectorScript

public String getConnectorScript()
Script connectors

Specified by:
getConnectorScript in interface ConnectorConfig
Returns:
The connectorScript value

setConnectorScript

public void setConnectorScript(String script)
Sets the connectorScript attribute of the ConnectorConfig object

Specified by:
setConnectorScript in interface ConnectorConfig
Parameters:
script - The new connectorScript value

getAttributeMap

public AttributeMapConfig getAttributeMap(boolean input)
Gets the attributeMap attribute of the ConnectorConfig object

Specified by:
getAttributeMap in interface ConnectorConfig
Parameters:
input - a boolean value specifying whether the input or output Attribute map to retrieve
Returns:
The attributeMap value

getAttributeMap

public AttributeMapConfig getAttributeMap(Object name)
Gets the attributeMap attribute of the ConnectorConfig object

Specified by:
getAttributeMap in interface ConnectorConfig
Parameters:
name - the name of the Attribute map to retrieve
Returns:
The attributeMap value

getAttributeMap

public AttributeMapConfig getAttributeMap()
Attribute Maps

Specified by:
getAttributeMap in interface ConnectorConfig
Returns:
The attributeMap value

setAttributeMap

public void setAttributeMap(AttributeMapConfig attributeMap)
Sets the attributeMap attribute of the ConnectorConfig object

Specified by:
setAttributeMap in interface ConnectorConfig
Parameters:
attributeMap - The new attributeMap value

setAttributeMap

public void setAttributeMap(AttributeMapConfig attributeMap,
                            boolean input)
Sets the attributeMap attribute of the ConnectorConfig object

Specified by:
setAttributeMap in interface ConnectorConfig
Parameters:
attributeMap - The new attributeMap value
input - The new attributeMap value

getLinkCriteria

public LinkCriteriaConfig getLinkCriteria()
Link Criteria

Specified by:
getLinkCriteria in interface ConnectorConfig
Returns:
The linkCriteria value

setLinkCriteria

public void setLinkCriteria(LinkCriteriaConfig linkCriteria)
Sets the linkCriteria attribute of the ConnectorConfig object

Specified by:
setLinkCriteria in interface ConnectorConfig
Parameters:
linkCriteria - The new linkCriteria value

getHooks

public HooksConfig getHooks()
Hooks

Specified by:
getHooks in interface ConnectorConfig
Returns:
The hooks value

getConnectionConfig

public RawConnectorConfig getConnectionConfig()
Connection parameters

Specified by:
getConnectionConfig in interface ConnectorConfig
Returns:
The connectionConfig value

setConnectionConfig

public void setConnectionConfig(RawConnectorConfig rcc)
Sets the connectionConfig attribute of the connector config.

Parameters:
rcc - new RawConnectorConfig object to set

getParserConfig

public ParserConfig getParserConfig()
Description copied from interface: ConnectorConfig
Associated Parser configuration

Specified by:
getParserConfig in interface ConnectorConfig
Returns:
associated Parser configuration

setParserConfig

public void setParserConfig(ParserConfig parser)
Sets the parserConfig attribute of the ConnectorConfig object

Specified by:
setParserConfig in interface ConnectorConfig
Parameters:
parser - The new parserConfig value

getState

public String getState()
State (typically used in the AssemblyLine)

Specified by:
getState in interface ConnectorConfig
Returns:
The configured state

setState

public void setState(String state)
Sets the state attribute of the ConnectorConfig object

Specified by:
setState in interface ConnectorConfig
Parameters:
state - The new state

getEnabled

public boolean getEnabled()
Gets the enabled attribute of this object.

Specified by:
getEnabled in interface BaseConfiguration
Specified by:
getEnabled in interface ConnectorConfig
Overrides:
getEnabled in class BaseConfigurationImpl
Returns:
The nullBehaviorValue value.

setEnabled

public void setEnabled(boolean enabled)
Sets the enabled attribute of this object.

Specified by:
setEnabled in interface BaseConfiguration
Specified by:
setEnabled in interface ConnectorConfig
Overrides:
setEnabled in class BaseConfigurationImpl
Parameters:
enabled - true for enabling; false otherwise.

getComputeChanges

public boolean getComputeChanges()
Returns the compute-changes flag for Update mode connector.

Specified by:
getComputeChanges in interface ConnectorConfig
Returns:
The enabled value

setComputeChanges

public void setComputeChanges(boolean cc)
Sets the compute-changes flag for Update mode connector.

Specified by:
setComputeChanges in interface ConnectorConfig
Parameters:
cc - The compute-change flag to set.

setSkipLookup

public void setSkipLookup(boolean skipLookup)
Sets the Skip Lookup option to the Connector.

Specified by:
setSkipLookup in interface ConnectorConfig
Parameters:
skipLookup - The new value of the Skip Lookup option.

getSkipLookup

public boolean getSkipLookup()
Gets the Skip Lookup option from the Connector.

Specified by:
getSkipLookup in interface ConnectorConfig
Returns:
true if Skip Lookup is enabled.

supportsSkipLookup

public boolean supportsSkipLookup()
Checks whether the Connector supports Skip Lookup.

Specified by:
supportsSkipLookup in interface ConnectorConfig
Returns:
true if the Connector supports Skip Lookup.

getCheckpointConfig

public CheckpointConfig getCheckpointConfig()

Specified by:
getCheckpointConfig in interface ConnectorConfig
Returns:
the checkpoint configuration.

getSandboxConfig

public SandboxConfig getSandboxConfig()

Specified by:
getSandboxConfig in interface ConnectorConfig
Returns:
the checkpoint configuration.

getDeltaBehavior

public int getDeltaBehavior()

Specified by:
getDeltaBehavior in interface ConnectorConfig
Returns:
true if the connector uses delta behavior

setDeltaBehavior

public void setDeltaBehavior(int behavior)
Sets delta behavior.

Specified by:
setDeltaBehavior in interface ConnectorConfig

getDeltaStrict

public boolean getDeltaStrict()

Specified by:
getDeltaStrict in interface ConnectorConfig
Returns:
the delta strict flag

setDeltaStrict

public void setDeltaStrict(boolean strict)
Sets the delta strict flag.

Specified by:
setDeltaStrict in interface ConnectorConfig

getServerOption

public String getServerOption()

Specified by:
getServerOption in interface ConnectorConfig
Returns:
the server option (entry or connector) that determines whether the connector returns a connector instance or an entry in server mode.

getReplyRequired

public boolean getReplyRequired()

Specified by:
getReplyRequired in interface ConnectorConfig
Returns:
true if the connector requires a response in server or iterator mode.

isEntryFeed

public boolean isEntryFeed()

Specified by:
isEntryFeed in interface ConnectorConfig
Returns:
true if the connector is an entry feed connector

getOperations

public ContainerConfig getOperations()
This method returns a list of supported operations

Specified by:
getOperations in interface OperationsConfig

getOperation

public OperationConfig getOperation(String name)
This method returns the config for a given operation

Specified by:
getOperation in interface OperationsConfig

createOperation

public OperationConfig createOperation(String name)
                                throws Exception
This method creates a new operation object.

Specified by:
createOperation in interface OperationsConfig
Throws:
Exception

getOperationCarrier

public String getOperationCarrier()

Specified by:
getOperationCarrier in interface ConnectorConfig
Returns:
the name of the operation carrier

setOperationCarrier

public void setOperationCarrier(String name)
This method sets the name of the operation carrier

Specified by:
setOperationCarrier in interface ConnectorConfig

getOperationCarrierIsProperty

public boolean getOperationCarrierIsProperty()

Specified by:
getOperationCarrierIsProperty in interface ConnectorConfig
Returns:
whether the operation carrier is an entry attribute or entry property

setOperationCarrierIsProperty

public void setOperationCarrierIsProperty(boolean isproperty)
This method sets whether the operation carrier is an entry attribute or entry property.

Specified by:
setOperationCarrierIsProperty in interface ConnectorConfig

flatten

public boolean flatten(List<String> excludedNS)
                throws Exception
This method combines all values from this object and its inherited objects into one single config object. After flattening, the object is a complete object with no inherited values except those from the excludedNS list.

Specified by:
flatten in interface BaseConfiguration
Overrides:
flatten in class BaseConfigurationImpl
Parameters:
excludedNS - List of namespaces to exclude from flattening
Returns:
true if object attempted flattening, FALSE is this object inherits from an excluded namespace or has no inheritance
Throws:
Exception

getReferences

public List<String> getReferences(List<String> list)

Specified by:
getReferences in interface BaseConfiguration
Overrides:
getReferences in class BaseConfigurationImpl
Parameters:
list - If non-null, the object must use the provided list rather than creating its own
Returns:
a list of all references to other object from which this object or its children inherit from.

getReconnectConfig

public ReconnectConfig getReconnectConfig()

Specified by:
getReconnectConfig in interface ConnectorConfig
Returns:
the reconnect config

getInitializeOption

public int getInitializeOption()

Specified by:
getInitializeOption in interface ConnectorConfig
Returns:
the initialization option for the component

setInitializeOption

public void setInitializeOption(int option)
This method sets the the initialization option for the component

Specified by:
setInitializeOption in interface ConnectorConfig

getClone

public Object getClone()
                throws Exception

Specified by:
getClone in interface BaseConfiguration
Overrides:
getClone in class BaseConfigurationImpl
Returns:
a cloned version of this object.
Throws:
Exception

getPublishedInitParams

public SchemaConfig getPublishedInitParams()
Returns the Published Initialization Parameter Schema for the AssemblyLine

Specified by:
getPublishedInitParams in interface OperationsConfig

setPublishedInitParams

public void setPublishedInitParams(SchemaConfig schema)
Sets the Published Initialization Parameter Schema for the AssemblyLine

Specified by:
setPublishedInitParams in interface OperationsConfig
Parameters:
schema - The new schema

getLimitOption

public String getLimitOption()
Returns the Read Limit or Loop Limit for the Connector

Specified by:
getLimitOption in interface ConnectorConfig

setLimitOption

public void setLimitOption(String option)
Sets the Read Limit or Loop Limit for the Connector

Specified by:
setLimitOption in interface ConnectorConfig
Parameters:
option - A string representing the number.