|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.connector.maximo.util.AbstractConfigurationParameters
com.ibm.di.connector.maximo.core.MxConnConfiguration
public final class MxConnConfiguration
Collection of configuration parameters used by the TPAE IF Connector.
SimpleTpaeIFConnector
,
loadParameters()
Field Summary | |
---|---|
static String |
DEFAULT_DOMAIN_ES_QUERY
Default value for the MAXDOMAIN enterprise service parameter. |
static String |
DEFAULT_DOMAIN_OS
Default value for the MAXDOMAIN object structure parameter. |
static String |
DEFAULT_MAXOBJECT_OS
Default value for MAXOBJECT object structure parameter. |
static String |
DEFAULT_MAXOJBECT_ES_QUERY
Default value for MAXOBJECT enterprise service parameter. |
static String |
DEFAULT_MX_BASE_URL
Default value for base URL parameter. |
static String |
DEFAULT_MX_VERSION
Default value for Maximo version parameter. |
static int |
DEFAULT_PAGE_SIZE
Default value for page size parameter. |
static int |
DEFAULT_TIMEOUT
Default value for timeout parameter. |
static String |
DEFAULT_TRANS_LANGUAGE
Default value for translation language parameter. |
static String |
PARAM_AUTHENTICATION_REQUIRED
The Authentication Required parameter. |
static String |
PARAM_DOMAIN_ES_QUERY
The domain enterprise service query parameter. |
static String |
PARAM_DOMAIN_OS
The domain object structure parameter. |
static String |
PARAM_ERROR_ON_EXCEDENT_SIZE
The error on excedent size parameter. |
static String |
PARAM_ES_CREATE
The CREATE enterprise service parameter. |
static String |
PARAM_ES_DELETE
The DELETE enterprise service parameter. |
static String |
PARAM_ES_QUERY
The QUERY enterprise service parameter. |
static String |
PARAM_ES_SYNC
The SYNC enterprise service parameter. |
static String |
PARAM_ES_UPDATE
The UPDATE enterprise service parameter. |
static String |
PARAM_EXTSYS
The external system parameter. |
static String |
PARAM_MAXOBJECT_ES_QUERY
The MAXOBJECT enterprise service parameter. |
static String |
PARAM_MAXOBJECT_OS
The MAXOBJECT object structure parameter. |
static String |
PARAM_MBO
The MBO parameter. |
static String |
PARAM_MX_BASE_URL
The Maximo server's base URLs parameter. |
static String |
PARAM_MX_VERSION
The Maximo version parameter. |
static String |
PARAM_OBJECT_STRUCTURE
The object structure parameter. |
static String |
PARAM_PAGE_SIZE
The page size parameter. |
static String |
PARAM_PASSWORD
The password parameter. |
static String |
PARAM_QUERY_CRITERIA
The query criteria parameter. |
static String |
PARAM_REPLACE_ON_UPDATE
This is the getReplaceOnUpdate flag. |
static String |
PARAM_TIMEOUT
This is the timeout parameter, in milliseconds. |
static String |
PARAM_TRANS_LANGUAGE
This is the transaction language parameter. |
static String |
PARAM_USER_ID
The user ID parameter. |
static String |
PARAM_XML_CHAR_VALIDATION
The XML character validation parameter. |
static String |
PROPS_CLASSPATH
Properties file in the classpath. |
static String |
PROPS_PREFIX
Prefix of the property keys that should be loaded. |
static String |
PROPS_SOLUTION_DIRECTORY
Properties file in the TDI solution directory. |
static String |
PROPS_SYSTEM
Name of the system property that indicates the location of external properties file. |
static Set<String> |
TDI_PARAMETER_KEYS
Set of the parameter keys defined by TDI. |
Fields inherited from class com.ibm.di.connector.maximo.util.AbstractConfigurationParameters |
---|
logger |
Constructor Summary | |
---|---|
MxConnConfiguration(Log logger)
Constructs a new MxConnConfiguration . |
Method Summary | |
---|---|
void |
checkAddOnly()
Checks if the mandatory parameters for AddOnly mode are defined. |
void |
checkAUDmodes()
Checks if the mandatory parameters for AddOnly, Update and Delete mode are defined. |
void |
checkDelete()
Checks if the mandatory parameters for Delete mode are defined. |
void |
checkIterator()
Checks if the mandatory parameters for Iterator mode are defined and valid. |
void |
checkUpdate()
Checks if the mandatory parameters for Update mode are defined. |
String |
getDomainObjectStructure()
Returns the DOMAIN Object Structure. |
String |
getMaximoVersion()
Returns the Maximo version. |
String |
getMaxobjectObjectStructure()
Returns the MAXOBJECT object structure. |
String |
getMbo()
Returns the MBO. |
String |
getObjectStructure()
Returns the object structure. |
int |
getPageSize()
Returns the page size. |
String |
getPassword()
Returns the password the connector will use to authenticate itself on the Maximo server. |
String |
getQueryCriteria()
Returns the query criteria. |
boolean |
getReplaceOnUpdate()
Returns whether a replace or merge operation will be performed upon update. |
Schema |
getSchema()
Returns the schema object from the configuration parameters. |
int |
getTimeout()
Returns the timeout. |
String |
getTransLanguage()
Returns the transaction language. |
List<String> |
getUrlList()
Returns a list of URLs. |
List<String> |
getUrlListForCreate()
Returns a list of URLs to perform create operations. |
List<String> |
getUrlListForDelete()
Returns a list of URLs to perform delete operations. |
List<String> |
getUrlListForQuery()
Returns a list of URLs to perform query operations. |
List<String> |
getUrlListForQueryMaxDomain()
Returns a list of URLs to perform query operations on the MAXDOMAIN object structure. |
List<String> |
getUrlListForQueryMaxObject()
Returns a list of URLs to perform query operations on the MAXOBJECT object structure. |
List<String> |
getUrlListForSync()
|
List<String> |
getUrlListForUpdate()
Returns a list of URLs to perform update operations. |
List<String> |
getUrlListForXSD()
Returns a list of XSD URLs. |
String |
getUserId()
Returns the user ID. |
String |
getXsdSufix()
Returns the XSD URL suffix. |
boolean |
isAuthenticationRequired()
Indicates if the Maximo server requires basic user authentication. |
boolean |
isErrorOnExcedentSizeEnabled()
Indicates if an error should be thrown when a text field exceeds the maximum size. |
boolean |
isXmlCharValidationEnabled()
Indicates if invalid Unicode characters should be removed from XML content before parsing it. |
void |
loadParameters()
Loads configuration parameters from properties files. |
Methods inherited from class com.ibm.di.connector.maximo.util.AbstractConfigurationParameters |
---|
checkParamAndThrow, clear, getParameter, getParameterAsBoolean, getParameterAsInt, getParams, isDefined, loadFromFile, loadFromResource, setParameter, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_DOMAIN_ES_QUERY
PARAM_DOMAIN_ES_QUERY
,
Constant Field Valuespublic static final String DEFAULT_DOMAIN_OS
PARAM_DOMAIN_OS
,
Constant Field Valuespublic static final String DEFAULT_MAXOBJECT_OS
PARAM_MAXOBJECT_OS
,
Constant Field Valuespublic static final String DEFAULT_MAXOJBECT_ES_QUERY
PARAM_MAXOBJECT_ES_QUERY
,
Constant Field Valuespublic static final String DEFAULT_MX_BASE_URL
PARAM_MX_BASE_URL
,
Constant Field Valuespublic static final String DEFAULT_MX_VERSION
PARAM_MX_VERSION
,
Constant Field Valuespublic static final int DEFAULT_PAGE_SIZE
PARAM_PAGE_SIZE
,
Constant Field Valuespublic static final int DEFAULT_TIMEOUT
PARAM_TIMEOUT
,
Constant Field Valuespublic static final String DEFAULT_TRANS_LANGUAGE
PARAM_TRANS_LANGUAGE
,
Constant Field Valuespublic static final String PARAM_AUTHENTICATION_REQUIRED
PARAM_USER_ID
,
PARAM_PASSWORD
,
isAuthenticationRequired()
,
Constant Field Valuespublic static final String PARAM_DOMAIN_ES_QUERY
DEFAULT_DOMAIN_ES_QUERY
,
getUrlListForQueryMaxDomain()
,
Constant Field Valuespublic static final String PARAM_DOMAIN_OS
DEFAULT_DOMAIN_OS
,
getDomainObjectStructure()
,
Constant Field Valuespublic static final String PARAM_ERROR_ON_EXCEDENT_SIZE
isErrorOnExcedentSizeEnabled()
,
Constant Field Valuespublic static final String PARAM_ES_CREATE
This parameter is required for AddOnly and Update modes.
getUrlListForCreate()
,
Constant Field Valuespublic static final String PARAM_ES_DELETE
This parameter is required for Delete mode.
getUrlListForDelete()
,
Constant Field Valuespublic static final String PARAM_ES_QUERY
This parameter is required for Iterator, Lookup, Update and Delete modes.
getUrlListForQuery()
,
Constant Field Valuespublic static final String PARAM_ES_UPDATE
This parameter is required for Update modes.
getUrlListForUpdate()
,
Constant Field Valuespublic static final String PARAM_ES_SYNC
This parameter is used by the TpaeIFConnector
in AddOnly, Update
and Delete modes.
getUrlListForSync()
,
Constant Field Valuespublic static final String PARAM_EXTSYS
This parameter is required for Iterator, Lookup, AddOnly, Delete and Update modes.
public static final String PARAM_MAXOBJECT_ES_QUERY
This parameter is required for Iterator, Lookup, AddOnly, Delete and Update modes.
DEFAULT_MAXOJBECT_ES_QUERY
,
getUrlListForQueryMaxObject()
,
Constant Field Valuespublic static final String PARAM_MAXOBJECT_OS
This parameter is required for Iterator, Lookup, AddOnly, Delete and Update modes.
DEFAULT_MAXOBJECT_OS
,
getMaxobjectObjectStructure()
,
Constant Field Valuespublic static final String PARAM_MBO
For example, the predefined object structure MXASSET is composed by the MBOs ASSET, ASSETMETER, ASSETUSERCUST, and ASSETSPEC. Therefore, the connector must be told which MBO it will work with.
This parameter must comply with the following syntax:
<Top-Level MBO>[@<Child MBO Level 1>[@<Child MBO Level 2>[@<Child MBO Level N>]]]
Example
The following example defines ASSET as the selected MBO.
ASSET
The following example defines ASSETMETER as the selected MBO.
ASSET@ASSETMETER
Note: If no value is defined, the connector will work with the object structure's top-level MBO.
This parameter is required for Iterator, Lookup, AddOnly, Delete, Update modes.
The method SimpleTpaeIFConnector.getMboList()
might be used to
retrieve a list of available MBOs in the specified object structure. The
following parameters should be previously defined, before invoking the
method: Base URL
, External System
, MAXOBJECT Object Structure
,
MAXOBJECT QUERY Enterprise Service
,
Object Structure
getMbo()
,
Constant Field Valuespublic static final String PARAM_MX_BASE_URL
Examples
The following URLs targets the host mxserver1 and mxserver2 on default port.
http://mxserver1 http://mxserver2
The following URL targets the host mxserver on default port using HTTP over SSL.
https://mxserver
The following URL targets the host localhost on port 8080.
http://localhost:8080
This parameter is required for Iterator, Lookup, AddOnly, Delete and Update modes.
DEFAULT_MX_BASE_URL
,
getUrlList()
,
Constant Field Valuespublic static final String PARAM_MX_VERSION
DEFAULT_MX_VERSION
,
getMaximoVersion()
,
Constant Field Valuespublic static final String PARAM_OBJECT_STRUCTURE
This parameter is required for Iterator, Lookup, AddOnly, Delete and Update modes.
getObjectStructure()
,
Constant Field Valuespublic static final String PARAM_PAGE_SIZE
Note: The page size applies only to the top-level MBO in the object structure.
For example, if Maximo has 1000 assets in its database and the page size is defined as 100, a query against the predefined MXASSET object structure would be accomplished by 10 requests.
This parameter is required for Iterator, Lookup, Update and Delete modes.
DEFAULT_PAGE_SIZE
,
getPageSize()
,
Constant Field Valuespublic static final String PARAM_PASSWORD
PARAM_AUTHENTICATION_REQUIRED
,
getPassword()
,
Constant Field Valuespublic static final String PARAM_QUERY_CRITERIA
Note: The query criteria can apply only to the top-level MBO in the object structure.
For example, a query against the predefined MXASSET object structure must select values in the top-level MBO (ASSET). For this object structure it is not possible build a query that selects records based on, for example, the average attribute in the ASSETMETER MBO.
The Operator AttributeThe operator attribute compares the value of a field with one or more other values. It has the following format:
operator = "value"
The operator attribute compares the value of a field with one or more other values. It has the following format:
Value | Description |
---|---|
= | equal |
!= | not equal |
< | less than |
<= | less than or equal |
> | greater than |
>= | greater than or equal |
SW | starts with |
EW | ends with |
Use the less than and the greater than attributes with numeric and date fields only.
Example
To find all assets in a type other than IT, format the query as follows:
<ASSET> <ASSETTYPE operator="!=">IT</ASSETTYPE> </ASSET>Field Selection
A field-based query compares the value in a field with a specified value. The value is not case-sensitive.
Example
The following query searches for assets where VENDOR is equal to ATI and STATUS is equal to OPERATING.
<ASSET> <VENDOR operator="=">ATI</VENDOR> <STATUS operator="=">OPERATING</STATUS> </ASSET>
The following query searches for assets where VENDOR is like to %ATI% and STATUS is like to %OPER%.
<ASSET> <VENDOR>ATI</VENDOR> <STATUS>OPERATING</STATUS> </ASSET>
Note: The preceding query format treats ATI and OPER as if % wildcards exist before and after the hard-coded values. It is not possible restrict the search criteria, that is %ATI or ATI%.
The following queries search for assets that do not have a tag. The first uses the operator attribute; the second one does not.
<ASSET> <ASSETTAG operator="NULL"></ASSETTAG> </ASSET> <ASSET> <ASSETTAG>NULL</ASSETTAG> </ASSET>
The following query searches for assets with asset number starting with the text "711".
<ASSET> <ASSETNUM operator="SW">711</ASSETNUM> </ASSET>
The following query searches for assets with a status NOT READY or OPERATING, by using the equivalent of an SQL IN clause.
<ASSET> <STATUS>NOT READY, OPERATING</STATUS> </ASSET>Range Selection
A query can search for records with a value that falls within a range of values. The format varies, depending on whether the selection criteria is open ended or contains an upper and lower range.
Example
The following query searches for assets where BUDGETCOST is greater than $1000.
<ASSET> <BUDGETCOST operator=">">1000</BUDGETCOST> </ASSET>
The following query searches for assets where BUDGETCOST is greater than $1000 and less than $20000.
<ASSET> <BUDGETCOST operator=">">1000</BUDGETCOST> <BUDGETCOST operator="<">20000</BUDGETCOST> </ASSET>
Note: A query can contain a maximum of two references for the same attribute.
This parameter is used by the Iterator mode.
getQueryCriteria()
,
Constant Field Valuespublic static final String PARAM_TIMEOUT
MxConnTimeoutException
is raised. A timeout of zero is
interpreted as infinite timeout.
DEFAULT_TIMEOUT
,
getTimeout()
,
Constant Field Valuespublic static final String PARAM_REPLACE_ON_UPDATE
getReplaceOnUpdate()
,
Constant Field Valuespublic static final String PARAM_TRANS_LANGUAGE
DEFAULT_TRANS_LANGUAGE
,
getTransLanguage()
,
Constant Field Valuespublic static final String PARAM_USER_ID
PARAM_AUTHENTICATION_REQUIRED
,
getUserId()
,
Constant Field Valuespublic static final String PARAM_XML_CHAR_VALIDATION
isXmlCharValidationEnabled()
,
Constant Field Valuespublic static final String PROPS_CLASSPATH
public static final String PROPS_SOLUTION_DIRECTORY
public static final String PROPS_PREFIX
public static final String PROPS_SYSTEM
public static final Set<String> TDI_PARAMETER_KEYS
Constructor Detail |
---|
public MxConnConfiguration(Log logger)
MxConnConfiguration
.
Method Detail |
---|
public void checkAddOnly() throws MxConnConfigException
Parameters checked:
checkAllModes()
CREATE enterprise service
MxConnConfigException
- if any of the mandatory parameters is missingcheckAllModes()
public void checkDelete() throws MxConnConfigException
Parameters checked:
checkIterator()
DELETE enterprise service
MxConnConfigException
- if any of the mandatory parameters is missingcheckAllModes()
public void checkIterator() throws MxConnConfigException
Parameters checked:
checkAllModes()
QUERY enterprise service
page size
MxConnConfigException
- if any of the mandatory parameters is missing or invalidcheckAllModes()
public void checkUpdate() throws MxConnConfigException
Parameters checked:
checkIterator()
and
checkAddOnly()
UPDATE enterprise service
MxConnConfigException
- if any of the mandatory parameters is missingcheckAddOnly()
,
checkIterator()
public void checkAUDmodes() throws MxConnConfigException
Parameters checked:
checkAllModes()
SYNC Enterprise service
This method is used by the TpaeIFConnector
to check required
parameters for AddOnly, Update and Delete modes.
MxConnConfigException
- if any of the mandatory parameters is missingcheckAllModes()
public String getDomainObjectStructure()
PARAM_DOMAIN_OS
public String getMaximoVersion()
PARAM_MX_VERSION
public String getMaxobjectObjectStructure()
PARAM_MAXOBJECT_OS
public String getMbo() throws MxConnectorException
MxConnectorException
- if no MBO is defined and it is not possible discover the
top-level MBOPARAM_MBO
,
getSchema()
public String getObjectStructure()
PARAM_OBJECT_STRUCTURE
public int getPageSize()
PARAM_PAGE_SIZE
public String getPassword()
PARAM_PASSWORD
public String getQueryCriteria() throws MxConnectorException
The default value is an empty tag of the top-level MBO. For example: "
<ASSET></ASSET>
"
MxConnectorException
- if no query is defined and it is not possible discover the
top-level MBOPARAM_QUERY_CRITERIA
,
getSchema()
public Schema getSchema() throws MxConnectorException
MxConnectorException
- if any of the mandatory parameters is missing or if it is not
possible build the schema objectcheckAllModes()
public int getTimeout()
PARAM_TIMEOUT
public boolean getReplaceOnUpdate()
true
if replace will be performed, false
otherwise.PARAM_REPLACE_ON_UPDATE
public String getTransLanguage()
PARAM_TRANS_LANGUAGE
public List<String> getUrlList()
PARAM_MX_BASE_URL
public List<String> getUrlListForCreate()
PARAM_MX_BASE_URL
,
PARAM_EXTSYS
,
PARAM_ES_CREATE
public List<String> getUrlListForDelete()
PARAM_MX_BASE_URL
,
PARAM_EXTSYS
,
PARAM_ES_DELETE
public List<String> getUrlListForQuery()
PARAM_MX_BASE_URL
,
PARAM_EXTSYS
,
PARAM_ES_QUERY
public List<String> getUrlListForQueryMaxDomain()
PARAM_MX_BASE_URL
,
PARAM_EXTSYS
,
PARAM_DOMAIN_ES_QUERY
public List<String> getUrlListForQueryMaxObject()
PARAM_MX_BASE_URL
,
PARAM_EXTSYS
,
PARAM_MAXOBJECT_ES_QUERY
public List<String> getUrlListForUpdate()
PARAM_MX_BASE_URL
,
PARAM_EXTSYS
,
PARAM_ES_UPDATE
public List<String> getUrlListForSync()
PARAM_EXTSYS
,
PARAM_ES_SYNC
public List<String> getUrlListForXSD()
PARAM_MX_BASE_URL
,
PARAM_OBJECT_STRUCTURE
,
getXsdSufix()
public String getUserId()
PARAM_USER_ID
public String getXsdSufix()
PARAM_OBJECT_STRUCTURE
public boolean isAuthenticationRequired()
true
if the Maximo server requires basic user
authentication, otherwise false
PARAM_AUTHENTICATION_REQUIRED
public boolean isErrorOnExcedentSizeEnabled()
true
if an error should be thrown when a text field
exceeds the maximum size. otherwise false
PARAM_ERROR_ON_EXCEDENT_SIZE
public boolean isXmlCharValidationEnabled()
true
if invalid Unicode characters should be removed
from XML content before parsing it, otherwise false
PARAM_XML_CHAR_VALIDATION
public void loadParameters()
The configuration parameters are loaded from the following resources (respecting this precedence):
properties file in the classpath
(in order
to be loaded, the properties file should be inside a ZIP file)properties file in the TDI solution
directory
system property
that indicates the path to the
properties file
Note: only the properties starting with PROPS_PREFIX
will
be loaded.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |