psdi.iface.mos

Class MOSStAXStructure

    • Constructor Detail

      • MOSStAXStructure

        public MOSStAXStructure(java.util.Map defnMetaData,
                                java.lang.String mosName,
                                boolean event,
                                boolean retainMbos,
                                java.lang.String operationName,
                                boolean response,
                                boolean updatesOnly)
                         throws MXException
        Parameters:
        defnMetaData - the Metadata for serialization
        mosName - the object structure name
        event - true implies that this request for serialization is based on an Mbo event
        retainMbos - if set to true will not discard the Mbos that are being serialized.
        operationName - the operation name
        response - true if serilization needs to be done for response of the operation
        updatesOnly - send only updated fields out if set to true.
        Throws:
        MXException
      • MOSStAXStructure

        public MOSStAXStructure(java.lang.String defClassName,
                                java.util.Map defnMetaData,
                                java.lang.String mosName,
                                boolean event,
                                boolean retainMbos,
                                java.lang.String operationName,
                                boolean response,
                                boolean updatesOnly)
                         throws MXException
        Parameters:
        defClassName - the object structure defintion class name. This is the call back class for OS xml creation.
        defnMetaData - the Metadata for serialization
        mosName - the object structure name
        event - true implies that this request for serialization is based on an Mbo event
        retainMbos - if set to true will not discard the Mbos that are being serialized.
        operationName - the operation name
        response - true if serilization needs to be done for response of the operation
        updatesOnly - send only updated fields out if set to true.
        Throws:
        MXException
      • MOSStAXStructure

        public MOSStAXStructure(java.lang.String defClassName,
                                java.util.Map defnMetaData,
                                java.lang.String mosName,
                                boolean event,
                                boolean retainMbos,
                                boolean ignoreActions,
                                java.lang.String operationName,
                                boolean response,
                                boolean updatesOnly)
                         throws MXException
        Parameters:
        defClassName - the object structure defintion class name. This is the call back class for OS xml creation.
        defnMetaData - the Metadata for serialization
        mosName - the object structure name
        event - true implies that this request for serialization is based on an Mbo event
        retainMbos - if set to true will not discard the Mbos that are being serialized.
        operationName - the operation name
        response - true if serilization needs to be done for response of the operation
        updatesOnly - send only updated fields out if set to true.
        Throws:
        MXException
      • MOSStAXStructure

        public MOSStAXStructure(java.lang.String defClassName,
                                java.util.Map defnMetaData,
                                java.lang.String mosName,
                                boolean event,
                                boolean retainMbos,
                                boolean ignoreActions,
                                java.lang.String operationName,
                                boolean response,
                                boolean updatesOnly,
                                java.lang.String inputAction)
                         throws MXException
        Parameters:
        defClassName - the object structure defintion class name. This is the call back class for OS xml creation.
        defnMetaData - the Metadata for serialization
        mosName - the object structure name
        event - true implies that this request for serialization is based on an Mbo event
        retainMbos - if set to true will not discard the Mbos that are being serialized.
        operationName - the operation name
        response - true if serilization needs to be done for response of the operation
        updatesOnly - send only updated fields out if set to true.
        Throws:
        MXException
      • MOSStAXStructure

        public MOSStAXStructure(java.lang.String defClassName,
                                java.util.Map defnMetaData,
                                java.lang.String mosName,
                                boolean event,
                                boolean retainMbos,
                                boolean ignoreActions,
                                java.lang.String operationName,
                                boolean response,
                                boolean updatesOnly,
                                java.lang.String inputAction,
                                boolean dropNullCols)
                         throws MXException
        Parameters:
        defClassName - the object structure defintion class name. This is the call back class for OS xml creation.
        defnMetaData - the Metadata for serialization
        mosName - the object structure name
        event - true implies that this request for serialization is based on an Mbo event
        ignoreActions - true implies that this request for serialization will ignore all Mbo actions even if the Mbos are modified
        retainMbos - if set to true will not discard the Mbos that are being serialized.
        operationName - the operation name
        response - true if serilization needs to be done for response of the operation
        updatesOnly - send only updated fields out if set to true.
        dropNullCols - drops null value clumns from xml if this is set to true.
        Throws:
        MXException
      • MOSStAXStructure

        public MOSStAXStructure(java.util.Map defnMetaData,
                                java.lang.String mosName,
                                boolean retainMbos,
                                boolean updatesOnly)
                         throws MXException
        Parameters:
        defnMetaData - the Metadata for serialization
        mosName - the object structure name
        retainMbos - if set to true will not discard the Mbos that are being serialized.
        updatesOnly - send only updated fields out if set to true.
        Throws:
        MXException
      • MOSStAXStructure

        public MOSStAXStructure(java.lang.String defClassName,
                                java.util.Map defnMetaData,
                                java.lang.String mosName,
                                boolean event,
                                java.lang.String operationName,
                                boolean response)
                         throws MXException
        Parameters:
        defClassName - the object structure defintion class name. This is the call back class for OS xml creation.
        defnMetaData - the Metadata for serialization
        mosName - the object structure name
        event - true implies that this request for serialization is based on an Mbo event
        operationName - the operation name
        response - true if serilization needs to be done for response of the operation
        Throws:
        MXException
      • MOSStAXStructure

        public MOSStAXStructure(java.util.Map defnMetaData,
                                java.lang.String mosName,
                                boolean event,
                                java.lang.String operationName,
                                boolean response)
                         throws MXException
        Parameters:
        defnMetaData - the Metadata for serialization
        mosName - the object structure name
        event - true implies that this request for serialization is based on an Mbo event
        operationName - the operation name
        response - true if serilization needs to be done for response of the operation
        Throws:
        MXException
    • Method Detail

      • setProcessAsSelfRefRelName

        public void setProcessAsSelfRefRelName(java.lang.String relName,
                                               boolean allowSelfRefDup)
      • setResourceProperties

        public void setResourceProperties(java.util.Map resourceProperties)
      • setAllowEmptyXML

        public void setAllowEmptyXML(boolean emptyXML)
      • setEvaluateMboXmlType

        public void setEvaluateMboXmlType(boolean evaluateXMLType)
      • evaluateMboXmlType

        public boolean evaluateMboXmlType()
      • setAllowSkipRows

        public void setAllowSkipRows(boolean allowSkipRows)
      • isAllowSkipRows

        public boolean isAllowSkipRows()
      • getMosDefinitionImpl

        public MosDefinitionImpl getMosDefinitionImpl()
        Returns:
        return the callback class handle
      • getUsedMboList

        public java.util.List getUsedMboList()
        Returns:
        the list of primary Mbos that were actually serialized
      • getSerializedMboCount

        public int getSerializedMboCount()
        Returns:
        the count of Mbos serialized
      • init

        protected void init(MboRemote mbo,
                            javax.xml.stream.XMLStreamWriter writer,
                            java.util.Map externalPrefixNSMap)
                     throws MXException,
                            java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • setMboActionAttribute

        protected void setMboActionAttribute(MboRemote mbo,
                                             boolean headerObject)
                                      throws java.rmi.RemoteException,
                                             javax.xml.stream.XMLStreamException
        Throws:
        java.rmi.RemoteException
        javax.xml.stream.XMLStreamException
      • applyFilterMbosetExpr

        protected void applyFilterMbosetExpr(MboSetRemote childMboSet)
                                      throws java.rmi.RemoteException,
                                             MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • createStructure

        protected int createStructure(MboRemote mbo,
                                      MosDetailInfo info,
                                      boolean headerObject,
                                      java.util.Map resourceProperties)
                               throws MXException,
                                      java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • addObjectExtensibilityAttributes

        protected void addObjectExtensibilityAttributes(MboRemote mbo)
                                                 throws java.rmi.RemoteException,
                                                        MXException,
                                                        javax.xml.stream.XMLStreamException
        Throws:
        java.rmi.RemoteException
        MXException
        javax.xml.stream.XMLStreamException
      • createXML

        protected byte[] createXML(MboRemote mbo,
                                   boolean asSet)
                            throws MXException,
                                   java.rmi.RemoteException
        Specified by:
        createXML in class StAXStructure
        Parameters:
        mbo - the Mbo to serialize
        asSet - if set to true will serialize this Mbo as a MboSet with one Mbo.
        Returns:
        the resultant XML document as bytes
        Throws:
        MXException
        java.rmi.RemoteException
      • setTotalCount

        public void setTotalCount(java.lang.Integer totCount)
      • createXML

        protected byte[] createXML(MboIterator mboSet,
                                   int startIndex,
                                   int maxCount)
                            throws MXException,
                                   java.rmi.RemoteException
        Create the outbound XML. This method should be used by Data Export / WebServices response (when there can be multiple records in outbound XML)
        Specified by:
        createXML in class StAXStructure
        Parameters:
        mboSet - mboSet
        startIndex - the start index of the mboSet
        maxCount - the maximum number of records to be sent out
        Returns:
        the resultant XML document as bytes
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • getAction

        protected java.lang.String getAction(MboRemote mbo,
                                             boolean headerObject)
                                      throws java.rmi.RemoteException
        This will return the action indicator depending on mbo action and updatesonly flag for the integration point
        Parameters:
        mbo - the mbo
        headerObject - true if its the root object
        Returns:
        the action for the mbo
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • isActionInsert

        protected boolean isActionInsert(MboRemote mbo)
                                  throws java.rmi.RemoteException
        Check if the action is add/insert
        Returns:
        true/false depending on if the action is add
        Throws:
        java.rmi.RemoteException
      • isActionUpdate

        protected boolean isActionUpdate(MboRemote mbo)
                                  throws java.rmi.RemoteException
        Check if the action is update
        Returns:
        true/false depending on if the action is update
        Throws:
        java.rmi.RemoteException
      • isActionDelete

        protected boolean isActionDelete(MboRemote mbo)
                                  throws java.rmi.RemoteException
        Check if the action is delete
        Returns:
        true/false depending on if the action is delete
        Throws:
        java.rmi.RemoteException
      • getDefinitionMetadata

        protected java.util.Map getDefinitionMetadata(java.util.Map defnMetaData)
                                               throws java.rmi.RemoteException
        Get definition meta data
        Returns:
        definition meta data
        Throws:
        java.rmi.RemoteException
      • setResolvedTotalCount

        public void setResolvedTotalCount(int resolvedTotalCount)
      • setInitialResolvedCount

        public void setInitialResolvedCount(int initialResolvedCount)
      • setResolvedStartCount

        public void setResolvedStartCount(int resolvedStartCount)