com.ibm.tivoli.maximo.fdmbo

Class DefaultResourceProcessor

  • java.lang.Object
    • com.ibm.tivoli.maximo.fdmbo.DefaultResourceProcessor
  • Direct Known Subclasses:
    HistorianProcessor


    public class DefaultResourceProcessor
    extends java.lang.Object
    Merge resource processer. Merges records retrieved from a json resource into a target Mboset.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected java.lang.String formattedUrl 
    • Constructor Summary

      Constructors 
      Constructor and Description
      DefaultResourceProcessor()
      Parse and separate the federated resources into a list, in its intended order.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.List getPagingParams()
      Return parameters for paging.
      protected java.lang.String processPaging(java.lang.String url, int pageSize, int currentPage)
      Formats URL for paging.
      com.ibm.json.java.JSONArtifact processResource(JSONResourceInfo resourceInfo, MboRemote owner, UserInfo userInfo, int pageSize, int currentPage, JSONAnalyzer jsonAnalyzer)
      This is the method that the federated mbos will be fetched from the json resource, and merged into the target mboset.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • formattedUrl

        protected java.lang.String formattedUrl
    • Constructor Detail

      • DefaultResourceProcessor

        public DefaultResourceProcessor()
                                 throws MXException,
                                        java.rmi.RemoteException
        Parse and separate the federated resources into a list, in its intended order.
        Parameters:
        federatedResourcesStr - The resource name and relationship pairs as defined in the application's presentation. The format of the string is ResourceName1~Relatioinship1, ResourceName2~Relationship2, ... The part "~Relationship" is optional but recommended. ResourceName is the name of the json resource of where the federated mbos come from Relationship is the name of the relationship from the main mbo (e.g. Asset) to the federated mboset (e.g. ArcGISMboSet).
        targetset - The mbo set into which the federated mbos are merged
        fdOwner - The owner mbo of the targetSet.
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • processResource

        public com.ibm.json.java.JSONArtifact processResource(JSONResourceInfo resourceInfo,
                                                              MboRemote owner,
                                                              UserInfo userInfo,
                                                              int pageSize,
                                                              int currentPage,
                                                              JSONAnalyzer jsonAnalyzer)
                                                       throws MXException,
                                                              java.rmi.RemoteException
        This is the method that the federated mbos will be fetched from the json resource, and merged into the target mboset.
        Parameters:
        resourceInfo - The json resource's info object
        fdOwner - The owner mbo of the target mboset
        rootObject - The name of the json resource root object.
        fdRelation - Relationship from targetSet's owner (e.g. targetSet being ASsetSpec and its owner is Asset) to the federated mboset
        Returns:
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • processPaging

        protected java.lang.String processPaging(java.lang.String url,
                                                 int pageSize,
                                                 int currentPage)
                                          throws java.rmi.RemoteException,
                                                 MXException
        Formats URL for paging.
        Parameters:
        url - url to add paging
        index - index of the Mbo in MboSet
        method - HTTP invoke method
        Returns:
        formatted URL
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
      • getPagingParams

        public java.util.List getPagingParams()
        Return parameters for paging. First parameter is page size (limit) second is when to start (or skip)
        Returns:
        paging parameters array