Package com.ibm.di.config.base
Class ConnectorConfigImpl
- java.lang.Object
-
- com.ibm.di.config.base.BaseConfigurationImpl
-
- com.ibm.di.config.base.ConnectorConfigImpl
-
- All Implemented Interfaces:
BaseConfiguration,ConnectorConfig,MetamergeConfigChangeListener,OperationsConfig,java.io.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
Fields Modifier and Type Field Description protected ParserConfigparserConfigParser configuration.-
Fields inherited from class com.ibm.di.config.base.BaseConfigurationImpl
NAME
-
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
-
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
-
-
Constructor Summary
Constructors Constructor Description ConnectorConfigImpl()Non-arg constructorConnectorConfigImpl(java.lang.Object config)Constructor with one parameter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OperationConfigcreateOperation(java.lang.String name)This method creates a new operation object.booleanflatten(java.util.List<java.lang.String> excludedNS)This method combines all values from this object and its inherited objects into one single config object.AttributeMapConfiggetAttributeMap()Attribute MapsAttributeMapConfiggetAttributeMap(boolean input)Gets the attributeMap attribute of the ConnectorConfig objectAttributeMapConfiggetAttributeMap(java.lang.Object name)Gets the attributeMap attribute of the ConnectorConfig objectCheckpointConfiggetCheckpointConfig()java.lang.ObjectgetClone()booleangetComputeChanges()Returns the compute-changes flag for Update mode connector.RawConnectorConfiggetConnectionConfig()Connection parametersjava.lang.StringgetConnectorScript()Script connectorsintgetDeltaBehavior()DeltaConfiggetDeltaConfig()booleangetDeltaStrict()booleangetEnabled()Gets the enabled attribute of this object.HooksConfiggetHooks()HooksintgetInitializeOption()java.lang.StringgetLimitOption()Returns the Read Limit or Loop Limit for the ConnectorLinkCriteriaConfiggetLinkCriteria()Link Criteriajava.lang.StringgetMode()OperationConfiggetOperation(java.lang.String name)This method returns the config for a given operationjava.lang.StringgetOperationCarrier()booleangetOperationCarrierIsProperty()ContainerConfiggetOperations()This method returns a list of supported operationsParserConfiggetParserConfig()Associated Parser configurationPoolDefConfiggetPoolDefConfig()PoolInstanceConfiggetPoolInstanceConfig()SchemaConfiggetPublishedInitParams()Returns the Published Initialization Parameter Schema for the AssemblyLineReconnectConfiggetReconnectConfig()java.util.List<java.lang.String>getReferences(java.util.List<java.lang.String> list)booleangetReplyRequired()SandboxConfiggetSandboxConfig()SchemaConfiggetSchema(boolean input)SchemaConfiggetSchema(java.lang.String name)java.lang.StringgetServerOption()booleangetSkipLookup()Gets the Skip Lookup option from the Connector.java.lang.StringgetState()State (typically used in the AssemblyLine)java.lang.StringgetSupportedModes()Returns the supported modes for this Connector.voidinit()This method initializes the ConnectorConfig object, adds children to it and initializes them too.booleanisEntryFeed()voidsetAttributeMap(AttributeMapConfig attributeMap)Sets the attributeMap attribute of the ConnectorConfig objectvoidsetAttributeMap(AttributeMapConfig attributeMap, boolean input)Sets the attributeMap attribute of the ConnectorConfig objectvoidsetComputeChanges(boolean cc)Sets the compute-changes flag for Update mode connector.voidsetConnectionConfig(RawConnectorConfig rcc)Sets the connectionConfig attribute of the connector config.voidsetConnectorScript(java.lang.String script)Sets the connectorScript attribute of the ConnectorConfig objectvoidsetDeltaBehavior(int behavior)Sets delta behavior.voidsetDeltaStrict(boolean strict)Sets the delta strict flag.voidsetEnabled(boolean enabled)Sets the enabled attribute of this object.voidsetInheritsFromRef(java.lang.String ref)Sets the name of the object from which this object should inherit its values.voidsetInitializeOption(int option)This method sets the the initialization option for the componentvoidsetLimitOption(java.lang.String option)Sets the Read Limit or Loop Limit for the ConnectorvoidsetLinkCriteria(LinkCriteriaConfig linkCriteria)Sets the linkCriteria attribute of the ConnectorConfig objectvoidsetMode(java.lang.String mode)Sets the mode attribute of the ConnectorConfig objectvoidsetOperationCarrier(java.lang.String name)This method sets the name of the operation carriervoidsetOperationCarrierIsProperty(boolean isproperty)This method sets whether the operation carrier is an entry attribute or entry property.voidsetParserConfig(ParserConfig parser)Sets the parserConfig attribute of the ConnectorConfig objectvoidsetPublishedInitParams(SchemaConfig schema)Sets the Published Initialization Parameter Schema for the AssemblyLinevoidsetSkipLookup(boolean skipLookup)Sets the Skip Lookup option to the Connector.voidsetState(java.lang.String state)Sets the state attribute of the ConnectorConfig objectvoidsetSupportedModes(java.lang.String modes)Sets the supported modes for this ConnectorvoidsetupInheritanceChain()Established the inheritance chain for this object.booleansupportsSkipLookup()Checks whether the Connector supports Skip Lookup.voidupdateInheritsFrom(java.lang.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, isProtectedParameter, 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, 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, isProtectedParameter, 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, setProtectedParameter, setScript, setScriptEngine, setStringParameter, setSubstitutionMap, setUseListeners, setUserComment, size, toEntry, willFlatten
-
-
-
-
Field Detail
-
parserConfig
protected ParserConfig parserConfig
Parser configuration.
-
-
Method Detail
-
init
public void init() throws java.lang.ExceptionThis method initializes the ConnectorConfig object, adds children to it and initializes them too.- Specified by:
initin interfaceBaseConfiguration- Overrides:
initin classBaseConfigurationImpl- Throws:
java.lang.Exception- if could not parse or initialize some configuration
-
setupInheritanceChain
public void setupInheritanceChain() throws java.lang.ExceptionEstablished the inheritance chain for this object.- Specified by:
setupInheritanceChainin interfaceBaseConfiguration- Overrides:
setupInheritanceChainin classBaseConfigurationImpl- Throws:
java.lang.Exception- if the operation could not be performed
-
updateInheritsFrom
public void updateInheritsFrom(java.lang.String ref) throws java.lang.ExceptionSets the name of the object from which this object should inherit its values and calls the setupInheritanceChain to activate the change.- Specified by:
updateInheritsFromin interfaceBaseConfiguration- Overrides:
updateInheritsFromin classBaseConfigurationImpl- Parameters:
ref- The new inheritsFromRef value- Throws:
java.lang.Exception- if the operation does not succeed
-
setInheritsFromRef
public void setInheritsFromRef(java.lang.String ref)
Sets the name of the object from which this object should inherit its values.- Specified by:
setInheritsFromRefin interfaceBaseConfiguration- Overrides:
setInheritsFromRefin classBaseConfigurationImpl- Parameters:
ref- The new inheritsFromRef value
-
getMode
public java.lang.String getMode()
- Specified by:
getModein interfaceConnectorConfig- Returns:
- Connector mode; if it is not set return default value of "AddOnly"
-
setMode
public void setMode(java.lang.String mode)
Sets the mode attribute of the ConnectorConfig object- Specified by:
setModein interfaceConnectorConfig- Parameters:
mode- The new mode value
-
getSchema
public SchemaConfig getSchema(java.lang.String name)
- Specified by:
getSchemain interfaceConnectorConfig- Parameters:
name- name of the schema- Returns:
- a named Schema config
-
getSchema
public SchemaConfig getSchema(boolean input)
- Specified by:
getSchemain interfaceConnectorConfig- Parameters:
input- input iftruereturn Input schema else Output schema- Returns:
- input or output schema config
-
getDeltaConfig
public DeltaConfig getDeltaConfig()
- Specified by:
getDeltaConfigin interfaceConnectorConfig- Returns:
- the delta configuration
-
getPoolDefConfig
public PoolDefConfig getPoolDefConfig()
- Specified by:
getPoolDefConfigin interfaceConnectorConfig- Returns:
- the Connector Pool definition configuration
-
getPoolInstanceConfig
public PoolInstanceConfig getPoolInstanceConfig()
- Specified by:
getPoolInstanceConfigin interfaceConnectorConfig- Returns:
- the Connector Pool instance configuration
-
getConnectorScript
public java.lang.String getConnectorScript()
Script connectors- Specified by:
getConnectorScriptin interfaceConnectorConfig- Returns:
- The connectorScript value
-
setConnectorScript
public void setConnectorScript(java.lang.String script)
Sets the connectorScript attribute of the ConnectorConfig object- Specified by:
setConnectorScriptin interfaceConnectorConfig- Parameters:
script- The new connectorScript value
-
getAttributeMap
public AttributeMapConfig getAttributeMap(boolean input)
Gets the attributeMap attribute of the ConnectorConfig object- Specified by:
getAttributeMapin interfaceConnectorConfig- Parameters:
input- a boolean value specifying whether the input or output Attribute map to retrieve- Returns:
- The attributeMap value
-
getAttributeMap
public AttributeMapConfig getAttributeMap(java.lang.Object name)
Gets the attributeMap attribute of the ConnectorConfig object- Specified by:
getAttributeMapin interfaceConnectorConfig- Parameters:
name- the name of the Attribute map to retrieve- Returns:
- The attributeMap value
-
getAttributeMap
public AttributeMapConfig getAttributeMap()
Attribute Maps- Specified by:
getAttributeMapin interfaceConnectorConfig- Returns:
- The attributeMap value
-
setAttributeMap
public void setAttributeMap(AttributeMapConfig attributeMap)
Sets the attributeMap attribute of the ConnectorConfig object- Specified by:
setAttributeMapin interfaceConnectorConfig- Parameters:
attributeMap- The new attributeMap value
-
setAttributeMap
public void setAttributeMap(AttributeMapConfig attributeMap, boolean input)
Sets the attributeMap attribute of the ConnectorConfig object- Specified by:
setAttributeMapin interfaceConnectorConfig- Parameters:
attributeMap- The new attributeMap valueinput- The new attributeMap value
-
getLinkCriteria
public LinkCriteriaConfig getLinkCriteria()
Link Criteria- Specified by:
getLinkCriteriain interfaceConnectorConfig- Returns:
- The linkCriteria value
-
setLinkCriteria
public void setLinkCriteria(LinkCriteriaConfig linkCriteria)
Sets the linkCriteria attribute of the ConnectorConfig object- Specified by:
setLinkCriteriain interfaceConnectorConfig- Parameters:
linkCriteria- The new linkCriteria value
-
getHooks
public HooksConfig getHooks()
Hooks- Specified by:
getHooksin interfaceConnectorConfig- Returns:
- The hooks value
-
getConnectionConfig
public RawConnectorConfig getConnectionConfig()
Connection parameters- Specified by:
getConnectionConfigin interfaceConnectorConfig- 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:ConnectorConfigAssociated Parser configuration- Specified by:
getParserConfigin interfaceConnectorConfig- Returns:
- associated Parser configuration
-
setParserConfig
public void setParserConfig(ParserConfig parser)
Sets the parserConfig attribute of the ConnectorConfig object- Specified by:
setParserConfigin interfaceConnectorConfig- Parameters:
parser- The new parserConfig value
-
getState
public java.lang.String getState()
State (typically used in the AssemblyLine)- Specified by:
getStatein interfaceConnectorConfig- Returns:
- The configured state
-
setState
public void setState(java.lang.String state)
Sets the state attribute of the ConnectorConfig object- Specified by:
setStatein interfaceConnectorConfig- Parameters:
state- The new state
-
getEnabled
public boolean getEnabled()
Gets the enabled attribute of this object.- Specified by:
getEnabledin interfaceBaseConfiguration- Specified by:
getEnabledin interfaceConnectorConfig- Overrides:
getEnabledin classBaseConfigurationImpl- Returns:
- The nullBehaviorValue value.
-
setEnabled
public void setEnabled(boolean enabled)
Sets the enabled attribute of this object.- Specified by:
setEnabledin interfaceBaseConfiguration- Specified by:
setEnabledin interfaceConnectorConfig- Overrides:
setEnabledin classBaseConfigurationImpl- Parameters:
enabled-truefor enabling;falseotherwise.
-
getComputeChanges
public boolean getComputeChanges()
Returns the compute-changes flag for Update mode connector.- Specified by:
getComputeChangesin interfaceConnectorConfig- Returns:
- The enabled value
-
setComputeChanges
public void setComputeChanges(boolean cc)
Sets the compute-changes flag for Update mode connector.- Specified by:
setComputeChangesin interfaceConnectorConfig- Parameters:
cc- The compute-change flag to set.
-
setSkipLookup
public void setSkipLookup(boolean skipLookup)
Sets the Skip Lookup option to the Connector.- Specified by:
setSkipLookupin interfaceConnectorConfig- Parameters:
skipLookup- The new value of the Skip Lookup option.
-
getSkipLookup
public boolean getSkipLookup()
Gets the Skip Lookup option from the Connector.- Specified by:
getSkipLookupin interfaceConnectorConfig- Returns:
- true if Skip Lookup is enabled.
-
supportsSkipLookup
public boolean supportsSkipLookup()
Checks whether the Connector supports Skip Lookup.- Specified by:
supportsSkipLookupin interfaceConnectorConfig- Returns:
- true if the Connector supports Skip Lookup.
-
getCheckpointConfig
public CheckpointConfig getCheckpointConfig()
- Specified by:
getCheckpointConfigin interfaceConnectorConfig- Returns:
- the checkpoint configuration.
-
getSandboxConfig
public SandboxConfig getSandboxConfig()
- Specified by:
getSandboxConfigin interfaceConnectorConfig- Returns:
- the checkpoint configuration.
-
getDeltaBehavior
public int getDeltaBehavior()
- Specified by:
getDeltaBehaviorin interfaceConnectorConfig- Returns:
- true if the connector uses delta behavior
-
setDeltaBehavior
public void setDeltaBehavior(int behavior)
Sets delta behavior.- Specified by:
setDeltaBehaviorin interfaceConnectorConfig
-
getDeltaStrict
public boolean getDeltaStrict()
- Specified by:
getDeltaStrictin interfaceConnectorConfig- Returns:
- the delta strict flag
-
setDeltaStrict
public void setDeltaStrict(boolean strict)
Sets the delta strict flag.- Specified by:
setDeltaStrictin interfaceConnectorConfig
-
getServerOption
public java.lang.String getServerOption()
- Specified by:
getServerOptionin interfaceConnectorConfig- 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:
getReplyRequiredin interfaceConnectorConfig- Returns:
- true if the connector requires a response in server or iterator mode.
-
isEntryFeed
public boolean isEntryFeed()
- Specified by:
isEntryFeedin interfaceConnectorConfig- Returns:
- true if the connector is an entry feed connector
-
getOperations
public ContainerConfig getOperations()
This method returns a list of supported operations- Specified by:
getOperationsin interfaceOperationsConfig
-
getOperation
public OperationConfig getOperation(java.lang.String name)
This method returns the config for a given operation- Specified by:
getOperationin interfaceOperationsConfig
-
createOperation
public OperationConfig createOperation(java.lang.String name) throws java.lang.Exception
This method creates a new operation object.- Specified by:
createOperationin interfaceOperationsConfig- Throws:
java.lang.Exception
-
getOperationCarrier
public java.lang.String getOperationCarrier()
- Specified by:
getOperationCarrierin interfaceConnectorConfig- Returns:
- the name of the operation carrier
-
setOperationCarrier
public void setOperationCarrier(java.lang.String name)
This method sets the name of the operation carrier- Specified by:
setOperationCarrierin interfaceConnectorConfig
-
getOperationCarrierIsProperty
public boolean getOperationCarrierIsProperty()
- Specified by:
getOperationCarrierIsPropertyin interfaceConnectorConfig- 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:
setOperationCarrierIsPropertyin interfaceConnectorConfig
-
flatten
public boolean flatten(java.util.List<java.lang.String> excludedNS) throws java.lang.ExceptionThis 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:
flattenin interfaceBaseConfiguration- Overrides:
flattenin classBaseConfigurationImpl- Parameters:
excludedNS- List of namespaces to exclude from flattening- Returns:
trueif object attempted flattening, FALSE is this object inherits from an excluded namespace or has no inheritance- Throws:
java.lang.Exception
-
getReferences
public java.util.List<java.lang.String> getReferences(java.util.List<java.lang.String> list)
- Specified by:
getReferencesin interfaceBaseConfiguration- Overrides:
getReferencesin classBaseConfigurationImpl- 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:
getReconnectConfigin interfaceConnectorConfig- Returns:
- the reconnect config
-
getInitializeOption
public int getInitializeOption()
- Specified by:
getInitializeOptionin interfaceConnectorConfig- 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:
setInitializeOptionin interfaceConnectorConfig
-
getClone
public java.lang.Object getClone() throws java.lang.Exception- Specified by:
getClonein interfaceBaseConfiguration- Overrides:
getClonein classBaseConfigurationImpl- Returns:
- a cloned version of this object.
- Throws:
java.lang.Exception
-
getPublishedInitParams
public SchemaConfig getPublishedInitParams()
Returns the Published Initialization Parameter Schema for the AssemblyLine- Specified by:
getPublishedInitParamsin interfaceOperationsConfig
-
setPublishedInitParams
public void setPublishedInitParams(SchemaConfig schema)
Sets the Published Initialization Parameter Schema for the AssemblyLine- Specified by:
setPublishedInitParamsin interfaceOperationsConfig- Parameters:
schema- The new schema
-
getLimitOption
public java.lang.String getLimitOption()
Returns the Read Limit or Loop Limit for the Connector- Specified by:
getLimitOptionin interfaceConnectorConfig
-
setLimitOption
public void setLimitOption(java.lang.String option)
Sets the Read Limit or Loop Limit for the Connector- Specified by:
setLimitOptionin interfaceConnectorConfig- Parameters:
option- A string representing the number.
-
getSupportedModes
public java.lang.String getSupportedModes()
Description copied from interface:ConnectorConfigReturns the supported modes for this Connector.- Specified by:
getSupportedModesin interfaceConnectorConfig- Returns:
- the supported modes, as a comma separated String
-
setSupportedModes
public void setSupportedModes(java.lang.String modes)
Description copied from interface:ConnectorConfigSets the supported modes for this Connector- Specified by:
setSupportedModesin interfaceConnectorConfig- Parameters:
modes- Supported modes as a comma separated String.
-
-