psdi.app.assetcatalog

Class ClassUseWith

  • java.lang.Object
  • All Implemented Interfaces:
    java.rmi.Remote, ClassUseWithRemote, MboConstants, MboRemote, MaxRemoteProxy


    public class ClassUseWith
    extends Mbo
    implements ClassUseWithRemote
    MBO to represent ClassUseWith.

    See Asset Catalog description.

    This is system level object.

    The keys attributes for this object are: classstructureid, objectname

    The attributes in this object are as follows:

    Attribute NameDescription
    ClassStructureidKey identifier for a ClassUseWith object. One of the two key attributes for this object.
    ObjectNameThe MAXVALUE of the domain "CLASSUSEWITH" One of the two key attributes for this object.
    ObjectValueThe Value of the domain "CLASSUSEWITH" *
    DescriptionDescription of the ClassUseWith object.
    TopLevelApplicable only for objectvalue "CI"
    See Also:
    MeasureUnit, MaxDomain
    • Constructor Detail

      • ClassUseWith

        public ClassUseWith(MboSet ms)
                     throws MXException,
                            java.rmi.RemoteException
        Constructs the ClassUseWith object
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Creates an ClassUseWith object.

        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Determines if the object can be deleted. The object cannot be deleted if it is referenced by a item, asset, locations, etc..

        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException - assetattributenodelete
        GROUPKEYREASON
        assetcatalogassetattributenodeleteif the asset exists on a ClassSpec, AssetSpec, ItemSpec or LocationSpec
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long access)
                    throws MXException,
                           java.rmi.RemoteException
        Also deletes children's objectname setup
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        access - the access
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • init

        public void init()
                  throws MXException
        Description copied from class: Mbo
        Called by the framework when the Mbo has been constructed and the MboValues have been initialized. This can be overridden by the programmer to provide any custom initialization they would like to do.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Check before save()
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        Overrides the skipCopyField() in the Mbo. Since this method takes the MboValueInfo as its parameter just check to see if this field needs to be copied or not. If this field does not need to be copied return true. The following is a list of fields that are not copied from the source AssetSpec to the target AssetSpec.
        1. classstructureid
        2. classusewithid
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        - - The MboValueInfo object of the MboValue that needs to be copied.
        Returns:
        - True if the field does not need to be copied, otherwise return false.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        Asset.loadSkipFieldCopyHashSet()
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        When a new classUseWith is added, populate all classspecusewith for each classspec record.
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getOwningClassStructure

        public MboRemote getOwningClassStructure()
                                          throws MXException,
                                                 java.rmi.RemoteException
        get Owning ClassStructure for this ClassUseWith object
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • populateClassSpecUseWith

        public void populateClassSpecUseWith()
                                      throws MXException,
                                             java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • checkTopLevel

        public void checkTopLevel(java.lang.String objectName)
                           throws MXException,
                                  java.rmi.RemoteException
        When toplevel is checked, check if in the hierarchy if there already exists a node which the toplevel flag is checked.
        Parameters:
        objectName -
        Throws:
        MXException
        java.rmi.RemoteException