public class ConvertXML extends MosDefinitionImpl
defnMetaData
action, apiContext, dbName, hr, INTEGRATIONLOGGER, interDD, mbo, mdi, micsetrel, mosInfo, mosName, mxServer, mxTrans, primaryMbo, primaryMboName, primaryMboSet, scriptName
ACTION, ACTIONADD, ACTIONADDUPDATE, ACTIONDELETE, ACTIONREPLACE, ACTIONUPDATE, ADAPTER_INSTALL, ADD, ADDATEND, BASELANGUAGE, BYPASS, COMPANYSETID_NAME, COMPLETE, CONFIGFILENAME, CREATIONDATETIME, DELETEFORINSERT, DEPLOYMENT_MANAGER, ENTERPRISE_SERVICE, ERRORTAG, ESCAPECHAR, EVENT, FILTERMBOKEY, INVOKE_CHANNEL, ITEMSETID_NAME, MAXIMO_NS_PREFIX, MAXIMOVERSION, MESSAGEID, MESSAGETYPE_CREATE, MESSAGETYPE_DELETE, MESSAGETYPE_INITIATE, MESSAGETYPE_INVOKE, MESSAGETYPE_MERGE, MESSAGETYPE_PATCH, MESSAGETYPE_PROCESS, MESSAGETYPE_PUBLISH, MESSAGETYPE_QUERY, MESSAGETYPE_RESPONSE, MESSAGETYPE_SYNC, MESSAGETYPE_UPDATE, MESSAGETYPE_WAKEUP, OBJECT_STRUCTURE_SERVICE, ORGID_NAME, OVERRIDEALWAYS, OVERRIDENULLONLY, PROCESS, SITEID_NAME, SKIP, SKIPMBO, SKIPMBOKEY, STANDARD_SERVICE, TRANSLANGUAGE, UPDATE, XSI_NS, XSI_NS_PREFIX
Constructor and Description |
---|
ConvertXML() |
Modifier and Type | Method and Description |
---|---|
protected void |
createOptimCode(java.util.List maxRelList,
org.jdom2.Namespace nameSpace)
Receives all the MAXRELATIONSHIP elements and the namespace to generate
the Optim code
|
protected java.lang.String |
formatConstraint(java.lang.String constraint)
Formats the constraint name to be shorter than 18 characters
|
protected java.lang.String |
formatWhereclause(java.lang.String whereClause)
Formats the WHERECLAUSE element
Switches the order of the conditions: i.e: A=B,C=D to B=A,D=C
Places double quotes in the constants
|
protected java.lang.String |
generateUniqueID()
Gets the current time in milliseconds and a random number in the 1000000 range and
concatenates both numbers
|
protected java.lang.String |
getFileName()
Generates a name to the text file
|
protected java.lang.String |
getPath()
Gets the path specified in the "globaldir" Maximo's property and creates a folder called "Archive" if it doesn't exist
|
protected void |
readXML(byte[] serializedData)
Reads the XML code and search for all the MAXRELATIONSHIP elements
|
protected void |
saveTxtFile(java.lang.String optimCode)
Generates and saves the text file
|
byte[] |
serializationEnd(byte[] serializedData) |
protected boolean |
validateWhereclause(java.lang.String whereClause)
Checks if the WHERECLAUSE element is valid to be converted
|
applyAPICondition, checkBusinessRules, createNewMbo, forceDiscardChildMboSet, getColumnsToSkip, initSerialization, myCompletedList, myNotCompletedList, postSerializationRules, scriptOverrideRules, scriptSkipColRules, scriptSkipMboRules, setDefinitionMetaData
getDBName, getInterDD, getJsonRequest, getKeyArray, getKeyArray, getMboServer, getMosName, getPrimaryMbo, getTransaction, getTransactionAction, getTranslator, getUserInfo, hasInvokedScript, hasScript, isMaxVarEQ, isRESTEditMode, isSetValueMode, isValueEQ, setJsonRequest, setMosName, setOSName, setOSPrimaryMbo, setUserInfo
public ConvertXML() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public byte[] serializationEnd(byte[] serializedData) throws MXException
serializationEnd
in class MosDefinitionImpl
MXException
protected void readXML(byte[] serializedData) throws MXException
serializedData
- Gives the XML byte codeMXException
- Throws Maximo's Exceptionsprotected void createOptimCode(java.util.List maxRelList, org.jdom2.Namespace nameSpace) throws MXException
maxRelList
- Gives all the MAXRELATIONSHIP elementsnameSpace
- Gives the respective namespace used by the XML codeMXExceptions
- Throws Maximo's ExceptionsMXException
protected boolean validateWhereclause(java.lang.String whereClause)
whereClause
- Gives the WHERECLAUSE elementprotected java.lang.String formatConstraint(java.lang.String constraint)
constraint
- Gives the constraint nameprotected java.lang.String formatWhereclause(java.lang.String whereClause)
whereClause
- Gives the WHERECLAUSE elementprotected void saveTxtFile(java.lang.String optimCode) throws MXException
optimCode
- Gives the Optim code to be wrote in the text fileMXException
protected java.lang.String getPath()
protected java.lang.String getFileName()
protected java.lang.String generateUniqueID()