Package com.ibm.di.connector.maximo.core
Class AbstractMxConnMode
- java.lang.Object
-
- com.ibm.di.connector.maximo.core.AbstractMxConnMode
-
- Direct Known Subclasses:
MxConnAddOnly,MxConnDelete,MxConnIterator,MxConnSync,MxConnUpdate
public abstract class AbstractMxConnMode extends java.lang.ObjectThis class provides a base implementation to minimize the effort required to implement a specific connector's mode.- Since:
- 7.1
- See Also:
HttpClient,MxConnConfiguration
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringACTION_ATTRstatic java.lang.StringACTION_ATTR_PREFIXEDstatic java.lang.StringADD_ACTIONstatic java.lang.StringADDCHANGE_ACTIONstatic java.lang.StringCHANGE_ACTIONstatic java.lang.StringCHANGED_ATTRstatic java.lang.StringDELETE_ACTIONprotected LogloggerLogger used by the connector.static java.lang.StringREPLACE_ACTION
-
Constructor Summary
Constructors Constructor Description AbstractMxConnMode(MxConnConfiguration cfg, Log log)Constructs anAbstractMxConnMode.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MxConnConfigurationgetCfg()Returns the connector configuration object.protected java.lang.Stringpost(TemplateLoader tlp, java.util.List<java.lang.String> enterpriseServiceUrlList)Posts the message extracted from the specified template to the given Maximo Enterprise Service.protected voidsetCreation(long creation)Defines the creation date/time to be set before posting a message.protected voidsetMessageId(java.lang.String messageId)Defines the message ID to be set before posting a message.
-
-
-
Field Detail
-
CHANGED_ATTR
public static final java.lang.String CHANGED_ATTR
- See Also:
- Constant Field Values
-
ACTION_ATTR
public static final java.lang.String ACTION_ATTR
- See Also:
- Constant Field Values
-
ACTION_ATTR_PREFIXED
public static final java.lang.String ACTION_ATTR_PREFIXED
- See Also:
- Constant Field Values
-
ADD_ACTION
public static final java.lang.String ADD_ACTION
- See Also:
- Constant Field Values
-
CHANGE_ACTION
public static final java.lang.String CHANGE_ACTION
- See Also:
- Constant Field Values
-
DELETE_ACTION
public static final java.lang.String DELETE_ACTION
- See Also:
- Constant Field Values
-
ADDCHANGE_ACTION
public static final java.lang.String ADDCHANGE_ACTION
- See Also:
- Constant Field Values
-
REPLACE_ACTION
public static final java.lang.String REPLACE_ACTION
- See Also:
- Constant Field Values
-
logger
protected Log logger
Logger used by the connector.
-
-
Constructor Detail
-
AbstractMxConnMode
public AbstractMxConnMode(MxConnConfiguration cfg, Log log)
Constructs anAbstractMxConnMode.- Parameters:
cfg- the connector configuration objectlog- logger of the connector
-
-
Method Detail
-
getCfg
protected final MxConnConfiguration getCfg()
Returns the connector configuration object.- Returns:
- connector configuration object
-
post
protected final java.lang.String post(TemplateLoader tlp, java.util.List<java.lang.String> enterpriseServiceUrlList) throws MxConnectorException
Posts the message extracted from the specified template to the given Maximo Enterprise Service. Before posting the message, some common properties are defined in the template, such as creation.date.time, message.id, and maximo.version.- Parameters:
tlp- template from which the message will be extracted and postedenterpriseServiceUrlList- list of Maximo enterprise service URLs that will handle the message- Returns:
- the response sent back by the Maximo Enterprise Service
- Throws:
MxConnectorException- if any sort of communication problem occurs- See Also:
setMessageId(String)
-
setCreation
protected final void setCreation(long creation)
Defines the creation date/time to be set before posting a message. If no date/time is defined, thecurrentdate/time is used.- Parameters:
creation- creation date/time to be set before posting a message, expressed as milliseconds- See Also:
post(TemplateLoader, List)
-
setMessageId
protected final void setMessageId(java.lang.String messageId)
Defines the message ID to be set before posting a message. If no message ID is defined, thecurrentdate/time expressed as milliseconds is used. Note: Not used- Parameters:
messageId- message ID to be set before posting the message- See Also:
post(TemplateLoader, List)
-
-