psdi.iface.app.swcatalog.cron

Class SwKbtLoadCronTask

  • All Implemented Interfaces:
    CronTask


    public class SwKbtLoadCronTask
    extends SimpleCronTask
    Imports files from the software knowledge base tool via an http interace. The file is then transformed and processed into Maximo using the MEA.
    Since:
    7.2
    See Also:
    ImportClient, ExternalTransformation
    • Field Detail

      • parameterValidationMbo

        public MboRemote parameterValidationMbo
      • transformations

        protected java.util.ArrayList transformations
        ArrayList of names of xsl transformation files.
        See Also:
        initTransformations()
      • filesAndServices

        protected java.util.ArrayList filesAndServices
        ArrayList of transformed files and the enterprise services they are to be loaded with.
        See Also:
        initFilesAndServices()
      • isRunning

        protected boolean isRunning
        Whether the task is already running.
        See Also:
        #isOkToRun
    • Constructor Detail

      • SwKbtLoadCronTask

        public SwKbtLoadCronTask()
    • Method Detail

      • getCatalogID

        public java.lang.String getCatalogID()
        Return the catalogId for SWKbt
        Returns:
        catalogId
      • getOutfilePrefix

        protected java.lang.String getOutfilePrefix()
        Return the prefix for the intermediate files
      • isStepPossible

        protected boolean isStepPossible(int stepConstant)
      • retrieveFile

        protected boolean retrieveFile()
                                throws java.rmi.RemoteException,
                                       MXException
        *************************************************************** Get the file using ImportKBT.performImport()
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        ImportKBT.performImport()
      • initTransformations

        protected void initTransformations()
        Clears and populates ArrayList transformations with names of xsl transformations to be run in order in doTransformations(). The names given must be the same as the xsl file name without the .xsl extension. Xsl files are found in applications\maximo\businessobjects\classes\psdi\iface\app\swcatalog\xsl
        See Also:
        transformations
      • initFilesAndServices

        protected void initFilesAndServices()
        Populates ArrayList of transformed files to be loaded in order in doLoadFiles(). String[] for each element is composed of:
        • [0] Filename, without the .xml extension
        • [1] Enterprise service name
        See Also:
        filesAndServices
      • doTransformations

        protected void doTransformations()
                                  throws java.rmi.RemoteException,
                                         MXException
        Perform each of the transformations listed in transformations array.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        #initTransformations()}
      • doLoadFiles

        protected void doLoadFiles()
                            throws java.rmi.RemoteException,
                                   MXException
        Load each of the files in filesAndServices ArrayList into the enterprise services also listed there.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        #initFilesAndServices()}
      • isOKToRun

        public boolean isOKToRun(MXServerRemote server)
        Returns false if this instance is already running.
        Specified by:
        isOKToRun in interface CronTask
        Overrides:
        isOKToRun in class SimpleCronTask
        Returns:
        true if it is OK to run, false otherwise.
        See Also:
        psdi.server.CronTask#isOKToRun();
      • getInstanceName

        public java.lang.String getInstanceName()
        Returns instance.getString("instancename");
        Returns:
        The crontask instance name