com.ibm.tivoli.maximo.fdmbo

Class JSONMbo

    • Field Detail

      • existInCloud

        protected boolean existInCloud
      • setup

        protected boolean setup
    • Constructor Detail

      • JSONMbo

        public JSONMbo(MboSet ms)
                throws java.rmi.RemoteException
        Constructor
        Parameters:
        ms - The JSON MboSet.
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
    • Method Detail

      • setValue

        public void setValue(java.lang.String attributeName,
                             java.lang.String val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a string value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Overrides:
        setValue in class Mbo
        Parameters:
        attributeName - The attribute name within the current object.
        val - The string value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,String,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             boolean val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a boolean value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Overrides:
        setValue in class Mbo
        Parameters:
        attributeName - The attribute name within the current object.
        val - The string value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,boolean,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             byte val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a byte value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Overrides:
        setValue in class Mbo
        Parameters:
        attributeName - The attribute name within the current object.
        val - The string value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,byte,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             int val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a integer value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Overrides:
        setValue in class Mbo
        Parameters:
        attributeName - The attribute name within the current object.
        val - The string value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,int,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             float val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a float value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Overrides:
        setValue in class Mbo
        Parameters:
        attributeName - The attribute name within the current object.
        val - The string value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,float,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             byte[] val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a byte[] value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Overrides:
        setValue in class Mbo
        Parameters:
        attributeName - The attribute name within the current object.
        val - The string value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,byte[],long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             java.util.Date val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a date value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Overrides:
        setValue in class Mbo
        Parameters:
        attributeName - The attribute name within the current object.
        val - The string value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,java.util.Date,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             short val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a short value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Overrides:
        setValue in class Mbo
        Parameters:
        attributeName - The attribute name within the current object.
        val - The string value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,short,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             long val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a long value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Overrides:
        setValue in class Mbo
        Parameters:
        attributeName - The attribute name within the current object.
        val - The string value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,long,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             double val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a double value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Overrides:
        setValue in class Mbo
        Parameters:
        attributeName - The attribute name within the current object.
        val - The string value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,double,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             MaxType mboValue,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Description copied from class: Mbo
        Set the value based on the MaxType object passed in. The type of the MaxType and the attribute whose value is to be set has to match. The value will be dirived from the MaxType object and set to the Mbo value. same fields.
        Specified by:
        setValue in interface MboRemote
        Overrides:
        setValue in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,MaxType,long)
      • setValueNull

        public void setValueNull(java.lang.String attributeName,
                                 long accessModifier)
                          throws MXException,
                                 java.rmi.RemoteException
        Sets an attribute value identified by name within the current object to null using the specified access modifiers. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.DESCRIPTION when the current object is WorkOrder ), this method first gets the correct object and then sets the attribute to null for the appropriate object. If the attributeName does not contain a ".", the current object is assumed to be the one to set null to the attribute specified.
        Specified by:
        setValueNull in interface MboRemote
        Overrides:
        setValueNull in class Mbo
        Parameters:
        attributeName - The attribute name within the current object.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object. "Field is read only" exception will be thrown if the attribute is READONLY and the accessModifier does not specify NOACCESSCHECK.
        java.rmi.RemoteException
        See Also:
        Mbo.setValueNull(String,long)
      • checkForUpdate

        public boolean checkForUpdate(java.lang.String attributeName)
        Has the data in the object been changed? An object is modified if one or more of its attributes have been changed.
        Returns:
        true if the object has been modified; false otherwise.
      • isModified

        public boolean isModified()
        Has the data in the object been changed? An object is modified if one or more of its attributes have been changed.
        Specified by:
        isModified in interface MboRemote
        Overrides:
        isModified in class Mbo
        Returns:
        true if the object has been modified; false otherwise.
        See Also:
        Mbo.isModified()
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Default value for some of the fields of the new JSONAttributeMap table.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • toBeAdded

        public boolean toBeAdded()
        Is the Mbo to added to storage ?
        Specified by:
        toBeAdded in interface MboRemote
        Overrides:
        toBeAdded in class Mbo
        Returns:
        to be added indicator
      • toBeUpdated

        public boolean toBeUpdated()
                            throws java.rmi.RemoteException
        Is the Mbo to be updated in storage ?
        Specified by:
        toBeUpdated in interface MboRemote
        Overrides:
        toBeUpdated in class Mbo
        Returns:
        to be updated indicator
        Throws:
        java.rmi.RemoteException
      • isUpdated

        public boolean isUpdated()
        Has the data in the object been updated?
        Returns:
        true if the object has been updated; false otherwise.
      • setUpdated

        public void setUpdated(boolean updated)
        Sets updated flag
        Parameters:
        updated - flag.
      • createDocument

        public void createDocument()
                            throws MXException,
                                   java.rmi.RemoteException
        Default method to create document.
        Throws:
        MXException
        java.rmi.RemoteException
      • updateDocument

        public void updateDocument()
                            throws MXException,
                                   java.rmi.RemoteException
        Default method to update document.
        Throws:
        MXException
        java.rmi.RemoteException
      • deleteDocument

        public void deleteDocument()
                            throws MXException,
                                   java.rmi.RemoteException
        Default method to delete document.
        Throws:
        MXException
        java.rmi.RemoteException
      • toJSON

        public com.ibm.json.java.JSONObject toJSON()
                                            throws MXException,
                                                   java.rmi.RemoteException
        Converts to JSON Object.
        Returns:
        The JSONObject that's converted from the mbo.
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
      • mbo2JSON

        public void mbo2JSON(com.ibm.json.java.JSONObject jo,
                             JSONObjectInfo joInfo)
                      throws MXException,
                             java.rmi.RemoteException
        Converts Mbo to JSON Object.
        Parameters:
        jo - JSON object
        joInfo - JSON Object Info
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
      • setExistInCloud

        public void setExistInCloud(boolean e)
        Sets object exists in external application.
        Parameters:
        e - is exists
      • existInCloud

        public boolean existInCloud()
        Is object exists in external application.
        Returns:
        is object exists
      • setSetup

        public void setSetup(boolean set)
        Sets setup indicator.
        Parameters:
        set - is setup
      • isSetup

        public boolean isSetup()
        is setup.
        Returns:
        is setup indicator
      • getUniqueIDValue

        public long getUniqueIDValue()
        Get Unique ID.
        Specified by:
        getUniqueIDValue in interface MboRemote
        Overrides:
        getUniqueIDValue in class Mbo
        Returns:
        unique ID
        See Also:
        psdi.mbo.getUniqueIDValue
      • getHandler

        public HTTPHandler getHandler()
                               throws MXException,
                                      java.rmi.RemoteException
        Get Handler Name.
        Returns:
        handler name
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception
      • setNullValues

        protected boolean setNullValues()
                                 throws MXException,
                                        java.rmi.RemoteException
        Call back method to skip null values.
        Returns:
        true or false
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception