psdi.app.bim.loader

Class LoaderBase

    • Field Detail

      • QUERY_CHILD_OF_LOCATION

        protected static final java.lang.String QUERY_CHILD_OF_LOCATION
        See Also:
        Constant Field Values
      • QUERY_MATCH_ASSET_ASSETNUM

        protected static final java.lang.String QUERY_MATCH_ASSET_ASSETNUM
        See Also:
        Constant Field Values
      • QUERY_MATCH_ASSET_MODEL

        protected static final java.lang.String QUERY_MATCH_ASSET_MODEL
        See Also:
        Constant Field Values
      • QUERY_MATCH_ASSET_NAME

        protected static final java.lang.String QUERY_MATCH_ASSET_NAME
        See Also:
        Constant Field Values
      • QUERY_MATCH_ASSET_MERGE

        protected static final java.lang.String QUERY_MATCH_ASSET_MERGE
        See Also:
        Constant Field Values
      • QUERY_MATCH_ATTRIB_TYPE

        protected static final java.lang.String QUERY_MATCH_ATTRIB_TYPE
        See Also:
        Constant Field Values
      • QUERY_MATCH_ATTRIB_TYPE_NAME

        protected static final java.lang.String QUERY_MATCH_ATTRIB_TYPE_NAME
        See Also:
        Constant Field Values
      • QUERY_MATCH_ATTRIB_TYPE_NAME_ML

        protected static final java.lang.String QUERY_MATCH_ATTRIB_TYPE_NAME_ML
        See Also:
        Constant Field Values
      • QUERY_MATCH_COMPANY

        protected static final java.lang.String QUERY_MATCH_COMPANY
        See Also:
        Constant Field Values
      • QUERY_MATCH_COMPANY_ML

        protected static final java.lang.String QUERY_MATCH_COMPANY_ML
        See Also:
        Constant Field Values
      • QUERY_MATCH_COMPANY_MASTER

        protected static final java.lang.String QUERY_MATCH_COMPANY_MASTER
        See Also:
        Constant Field Values
      • QUERY_COMPANY_FROM_EMAIL

        protected static final java.lang.String QUERY_COMPANY_FROM_EMAIL
        See Also:
        Constant Field Values
      • QUERY_COMPANY_FROM_WWW

        protected static final java.lang.String QUERY_COMPANY_FROM_WWW
        See Also:
        Constant Field Values
      • QUERY_MATCH_CONTACT_PERSON

        protected static final java.lang.String QUERY_MATCH_CONTACT_PERSON
        See Also:
        Constant Field Values
      • QUERY_MATCH_CONTACT_EMAIL

        protected static final java.lang.String QUERY_MATCH_CONTACT_EMAIL
        See Also:
        Constant Field Values
      • QUERY_MATCH_FACILITY

        protected static final java.lang.String QUERY_MATCH_FACILITY
        See Also:
        Constant Field Values
      • QUERY_MATCH_JOBPLAN

        protected static final java.lang.String QUERY_MATCH_JOBPLAN
        See Also:
        Constant Field Values
      • QUERY_MATCH_LOCATION

        protected static final java.lang.String QUERY_MATCH_LOCATION
        See Also:
        Constant Field Values
      • QUERY_MATCH_LOCATION_TAG

        protected static final java.lang.String QUERY_MATCH_LOCATION_TAG
        See Also:
        Constant Field Values
      • QUERY_MATCH_LOCATION_MODEL

        protected static final java.lang.String QUERY_MATCH_LOCATION_MODEL
        See Also:
        Constant Field Values
      • QUERY_MATCH_LOCATION_NAME

        protected static final java.lang.String QUERY_MATCH_LOCATION_NAME
        See Also:
        Constant Field Values
      • QUERY_MATCH_LOCATION_MERGE

        protected static final java.lang.String QUERY_MATCH_LOCATION_MERGE
        See Also:
        Constant Field Values
      • QUERY_MATCH_SYSTEM_ID

        protected static final java.lang.String QUERY_MATCH_SYSTEM_ID
        See Also:
        Constant Field Values
      • QUERY_MATCH_SYSTEM_MODEL

        protected static final java.lang.String QUERY_MATCH_SYSTEM_MODEL
        See Also:
        Constant Field Values
      • QUERY_MATCH_SYSTEM_NAME

        protected static final java.lang.String QUERY_MATCH_SYSTEM_NAME
        See Also:
        Constant Field Values
      • QUERY_MATCH_PRODUCT_MODEL_ID

        protected static final java.lang.String QUERY_MATCH_PRODUCT_MODEL_ID
        See Also:
        Constant Field Values
      • QUERY_MATCH_PRODUCT_MODEL_NUM

        protected static final java.lang.String QUERY_MATCH_PRODUCT_MODEL_NUM
        See Also:
        Constant Field Values
      • QUERY_MATCH_PRODUCT_NAME

        protected static final java.lang.String QUERY_MATCH_PRODUCT_NAME
        See Also:
        Constant Field Values
      • QUERY_MATCH_SPEC_MODEL_ID

        protected static final java.lang.String QUERY_MATCH_SPEC_MODEL_ID
        See Also:
        Constant Field Values
      • QUERY_MATCH_SPEC_MODEL_NUM

        protected static final java.lang.String QUERY_MATCH_SPEC_MODEL_NUM
        See Also:
        Constant Field Values
      • QUERY_MATCH_SPEC_NAME

        protected static final java.lang.String QUERY_MATCH_SPEC_NAME
        See Also:
        Constant Field Values
      • QUERY_MATCH_MEASURE_UNIT

        protected static final java.lang.String QUERY_MATCH_MEASURE_UNIT
        See Also:
        Constant Field Values
      • QUERY_MATCH_TOOLS

        protected static final java.lang.String QUERY_MATCH_TOOLS
        See Also:
        Constant Field Values
      • QUERY_LOOKUP_FACILITY

        protected static final java.lang.String QUERY_LOOKUP_FACILITY
        See Also:
        Constant Field Values
      • QUERY_LOOKUP_ASSET

        protected static final java.lang.String QUERY_LOOKUP_ASSET
        See Also:
        Constant Field Values
      • QUERY_LOOKUP_PRODUCT

        protected static final java.lang.String QUERY_LOOKUP_PRODUCT
        See Also:
        Constant Field Values
      • QUERY_LOOKUP_MASTERPM

        protected static final java.lang.String QUERY_LOOKUP_MASTERPM
        See Also:
        Constant Field Values
      • QUERY_LOOKUP_COMP_CONTACT

        protected static final java.lang.String QUERY_LOOKUP_COMP_CONTACT
        See Also:
        Constant Field Values
      • QUERY_SYSTEM_MEMBERS

        protected static final java.lang.String QUERY_SYSTEM_MEMBERS
        See Also:
        Constant Field Values
      • QUERY_SYSTEM_MEMBERS_MAPPED

        protected static final java.lang.String QUERY_SYSTEM_MEMBERS_MAPPED
        See Also:
        Constant Field Values
      • QUERY_LOCHIERARCHY_MEMBERS

        protected static final java.lang.String QUERY_LOCHIERARCHY_MEMBERS
        See Also:
        Constant Field Values
      • QUERY_LOCHIERARCHY_MODELID

        protected static final java.lang.String QUERY_LOCHIERARCHY_MODELID
        See Also:
        Constant Field Values
      • QUERY_LOCHIERARCHY_NAME

        protected static final java.lang.String QUERY_LOCHIERARCHY_NAME
        See Also:
        Constant Field Values
    • Method Detail

      • canProcessItem

        public boolean canProcessItem(ItemBase item)
        Allow subclasses to cause some items to be skipped. Useful when As single Utem type maps to more than one Mbo
        Specified by:
        canProcessItem in interface LoaderItem
      • validatePage

        public int validatePage(Page page)
        Load all Type/Product definitions
        Specified by:
        validatePage in interface Loader
        Parameters:
        page -
        Returns:
        The number of types successful loaded
      • loadPage

        public int loadPage(Page page)
        Load all Type/Product definitions
        Specified by:
        loadPage in interface Loader
        Parameters:
        page -
        Returns:
        The number of types successful loaded
      • cleanup

        public void cleanup()
        Specified by:
        cleanup in interface Loader
      • setClassification

        protected boolean setClassification(MboRemote mbo,
                                            java.lang.String value,
                                            ItemBase item)
        Sets the classification value on any Mbo with check for null, exception handling, and warning message on failure. Handles separately to allow a control point for update policy
        Parameters:
        mbo - Target Mbo
        attribute - Attribute name
        value - New value for field
      • setMonitaryValue

        protected boolean setMonitaryValue(MboRemote mbo,
                                           java.lang.String attribute,
                                           java.lang.String value,
                                           ItemBase item)
        Sets an optional string value on any Mbo with check for null, exception handling, and warning message on failure
        Parameters:
        mbo - Target Mbo
        attribute - Attribute name
        value - New value for field
      • addAttributeValues

        protected int addAttributeValues(MboRemote baseMbo,
                                         MboSetRemote attributeSet,
                                         ItemBase item,
                                         java.lang.String referenceId,
                                         java.util.Enumeration attributes,
                                         java.lang.String classification)
        Parameters:
        mboSet -
        item - The item to which the attributes are being added. This may not be the item that is the source of the attributes. Ex: Type attributes can be copied to assets/components. This values is used for error reporting
        referenceId - The unique ID for the mbo the attribute is related to.
        attributes - Enumeration of attributes
        classification -
        Returns:
        number of attributes successfully added
      • attributeValueUpdate

        protected void attributeValueUpdate(MboRemote specMbo,
                                            ItemATTRIBUTE attribute)
                                     throws java.rmi.RemoteException,
                                            MXException
        Update the value of an existing attribute.

        The method has to handle the following conditions:

        • Import: If an attribute type list is associates with the category of the parent record, then creating an instance creates instances of every attribute. The import ten needs to update these for any values provided
      • Update blank only: Only set a value if there is no existing value
    • Update by change data: test the value of changedata against the changedon value in the import
  • Update unconditionally: Always update
An attribute is never set to null by the update.

The import includes a flag to control the update of specifications. It is always true for import but may be set to false by the user for update.

Parameters:
specMbo -
attribute -
Throws:
java.rmi.RemoteException
MXException
  • attributeValuePopulate

    protected void attributeValuePopulate(MboRemote specMbo,
                                          java.lang.String referenceId,
                                          ItemATTRIBUTE attribute)
                                   throws java.rmi.RemoteException,
                                          MXException
    Throws:
    java.rmi.RemoteException
    MXException
  • addDocumnts

    protected void addDocumnts(ItemBase item,
                               MboRemote mbo,
                               boolean isNewRecord)
  • validateDateValue

    public void validateDateValue(java.lang.String value,
                                  ItemBase item)
  • validateDocuments

    public void validateDocuments(ItemBase item)
  • isValidUnitValue

    public boolean isValidUnitValue(java.lang.String attribute,
                                    java.lang.String value,
                                    ItemBase item)
  • lookupCompany

    protected MboRemote lookupCompany(ItemBase item,
                                      SqlFormat sqlf,
                                      java.lang.String field,
                                      java.lang.String value,
                                      boolean isEmail)
  • uidFromExteIdenitier

    protected long uidFromExteIdenitier(ItemBase item,
                                        java.lang.String maximoTable)
  • getMboKeyValue

    protected abstract java.lang.String getMboKeyValue(MboRemote mbo)
                                                throws java.rmi.RemoteException,
                                                       MXException
    Throws:
    java.rmi.RemoteException
    MXException
  • getUserDefinedID

    protected java.lang.String getUserDefinedID(ItemBase item)
    Some items allow a property to be used for the Maximo record key. Ex: RoomTag for location When this is the case, the key can be used for matching existing records on merge or update.
    Parameters:
    item -
    Returns:
    The value of the user defined key or the empty string