psdi.app.assetcatalog

Class AssetCatalogService

    • Constructor Detail

      • AssetCatalogService

        public AssetCatalogService()
                            throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
      • AssetCatalogService

        public AssetCatalogService(MXServer mxServer)
                            throws java.rmi.RemoteException
        Parameters:
        name - -- a "Name" for the Service.
        srvEnv - -- the "Server Environment" this Service is being created in.
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • getClassStructure

        public MboRemote getClassStructure(UserInfo userInfo,
                                           java.lang.String[] classificationsArray)
                                    throws MXException,
                                           java.rmi.RemoteException
        This method takes an array of classificationids in the order of highest level to the lowest level node in the classstructure hierarchy and return a classtructure mbo if found else returns null
        Specified by:
        getClassStructure in interface AssetCatalogServiceRemote
        Parameters:
        userInfo - user information used to request a mbo set
        classificationsArray - array containing classificationids in the order of classstructure hierarchy. The array may look like {"PUMP","CNTRFGL","OIL"}
        Throws:
        MXException
        java.rmi.RemoteException
      • getClassStructure

        public MboRemote getClassStructure(UserInfo userInfo,
                                           java.lang.String[] classificationsArray,
                                           boolean returnANewMbo)
                                    throws MXException,
                                           java.rmi.RemoteException
        This method takes an array of classificationids in the order of highest level to the lowest level node in the classstructure hierarchy and return a classtructure mbo if found else returns a new classstructure mbo if returnANewMbo boolean is true else returns null.
        Specified by:
        getClassStructure in interface AssetCatalogServiceRemote
        Parameters:
        userInfo - user information used to request a mbo set
        classificationsArray - array containing classificationids in the order of classstructure hierarchy. The array may look like {"PUMP","CNTRFGL","OIL"}
        boolean - returnANewMbo if the combination of classifications is not found in any classstructure record, returns a new classstructure Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • parsePathIntoVector

        public java.util.Vector parsePathIntoVector(java.lang.String hierarchyPathPassed)
        parse HIERARCHYPATH and store each classificationid in a vector
        Parameters:
        hierarchyPathPassed -
        Returns:
      • getClassStructureMboList

        public MboSetRemote getClassStructureMboList(UserInfo userInfo,
                                                     java.lang.String[] classificationsArray)
                                              throws MXException,
                                                     java.rmi.RemoteException
        returns a ClassStructure MboSet based on the passed classification array
        Specified by:
        getClassStructureMboList in interface AssetCatalogServiceRemote
        Parameters:
        userinfo -
        classificationArray - String array contains classifications containing the hierarchy path of classstructures. The array may contains {"PUMP","CNTRFGL","OIL"} Any classStructure that is classified as PUMP/CNTRFGL/OIL and all of the children are returned.
        Throws:
        MXException
        java.rmi.RemoteException
      • getClassStructureList

        public java.lang.String getClassStructureList(UserInfo userInfo,
                                                      java.lang.String[] classificationsArray)
                                               throws MXException,
                                                      java.rmi.RemoteException
        reutrns a string containing a list of classstructureids
        Parameters:
        userInfo -
        classificationsArray - array containing classifications in the order of hierarchy path. They may look like {"PUMP","CNTRFGL","OIL"}
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getAllAttributes

        public MboSetRemote getAllAttributes(UserInfo userInfo,
                                             java.lang.String[] classificationsArray)
                                      throws MXException,
                                             java.rmi.RemoteException
        This method will return an AssetAttributeSet depending upon the passed string array containing classifications. This method first finds the elligible list of classstructureid's and based upon the list, return the attributes that are associated with the classstructureids. The ClassSpec table which contains the classstture and attribute information is used for query. See also getClassStructreList(UserInfo userInfo, String[] classificationArray);
        Specified by:
        getAllAttributes in interface AssetCatalogServiceRemote
        Parameters:
        userInfo -
        classificationsArray - String array containing classifications
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getAllItems

        public MboSetRemote getAllItems(UserInfo userInfo,
                                        java.lang.String[] classificationsArray)
                                 throws MXException,
                                        java.rmi.RemoteException
        This method will return an ItemSet depending upon the passed classificationsArray. This method first finds the elligible list of classstructureid's. Based upon the list, it returns the itemset that are associated with the classstructureids. See also getClassStructreList(UserInfo, String[] classificationsArray);
        Specified by:
        getAllItems in interface AssetCatalogServiceRemote
        Parameters:
        userInfo -
        classificationsArray -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • classStructureSearch

        public MboSetRemote classStructureSearch(UserInfo userInfo,
                                                 java.lang.String objectName,
                                                 java.lang.String[] classificationsArray)
                                          throws MXException,
                                                 java.rmi.RemoteException
        This method provides logic for classifications search on a classstructureid and returns to the calling program a mboset(Item,Asset,Locations,workorder,ticket) on which each mbo has the classstructureid.
        This method figures out the classstructureid by the combination of the classifications in the array and returns a mboSet of Item,Asset, or Locations.
        Specified by:
        classStructureSearch in interface AssetCatalogServiceRemote
        Parameters:
        userInfo -
        objectName -
        classificationsArray -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • classStructureSearch

        public MboSetRemote classStructureSearch(UserInfo userInfo,
                                                 java.lang.String objectName,
                                                 java.lang.String classStructureid)
                                          throws MXException,
                                                 java.rmi.RemoteException
        This method provides logic for asset catalog search on a classstructureid and returns to the calling program a mboset(Item,Asset,Locations) on which each mbo has the classstructureid. This method takes the classstructureid passed and returns a mboSet of Item,Asset, or Locations
        Specified by:
        classStructureSearch in interface AssetCatalogServiceRemote
        Parameters:
        userInfo - user information used to instantiate a mbo set
        objectName=the - name of the mboSet to be returned to the caller. the objectName is defined in psdi.app.assetcatalog.AssetCatalogServiceRemote as static Strings: ITEM, ASSET, and LOCATIONS
        classStructureid - the classstructureid to be searched upon.
        Throws:
        MXException
        java.rmi.RemoteException
      • anyLevelSearch

        public MboSetRemote anyLevelSearch(UserInfo userInfo,
                                           java.lang.String objectName,
                                           java.lang.String[] classificationsArray)
                                    throws MXException,
                                           java.rmi.RemoteException
        provide anyLevelSearch on the classstructureset upon known classifications regardless of their levels in the classstructure hierarchy.
        Returns a mboset to the caller.
        Specified by:
        anyLevelSearch in interface AssetCatalogServiceRemote
        Parameters:
        userInfo - user information used to instantiate a mbo set
        objectName=the - name of the mboSet to be returned to the caller the objectName is defined in psdi.app.assetcatalog.AssetCatalogServiceRemote
        userInfo -
        objectName - he name of the mboSet to be returned to the caller the objectName is defined in psdi.app.assetcatalog.AssetCatalogServiceRemote
        classificationsArray - String containing classifications
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • classAndAttributesSearch

        public MboSetRemote classAndAttributesSearch(UserInfo userInfo,
                                                     java.lang.String objectName,
                                                     java.lang.String classStructureid,
                                                     java.lang.String[][] attrAndValues)
                                              throws MXException,
                                                     java.rmi.RemoteException
        for Asset Catalog Search:
        This method returns a mbo set of ITEM,ASSET,LOCATION to the caller.
        It performs search to get a mboset based on a classstructureid, a set of attributes, and/or values.
        The method loops thru the array, producing a where clause to filter the mboset to return to the caller.
        Specified by:
        classAndAttributesSearch in interface AssetCatalogServiceRemote
        Parameters:
        userInfo - user information used to instantiate a mbo set
        objectName=the - name of the mboSet to be returned to the caller
        the objectName is defined in psdi.app.assetcatalog.AssetCatalogServiceRemote as static Strings: ITEM, ASSET, and LOCATIONS
        classStructureid, - can be a single classstructureid or a list of classstructureids
        The form can be as "1001", "'1001'","'1001','1002','1003'"
        String[][] - attrAndValues: for Example:
        [0][0] = "assetattrid='SIZE'", [0][1]=" numvalue > 1.5"
        [0][2] = " measureunitid like 'EA%'"
        Throws:
        MXException
        java.rmi.RemoteException
      • getClassAndAttributesSearchWhere

        public java.lang.String getClassAndAttributesSearchWhere(UserInfo userInfo,
                                                                 java.lang.String objectName,
                                                                 java.lang.String classStructureid,
                                                                 java.lang.String[][] attrAndValues,
                                                                 java.lang.String[][] itemWhere,
                                                                 java.lang.String[][] invVendorWhere)
                                                          throws MXException,
                                                                 java.rmi.RemoteException
        generate the where clause for classAndAttribute search
        Specified by:
        getClassAndAttributesSearchWhere in interface AssetCatalogServiceRemote
        Parameters:
        userInfo -
        objectName -
        classStructureid -
        attrAndValues -
        itemWhere -
        invVendorWhere -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • classAndAttributesSearch

        public MboSetRemote classAndAttributesSearch(UserInfo userInfo,
                                                     java.lang.String objectName,
                                                     java.lang.String classStructureid,
                                                     java.lang.String[][] attrAndValues,
                                                     boolean convertArray)
                                              throws MXException,
                                                     java.rmi.RemoteException
        This method returns a mboSet of ASSET,ITEM, or LOCATIONS; It first converts the passed two dimensional array into the format recognized by classAttributeSearch(String,String, String[][]) if boolean convertArray is true; If convertArray is false, it does not do the conversion.
        It then calls classAndAttributesSearch(UserInfo userInfo,String,String,String[][]) to perform the search and return a mboSet.
        Specified by:
        classAndAttributesSearch in interface AssetCatalogServiceRemote
        Parameters:
        userInfo - user information used to instantiate a mbo set
        objectName=the - name of the mboSet to be returned to the caller.
        the objectName is defined in psdi.app.assetcatalog.AssetCatalogServiceRemote as static Strings: ITEM, ASSET, and LOCATIONS
        The - classStructureid to be searched upon
        String[][] - attrAndValues: for Example:
        [0][0] = "SIZE", [0][1]="> 1.5";
        [1][0] = "COLOR",[1][1]="COLOR",
        After calling the convertList method, the returned array will look like
        [0][0]= "'ASSETATTRID = 'SIZE'"
        [0][1]= "NUMVALUE > 1.5"
        [01][2]="MEASUREUNITID LIKE 'RPM%"
        [1][0]= "'ASSETATTRID = 'COLOR'"
        [1][1]= "ALNVALUE = 'COLOR'"
        [1][2]= "MEASUREUNITID LIKE 'EA%'"
        convetArray - true will indicate the passed arrary needs to be converted to the format that is recognized by classAndAttributesSearch(UserInfo,String,String,String[][])
        false will indicate to just use the arrary passed without any conversion
        Throws:
        MXException
        java.rmi.RemoteException
      • classAndAttributesSearch

        public MboSetRemote classAndAttributesSearch(UserInfo userInfo,
                                                     java.lang.String objectName,
                                                     java.lang.String[] classificationsArray,
                                                     java.lang.String[][] attrAndValues,
                                                     boolean convertArray)
                                              throws MXException,
                                                     java.rmi.RemoteException
        This method returns a mboSet of ASSET,ITEM, or LOCATIONS based on a list of classstructureids and an array of attributes and values.
        Two things it first does:
        1) Call getClassStructureList to get a list of classstructureids
        2) Convert the two dimensional array into the format recognized by classAttributeSearch(UserInfo,String,String, String[][]) if boolean convertArray is true; If convertArray is false, it does not do any conversion.
        Parameters:
        userInfo -
        objectName -
        classificationsArray -
        attrAndValues -
        convertArray -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • classAndAttributesSearch

        public MboSetRemote classAndAttributesSearch(UserInfo userInfo,
                                                     java.lang.String objectName,
                                                     java.lang.String[][] itemColumns,
                                                     java.lang.String[][] invVendorColumns,
                                                     java.lang.String[][] attrAndValues,
                                                     java.lang.String[] classificationsArray)
                                              throws MXException,
                                                     java.rmi.RemoteException
        for Asset Cataogl Search This method returns a mbo set of ITEM,ASSET,LOCATION to the caller; it performs search to get a mboset based on a list of classstructureids( obtained from the passed classifications array), a set of item related values, a set of invvendor related values, and a set of attributes, and/or values. The method loops thru the arrays, producing a where clause to filter the mboset to return to the caller.
        Specified by:
        classAndAttributesSearch in interface AssetCatalogServiceRemote
        Parameters:
        userInfo - user information to request a mbo set
        objectName=the - name of the mboSet to be returned to the caller. the objectName is defined in psdi.app.assetcatalog.AssetCatalogServiceRemote as static Strings: ITEM, ASSET, and LOCATIONS
        String[][] - itemColumns: for Example:
        [index][0]="description" --> column name of item
        [index][1]="pump" --> column value for item.description
        String[][] - invVendorColumns: for example:
        [index][0]="vendor" --> column name of Invvendor
        [index][1]="HELWIG" --> column value of Invvendor.vendor
        String[][] - attrAndValues: for Example:
        [0][0] = "SIZE", [0][1]="> 1.5";
        [1][0] = "COLOR",[1][1]="COLOR";
        String[] - classificationsArray --> array containing classifications array indexes.
        Throws:
        MXException
        java.rmi.RemoteException
      • attributesSearch

        public MboSetRemote attributesSearch(UserInfo userInfo,
                                             java.lang.String objectName,
                                             java.lang.String[][] attrAndValues)
                                      throws MXException,
                                             java.rmi.RemoteException
        for Asset Catalog Search This method returns a mbo set of ITEM,ASSET,LOCATION to the caller.
        It performs search to get a mboset based on a set of attributes, and/or values. The method loops thru the array, producing a where clause to filter the mboset to return to the caller.
        Specified by:
        attributesSearch in interface AssetCatalogServiceRemote
        Parameters:
        userInfo - user information used to request a mbo set
        objectName=the - name of the mboSet to be returned to the caller.
        the objectName is defined in psdi.app.assetcatalog.AssetCatalogServiceRemote as static Strings: ITEM, ASSET, and LOCATIONS
        String[][] - attrAndValues: for Example:
        [0][0] = "assetattrid='SIZE'", [0][1]=" numvalue > 1.5"
        [0][2] = " measureunitid like 'EA%'"
        Throws:
        MXException
        java.rmi.RemoteException
      • attributesSearch

        public MboSetRemote attributesSearch(UserInfo userInfo,
                                             java.lang.String objectName,
                                             java.lang.String[][] attrAndValues,
                                             boolean convertArray)
                                      throws MXException,
                                             java.rmi.RemoteException
        This method takes a two dimensional array and first converts it into the format recognized by attributeSearch(String,String[][]), calls attributesSearch passing the new array and let attributeSearch return a MboSet.
        Specified by:
        attributesSearch in interface AssetCatalogServiceRemote
        Parameters:
        userInfo - user information to request a mbo set
        objectName=the - name of the mboSet to be returned to the caller.
        the objectName is defined in psdi.app.assetcatalog.AssetCatalogServiceRemote as static Strings: ITEM, ASSET, and LOCATIONS
        String[][] - attrAndValues: for Example:
        [0][0] = "SIZE", [0][1]="> 1.5";
        [1][0] = "COLOR",[1][1]="COLOR",
        After calling the convertList method, the returned array will
        look like
        [0][0]= "'ASSETATTRID = 'SIZE'"
        [0][1]= "NUMVALUE > 1.5"
        [01][2]="MEASUREUNITID LIKE 'RPM%"
        [1][0]= "'ASSETATTRID = 'COLOR'"
        [1][1]= "ALNVALUE = 'COLOR'"
        [1][2]= "MEASUREUNITID LIKE 'EA%'"
        convetArray - true will indicate the passed arrary needs to be converted to the format that is recognized by attributesSearch(String,String[][]).
        false will indicate to just use the arrary passed without any conversion
        Throws:
        MXException
        java.rmi.RemoteException
      • getMeasureUnits

        public MboSetRemote getMeasureUnits(UserInfo userInfo,
                                            java.lang.String classStructureId,
                                            java.lang.String assetAttrid,
                                            java.lang.String objectName)
                                     throws MXException,
                                            java.rmi.RemoteException
        Returns a set of MeasureUnits which are referenced by ITEMSPEC/ASSETSPEC/LOCATIONSPEC for an assetAttridId.
        Specified by:
        getMeasureUnits in interface AssetCatalogServiceRemote
        Parameters:
        userInfo - user information to request a mbo set.
        classStructureId - the classstructureid this measureunit is referenced by
        assetAttridId - the assetAttridId this measureunitid is referenced by
        objectName=the - name of the mboSet to be returned to the caller.
        the objectName is defined in psdi.app.assetcatalog.AssetCatalogServiceRemote as static Strings: ITEM, ASSET, and LOCATIONS
        Throws:
        MXException
        java.rmi.RemoteException
      • getClassStructureId

        public java.lang.String getClassStructureId(UserInfo userInfo,
                                                    java.lang.String objectName,
                                                    java.lang.String attrName,
                                                    java.lang.String attrValue)
                                             throws MXException,
                                                    java.rmi.RemoteException
        This method returns the classstructureid for a item,asset, locations record.
        Specified by:
        getClassStructureId in interface AssetCatalogServiceRemote
        Parameters:
        userInfo - user information to request a mbo set
        objectName=the - name of the mboSet to be returned to the caller. the objectName is defined in psdi.app.assetcatalog.AssetCatalogServiceRemote as static Strings: ITEM, ASSET, and LOCATIONS
        attrName - column name for an item,locations,or asset. Valid inputs will include "itemnum","assetnum", and "location".
        attrValue - value for the itemnum,assetnum, and locations.
        Throws:
        MXException
        java.rmi.RemoteException
      • getAttributeValues

        public MboSetRemote getAttributeValues(UserInfo userInfo,
                                               java.lang.String classstructureid,
                                               java.lang.String assetattrid)
                                        throws MXException,
                                               java.rmi.RemoteException
        Returns a list of ALNDOMAINVALUEs or NUMDOMAINVALUEs for the assetattribute of a classstructure.
        Specified by:
        getAttributeValues in interface AssetCatalogServiceRemote
        Parameters:
        userInfo - user information to instantiate a mboset
        classstructureid - the ClassStructureid
        assetattrid - the asset attribute id
        Returns:
        A MboSetRemote of ALNDOMAINVALUE or NUMVALUE
        Throws:
        MXException
        java.rmi.RemoteException
      • getAttributeValues

        public MboSetRemote getAttributeValues(UserInfo userInfo,
                                               java.lang.String assetattrid)
                                        throws MXException,
                                               java.rmi.RemoteException
        Returns a list of ALNDOMAINVALUEs or NUMDOMAINVALUEs for an assetattribute.
        Specified by:
        getAttributeValues in interface AssetCatalogServiceRemote
        Parameters:
        userInfo - user information to request a mbo set
        assetattrid - the asset attribute id
        Returns:
        A MboSetRemote of ALNDOMAINVALUE or NUMVALUE
        Throws:
        MXException
        java.rmi.RemoteException
      • validateObjectName

        public void validateObjectName(java.lang.String objectName)
                                throws MXException,
                                       java.rmi.RemoteException
        This method checks to see if the parameter objectName is one of the three names defined in psdi.app.assetcatalog.AssetCatalogServiceRemote; i.e. ITEM,ASSET,and LOCATION. if not, throw MXApplication
        Specified by:
        validateObjectName in interface AssetCatalogServiceRemote
        Parameters:
        objectName=the - name of the mboSet to be returned to the caller. the objectName is defined in psdi.app.assetcatalog.AssetCatalogServiceRemote as static Strings: ITEM, ASSET, and LOCATIONS
        Throws:
        MXException
        java.rmi.RemoteException
      • getSpecifications

        public MboSetRemote getSpecifications(MboRemote mbo)
                                       throws MXException,
                                              java.rmi.RemoteException
        This method returns a mboset - ITEMSPEC, ASSETSPEC, or LocationSpec to the caller
        Specified by:
        getSpecifications in interface AssetCatalogServiceRemote
        Parameters:
        mbo - valid ones are psdi.app.item.ItemRemote, psdi.app.asset.AssetRemote, psdi.app.location.LocationRemote.
        Throws:
        MXException
        java.rmi.RemoteException
      • getChildren

        public MboSetRemote getChildren(UserInfo userInfo,
                                        java.lang.String[] classificationsArray,
                                        int currentLevel,
                                        java.lang.String searchString,
                                        java.lang.String searchType)
                                 throws MXException,
                                        java.rmi.RemoteException
        this method returns the next level classifications for given parent classifications. This was created for MRO.COM in LONDON for SKF.
        Specified by:
        getChildren in interface AssetCatalogServiceRemote
        Parameters:
        userInfo - user information to request a mbo set
        classificationsArray - string array containing classifications
        currentLevel - the current level in drilldown
        searchString - the String to further determine if the next level classifications should be included
        searchType - valid entries are "B"egin With, "C"ontain, Exact "M"atch. This determines how a query is constructed.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • convertList

        public java.lang.String[][] convertList(UserInfo userInfo,
                                                java.lang.String[][] attrAndValues)
                                         throws MXException,
                                                java.rmi.RemoteException
        This method takes a two dimensional array and converts it to another two dimensional array recognized by attributesSearch(String,String[][]). This method will look up the AssetAttribute.DATATYPE to determine if the values are ALNVALUE or NUMVALUE.
        Specified by:
        convertList in interface AssetCatalogServiceRemote
        Parameters:
        attrAndValues - attrAndValues[index][0]=assetattributeid, attrAndValues[index][1]= values. attrAndValues[index][2]= measureunitid. attrAndValues[index][3]="ALN" or "NUMERIC" For Exampe attrAndValues[0][0]="SPEED" attrAndValues[0][1]=">100" attrAndValues[0][2]="EACH" attrAndValues[0][4]="SEC-1"(The SECTION field)
        Throws:
        MXException
        java.rmi.RemoteException
      • convertList

        public java.lang.String[][] convertList(java.lang.String classstructureid,
                                                java.lang.String[][] attrAndValues)
                                         throws MXException,
                                                java.rmi.RemoteException
        take a two dimensional array and converts into another two dimensional array [index][0]=asset attriture id [index][1]=value [index][2]=searchType [index][3]=measureunit This method assumes that values are all ALNVALUE. This method was created for the MRO.COM LONDON office.
        Specified by:
        convertList in interface AssetCatalogServiceRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • stringBySearchType

        public java.lang.String stringBySearchType(java.lang.String searchType,
                                                   java.lang.String searchString)
                                            throws MXException,
                                                   java.rmi.RemoteException
        This method returns a sql string depending on the searchType. For example, if the search type is "B" and the search string is "ABC" the returned string will be " like 'ABC%'". if the search type is "M" , the returned string will be " = 'ABC'"; otherwise, the returned string will be " like '%ABC%'".
        Specified by:
        stringBySearchType in interface AssetCatalogServiceRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • classAndAttributesSearchCU

        public MboSetRemote classAndAttributesSearchCU(UserInfo userInfo,
                                                       java.lang.String[] classificationsArray,
                                                       java.lang.String[][] attrAndValues,
                                                       boolean convertArray)
                                                throws MXException,
                                                       java.rmi.RemoteException
        This method returns a mboSet of PSSCU based on a list of classstructureids and an array of attributes and values.
        Two things it first does:
        1) Call getClassStructureList to get a list of classstructureids
        2) Convert the two dimensional array into the format recognized by classAttributeSearch(UserInfo,String,String, String[][]) if boolean convertArray is true; If convertArray is false, it does not do any conversion.
        Specified by:
        classAndAttributesSearchCU in interface AssetCatalogServiceRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • getClassAndRelatedAttributesSearchWhere

        public java.lang.String getClassAndRelatedAttributesSearchWhere(UserInfo userInfo,
                                                                        java.lang.String objectName,
                                                                        java.lang.String[][] attrAndValues)
                                                                 throws MXException,
                                                                        java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • createRelatedAttributeWhereClause

        public java.lang.String createRelatedAttributeWhereClause(java.lang.String[][] attrAndValues,
                                                                  MboSetRemote specSet)
                                                           throws MXException,
                                                                  java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • generateDescription

        public java.lang.String generateDescription(ClassStructureRemote classMbo,
                                                    SpecificationMboSetRemote specSet)
                                             throws MXException,
                                                    java.rmi.RemoteException
        generates description based upon the asset catalog setup and returns it to the caller.
        Specified by:
        generateDescription in interface AssetCatalogServiceRemote
        Parameters:
        classMbo - ClassStructure passed to determine if description is to be generated.
        specSet - the item/asset/locations specifications
        Returns:
        the generated description
        Throws:
        MXException
        java.rmi.RemoteException
      • generateSpecSet

        public MboSetRemote generateSpecSet(MboRemote mbo,
                                            java.lang.String itemNum)
                                     throws MXException,
                                            java.rmi.RemoteException
        08-12303: added generateSpecSet(MboRemote,String, MboRemote) because there are other cases where specifications are not generated from Classspec besides ItemSpec. AssetFeatureSpec copies from FeatureSpec also.
        Specified by:
        generateSpecSet in interface AssetCatalogServiceRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • generateSpecSet

        public MboSetRemote generateSpecSet(MboRemote mbo,
                                            java.lang.String itemNum,
                                            MboRemote baseMbo)
                                     throws MXException,
                                            java.rmi.RemoteException
        Overloaded of genenateSpecSet, if itemNum is null or empty string, then classspecSet will be used as the template to generate specset. If itemnum is populated, then Itemspec set is used. This applies to rotating asset, location and polines.
        Specified by:
        generateSpecSet in interface AssetCatalogServiceRemote
        Parameters:
        mbo -
        itemNum -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getCorrectObjectName

        public java.lang.String getCorrectObjectName(UserInfo userInfo,
                                                     java.lang.String objectName)
                                              throws MXException,
                                                     java.rmi.RemoteException
        06-20672: return base object name for the object Name passed
        Specified by:
        getCorrectObjectName in interface AssetCatalogServiceRemote
        Parameters:
        objectName -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getUseWithDomainObjects

        public MboSetRemote getUseWithDomainObjects(UserInfo userInfo,
                                                    boolean persistentObjectsOnly)
                                             throws MXException,
                                                    java.rmi.RemoteException
        06-20672: returns mboset of maxattribute where sameasobject='CLASSSTRUCTURE' and sameasattribute='CLASSSTRUCTUREID'
        Specified by:
        getUseWithDomainObjects in interface AssetCatalogServiceRemote
        Parameters:
        userInfo - userInfo
        persistentObjectsOnly: - if true, then it returns only the persistent objects in the domain. Non-persistent objects will not be included
        Throws:
        MXException
        java.rmi.RemoteException
      • getClassSpecUseWith

        public MboRemote getClassSpecUseWith(MboRemote classSpec,
                                             java.lang.String objectName)
                                      throws MXException,
                                             java.rmi.RemoteException
        06-20672: get classspecusewith infor for each classSpec mbo passed for the objectname
        Parameters:
        classSpec -
        objectName -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getClassUseWithDomain

        public MboRemote getClassUseWithDomain(UserInfo userInfo,
                                               java.lang.String objectName)
                                        throws MXException,
                                               java.rmi.RemoteException
        Returns the Mbo(sysnonymdomain) if the passed objectName is defined in the domain "CLASSUSEWITH"
        Parameters:
        userInfo -
        objectName -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • processOldAndNewSpecSets

        public void processOldAndNewSpecSets(MboSetRemote oldSpecDeletedSet,
                                             MboSetRemote newSpecSet)
                                      throws MXException,
                                             java.rmi.RemoteException
        if the classstructureid is being changed and there are existing specifications tied the the object, then need to process the case where there are common attributes between the old specification set and the new specification set.
        Parameters:
        oldSpecDeletedSet -
        newSpecSet -
        Throws:
        MXException
        java.rmi.RemoteException
      • getAttributesSearchMboSet

        public MboSetRemote getAttributesSearchMboSet()
                                               throws MXException,
                                                      java.rmi.RemoteException
        07-17112: get the MboSet from which attribute search is launched
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • deleteMbosetNotViaMbo

        public void deleteMbosetNotViaMbo(MboRemote mbo,
                                          MboSetRemote mboSetReferencedNotViaMbo)
                                   throws MXException,
                                          java.rmi.RemoteException
        07-21454: delete the mbos from the top owner
        Parameters:
        mbo -
        mboSetReferencedNotViaMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • doNotGenerateDescForThisObject

        public void doNotGenerateDescForThisObject(java.lang.String objectName)
                                            throws MXException,
                                                   java.rmi.RemoteException
        08-16655: Objects that do not want the Classification logic to generate description for business reasons should call this method Currently(rel7.1.1.2), no MAXIMO core objects call this method
        Specified by:
        doNotGenerateDescForThisObject in interface AssetCatalogServiceRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • toGenerateDescForThisObject

        public boolean toGenerateDescForThisObject(java.lang.String objectName)
                                            throws MXException,
                                                   java.rmi.RemoteException
        08-16655: if the objectName passed exists in the vector vectorObjectsToSkipDescGen, then it means the object does not want its description to be updated by classification logic. Return false to tell classification to bypass
        Specified by:
        toGenerateDescForThisObject in interface AssetCatalogServiceRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • getDescDelimiter

        public java.lang.String getDescDelimiter()
                                          throws MXException,
                                                 java.rmi.RemoteException
        08-16526: get the delimiter from maxvar ASSETDESCDELIMITER
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • sortedClassSpecSet

        public java.util.Vector sortedClassSpecSet(MboSetRemote classSpecSet,
                                                   MboRemote mbo)
                                            throws MXException,
                                                   java.rmi.RemoteException
        08-22431: classspecset needs to be sorted by sequence in ClassSpecUseWith table
        Parameters:
        classSpecSet -
        mbo -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getClassStructureFromPath

        public MboRemote getClassStructureFromPath(UserInfo userInfo,
                                                   java.lang.String hierarchyPath,
                                                   java.lang.String objectName)
                                            throws MXException,
                                                   java.rmi.RemoteException
        09-11009: getClassStructureFromPath, mostly, will return just one ClassStructure mbo but we allow duplicate hierarchypath and it can have multiple classstructure records that have same hierarchypaths
        Specified by:
        getClassStructureFromPath in interface AssetCatalogServiceRemote
        Parameters:
        userInfo -
        hierarchyPath -
        objectName -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getDescDelimiter

        public java.lang.String getDescDelimiter(boolean isForClassDesc)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Get the delimiter from maxvar ASSETDESCDELIMITER special cases
        Parameters:
        isForClassDesc - - this delimiter is for classification generation
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getClassStructureTopDown

        public MboSetRemote getClassStructureTopDown(MboSetRemote parentSet,
                                                     java.util.Vector classificationVector,
                                                     int whichElement)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Parameters:
        parentSet - - parent classStructureSet,
        classificationVector - - parsed elements from the hierarchypath string
        whichElement - - recursively - indicates which element in the vector to use until we drill down to the bottom node.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getClassStructureFromPath

        public MboRemote getClassStructureFromPath(UserInfo userInfo,
                                                   java.lang.String hierarchyPath,
                                                   java.lang.String orgid,
                                                   java.lang.String siteid)
                                            throws MXException,
                                                   java.rmi.RemoteException
        10-18046: overloaded method to add orgid and siteid
        Specified by:
        getClassStructureFromPath in interface AssetCatalogServiceRemote
        Parameters:
        userInfo -
        hierarchyPath -
        orgid -
        siteid -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • reprocessClassStructureSortOrder

        public void reprocessClassStructureSortOrder()
                                              throws MXException,
                                                     java.rmi.RemoteException
        set default sort order
        Throws:
        MXException
        java.rmi.RemoteException
      • createCategoryToSR

        public void createCategoryToSR(java.lang.String description,
                                       java.lang.Integer order)
                                throws MXException,
                                       java.rmi.RemoteException
        create a new classification to be used with sr
        Parameters:
        description - - classification description
        order - - Ticket Template sort order
        Throws:
        MXException
        java.rmi.RemoteException
      • createSubCategoryToSR

        public void createSubCategoryToSR(java.lang.String parent,
                                          java.lang.String description,
                                          java.lang.Integer order)
                                   throws MXException,
                                          java.rmi.RemoteException
        create a new classification to be used with sr
        Parameters:
        description - - classification description
        parent - - classification parent
        Throws:
        MXException
        java.rmi.RemoteException
      • updateClassification

        public void updateClassification(MboRemote classstructure,
                                         java.lang.String description,
                                         java.lang.Integer sortOrder)
                                  throws MXException,
                                         java.rmi.RemoteException
        update classification structure and classification
        Parameters:
        description - - classification description
        sortOrder - -Ticket Template sort order
        Throws:
        MXException
        java.rmi.RemoteException
      • getAttributeInternalType

        public java.lang.String getAttributeInternalType(java.lang.String assetattrid,
                                                         java.lang.String orgid,
                                                         java.lang.String siteid)
                                                  throws MXException,
                                                         java.rmi.RemoteException
        IJ18346: get internal datatype from the hashtable if existing instead of database fetches
        Parameters:
        assetattrid -
        orgid -
        sitieid -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • setAttributeInternalTye

        public void setAttributeInternalTye(java.lang.String assetattrid,
                                            java.lang.String orgid,
                                            java.lang.String siteid,
                                            java.lang.String internalType)
                                     throws MXException,
                                            java.rmi.RemoteException
        IJ18346: for performance: store the internal datatype for the key as assetattrid+orgid+siteid
        Parameters:
        assetattrid -
        orgid -
        sitieid -
        internalType -
        Throws:
        MXException
        java.rmi.RemoteException
      • clearAssetAttrHash

        public void clearAssetAttrHash()
                                throws MXException,
                                       java.rmi.RemoteException
        IJ18346:before using the hashtable, clear the hashtable so the hashtable is clean After using it, clear the hashtable. IJ18346 is for jobplan with 50 tasks where each is associated with a classification with attributes(CLASSSPEC)
        Specified by:
        clearAssetAttrHash in interface AssetCatalogServiceRemote
        Throws:
        MXException
        java.rmi.RemoteException