psdi.iface.migexits

Class BaseExit

  • java.lang.Object
    • psdi.iface.migexits.BaseExit
  • Direct Known Subclasses:
    ExternalExit, UserExit


    public abstract class BaseExit
    extends java.lang.Object
    Process external system exit for Out Interfaces
    • Field Detail

      • dbName

        protected java.lang.String dbName
      • extSystem

        protected java.lang.String extSystem
      • primarySystem

        protected boolean primarySystem
      • conn

        protected java.sql.Connection conn
      • errData

        protected java.lang.String errData
      • ifaceName

        protected java.lang.String ifaceName
      • ifaceType

        protected java.lang.String ifaceType
      • mosName

        protected java.lang.String mosName
      • messageType

        protected java.lang.String messageType
      • integrationLogger

        protected static final MXLogger integrationLogger
        Integration Logger
    • Constructor Detail

      • BaseExit

        public BaseExit()
        Constructor.
    • Method Detail

      • initExitsOut

        public void initExitsOut(java.lang.String extSystem,
                                 java.lang.String mosName,
                                 java.lang.String ifaceName,
                                 MXTransaction mxTrans,
                                 UserInfo userInfo,
                                 java.lang.String messageType)
                          throws MXException
        Throws:
        MXException
      • initExitsIn

        public void initExitsIn(java.lang.String extSystem,
                                MXTransaction mxTrans,
                                UserInfo userInfo,
                                java.lang.String ifaceName,
                                java.lang.String ifaceType,
                                java.lang.String intPointName,
                                java.lang.String messageType)
      • getMosName

        public java.lang.String getMosName()
        Return a MAXIMO integration point name.
        Returns:
        server interface
        Throws:
        MXException - - MAXIMO exception
        java.rmi.RemoteException - - Remote exception
      • getMXTransaction

        public MXTransaction getMXTransaction()
        Return a MAXIMO interface name.
        Returns:
        server interface
        Throws:
        MXException - - MAXIMO exception
        java.rmi.RemoteException - - Remote exception
      • getAdapterType

        public java.lang.String getAdapterType()
        Deprecated. 
        Return the adapter type - for going out its the destination adapter type for coming in its the sender adapter type.
        Returns:
        server interface
        Throws:
        MXException - - MAXIMO exception
        java.rmi.RemoteException - - Remote exception
      • getIfaceName

        public java.lang.String getIfaceName()
        Return a external interface name.
        Returns:
        server interface
        Throws:
        MXException - - MAXIMO exception
        java.rmi.RemoteException - - Remote exception
      • getMessageType

        public java.lang.String getMessageType()
        Get Message Type.
        Returns:
        message type
        Throws:
        MXException - - MAXIMO exception
        java.rmi.RemoteException - - Remote exception
      • getMboServer

        protected MboServerInterface getMboServer()
                                           throws MXException,
                                                  java.rmi.RemoteException
        Return a reference to the server.
        Returns:
        server interface
        Throws:
        MXException - - MAXIMO exception
        java.rmi.RemoteException - - Remote exception
      • getUserInfo

        public UserInfo getUserInfo()
        Return user info of current instance
        Returns:
        UserInfo object
        Throws:
        MXException - - MAXIMO exception
        java.rmi.RemoteException - - Remote exception
      • getNewUserInfo

        public UserInfo getNewUserInfo()
                                throws MXException,
                                       java.rmi.RemoteException
        Return new user info of current instance
        Returns:
        new UserInfo object
        Throws:
        MXException - - MAXIMO exception
        java.rmi.RemoteException - - Remote exception
      • getExtSystem

        public java.lang.String getExtSystem()
        Return External System Name
        Returns:
        Ext System name
      • getConnection

        public java.sql.Connection getConnection()
        Return Connection
        Returns:
        database connection
      • findValueList

        public java.lang.String findValueList(java.lang.String listName,
                                              java.lang.String maxValue)
                                       throws MXException,
                                              java.rmi.RemoteException
        Deprecated. please use the ones which take site org id as parameters.
        Get value for a MAXVALUE in value list
        Parameters:
        listName - - list to search
        maxValue - - value to search for
        Returns:
        String value found
        Throws:
        MXException - - MAXIMO exception
        java.rmi.RemoteException - - Remote exception
      • findValueList

        public java.lang.String findValueList(java.lang.String listName,
                                              java.lang.String maxValue,
                                              java.lang.String siteid,
                                              java.lang.String orgid)
                                       throws MXException,
                                              java.rmi.RemoteException
        Get value for a MAXVALUE in value list
        Parameters:
        listName - - list to search
        maxValue - - value to search for
        Returns:
        String value found
        Throws:
        MXException - - MAXIMO exception
        java.rmi.RemoteException - - Remote exception
      • findMaxVar

        public java.lang.String findMaxVar(java.lang.String varName,
                                           java.lang.String orgId,
                                           java.lang.String siteId)
                                    throws MXException,
                                           java.rmi.RemoteException
        Get value for a MAXVAR
        Parameters:
        varName - - maxvar to search for
        Returns:
        String value found
        Throws:
        MXException - - MAXIMO exception
        java.rmi.RemoteException - - Remote exception
      • getMboSet

        public MboSetRemote getMboSet(java.lang.String name)
                               throws MXException,
                                      java.rmi.RemoteException
        Creates MboSet from MXSERVER based on table name
        Parameters:
        name - - Give name of MboSet (name of underling table).
        Returns:
        MboSetRemote object
        Throws:
        MXException - - MAXIMO exception
        java.rmi.RemoteException - - Remote exception
      • skipIntegrationObject

        protected void skipIntegrationObject(StructureData sdata)
                                      throws MXException
        Creates MboSet from MXSERVER based on table name
        Parameters:
        sdata - - Give reference to Structure Data.
        Throws:
        MXException - - MAXIMO exception
        java.rmi.RemoteException - - Remote exception
      • checkStatus

        public boolean checkStatus(StructureData irData,
                                   java.lang.String sendListName,
                                   java.lang.String orgId,
                                   java.lang.String siteId)
                            throws MXException,
                                   java.rmi.RemoteException
        Deprecated. 
        This method checks status and does the following. If the status changed to one of the status in XXSEND then send the transaction with children. WORKORDER is handled differently than other transactions also note that there is no STATUSIFACE tag for WORKORDER. For WORKORDER if the transaction is once sent then always sent all updates and status changes. All of the following apply to all other transactions(except WORKORDER): Dont send updates (which is not a status change). If the status changed to one of the status which is not in XXSEND and the transaction is not yet sent to any system, then skip the transaction. If the status changed to one of the status which is not in XXSEND and the transaction is sent to at least one external system, then send only the header record. Whenever the complete transaction is sent the STATUSIFACE flag is 0, irrespective of a status change.
        Parameters:
        irData - StructureData for IR.
        sendListName - Name of the XXSEND list.
        orgId - orgId for the list control
        siteId - siteId for the list control
        Returns:
        Is Integration Object not skipped.
        Throws:
        MXException
        java.rmi.RemoteException
      • cloneData

        public StructureData cloneData(StructureData strucData,
                                       java.lang.String namespacePrefix,
                                       java.lang.String namespaceURI,
                                       boolean isIR)
                                throws MXException,
                                       java.rmi.RemoteException
        This method clones the given StructureData object and places the entire document in the given new namespace.

        1)If you want the new Document to be in the default namespace (i.e., no namespace prefix), then pass in "" (empty string) for the namespace prefix parameter. 2) If you want the document to be in no namespace, then pass in null or "" (empty string) for the namespaceURI parameter. 3) If the new Document (after the namespace switch) is expected to be IR, then pass in true for the isIR parameter, otherwise pass in false. This method always returns a new (cloned) StructureData object.

        Parameters:
        strucData - StructureData object
        namespacePrefix - new namespace prefix
        namespaceURI - new namespace uri
        isIR - boolean parameter - true means that the new structure (after namespace switch) is expected to be IR
        Returns:
        cloned StructureData object in new namespace
        Throws:
        MXException
        java.rmi.RemoteException
      • setEndPoint

        protected void setEndPoint(java.lang.String endPointName)
        Sets end point for Invoke Channel. This functionality is not applicable for publish channel
        Parameters:
        endPointName - - Name of teh end point
      • setUserResponse

        protected void setUserResponse(byte[] resp)
        Set User response. It will be only returned if transaction is skipped in the exit
        Parameters:
        resp - - Propertly fornmatted response
      • getEndPoint

        protected java.lang.String getEndPoint()
                                        throws MXException
        Gets the end point for Invoke Channel. This functionality is not applicable for publish channel
        Returns:
        MboSetRemote object*
        Throws:
        MXException
      • getUserResponse

        protected byte[] getUserResponse()
                                  throws MXException
        Gets User response.
        Returns:
        response byte array
        Throws:
        MXException