psdi.app.jobplan

Class JobPlanClass

  • java.lang.Object
    • Constructor Detail

      • JobPlanClass

        public JobPlanClass(MboSet ms)
                     throws java.rmi.RemoteException
        Parameters:
        ms -
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        if this JobPlanClass is not new and it is the default, that is, its IsDefault attribute is set to true, then IsDefault is set to READONLY.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Description copied from class: Mbo
        This is called when a new Mbo is added to the Mboset collection. It is called AFTER user defaults have been set from the data dictionary. Programmer should usually override this to set some defaults. Default behavior is to do nothing.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Description copied from class: Mbo
        Mark the object to be deleted depending on the access modifier. This will usually be overridden in the subclass of Mbo as there may be application specific rules as to if and when an object can be deleted. Object is not actually deleted in the database until save() is called. This method will also mark all associated Long Description and Translation Mbos for deletion.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessModifier - The bitwise flag specified to determine if certain normal security checks are to be bypassed for this delete request. For example: if the accessModifer is NOACCESSCHECK, then the check for the object's NODELETE flag and the call to the object's canDelete() method will not be performed. If the accessModifer is NONE, then all the access checks are performed before this object is marked delete.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        JobPlan's default JobPlanClass, that is, the JobPlanClass where IsDefault is true can only be deleted if it is the last JobPlanClass. Others may exist in the set but if they are all marked for deletion then they are not considered.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • undelete

        public void undelete()
                      throws MXException,
                             java.rmi.RemoteException
        Overridden to check whether the default job plan class is marked for deletion. If so throw exception to avoid saving the set without having a default job plan class.
        Specified by:
        undelete in interface MboRemote
        Overrides:
        undelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • maintainSingleDefaultJPClass

        public void maintainSingleDefaultJPClass()
                                          throws MXException,
                                                 java.rmi.RemoteException
        called when this JobPlanClass has had its IsDefault attribute set to true. Loops through this JobPlanClass' set to make sure all other members have their IsDefault attribute set to false. Only one JobPlanClass can be the default for its owning job plan.
        Throws:
        MXException
        java.rmi.RemoteException
      • maintainWOClassUniqueness

        public void maintainWOClassUniqueness()
                                       throws MXException,
                                              java.rmi.RemoteException
        makes sure duplicate woclass is not added for the owning job plan
        Throws:
        MXApplicationException("jobplan","jpclassAlreadyExists",param) - when this JobPlanClass' WOClass attribute is a duplicate of another WOClass in its set.
        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 skipped by using the data from the static HashSet. If this field does not need to be copied return true. The following are jobplanclass fields that will be skipped without being copied to the newly duplicated jobplanclass
        1. JOBPLANID
        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.In all other cases return false.
        Throws:
        java.rmi.RemoteException
        MXException