psdi.app.jobplan

Class JobPlan

  • All Implemented Interfaces:
    java.rmi.Remote, JobPlanRemote, MboConstants, MboRemote, StatefulMboRemote, MaxRemoteProxy


    public class JobPlan
    extends StatefulMbo
    implements JobPlanRemote
    MBO object that represents a Job Plan. See JobPlan Package description for details.

    This is system level object that can be defined to exist at the system level, organization level or site level.

    The key attributes for this object are OrgId, SiteId and Jpnum.

    The attributes in this object are as follows::

    Attribute NameDescription
    CalendarCalendar to determine the shift in which work is to be done. Foreign key to Calendar
    CrewIdIdentifier of the crew to perform this Job Plan.
    DescriptionDescription of the Job Plan.
    DowntimeIndicates whether the asset must be down when the job plan is implemented.
    InterruptableIndicates whether the job plan can be interrupted once it has started.
    JobplanidA system generated unique identifier for this job plan.
    JpdurationIndicates the estimated number of hours it will take to complete the Job Plan.
    JpnumIdentifier for the Job Plan.
    LaborCodeIndicates the craft primarily responsible for the work.
    OrgIdIdentifier of the organization for this Job Plan.
    Owner
    OwnerGroup
    Persongroup
    PriorityIndicates the priority used for scheduling the work order to which this Job Plan may be assigned.
    StatusThe status of the Job Plan.
    SiteIdIdentifier of the site for the Job Plan.
    SupervisorIdentifier for the person responsible for implementing the work.
    JP6 through JP15Extra Fields.

    • Constructor Detail

      • JobPlan

        public JobPlan(MboSet ms)
                throws MXException,
                       java.rmi.RemoteException
        Construct the job plan object
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Initialization routine. Read-only fields have their READONLY flag set here.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • initFieldFlagsOnMbo

        public void initFieldFlagsOnMbo(java.lang.String attrName)
                                 throws MXException
        Description copied from class: Mbo
        The logic of setting the readonly and required field flags to the mbo. Any setting of the field flags that require expensive operation, such as database query should be moved from init() to this method. However, those which don't require steps such as fetching Mbos can be left in init(). You can group the logic for a few attributes together if logic of deciding their flag is the same, or in other words, can be handled at once.
        Overrides:
        initFieldFlagsOnMbo in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Adds a new Job Plan. Field defaults are set as well as field flags.
        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
        Delete job plan record. A job plan can only be deleted if it is not referenced in either PM, PMSEQUENCE OR WORKORDER. When a job plan is deleted, all references to this job plan in jobtask, joblabor, jobmaterial,jobtool,jpassetsplink jptaskrelation and jobplanclass are also deleted.
        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:
        JobTask.delete(long)
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Can this job plan be deleted ?
        Deletion of a job plan will only be allowed if there is no reference to the job plan in WORKORDER, PM or PMSEQUENCE.
        A user who does not have access to all of the components of a jobplan will not be allowed to delete the jobplan.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        delete
      • generateAutoKey

        public void generateAutoKey()
                             throws java.rmi.RemoteException,
                                    MXException
        generates an autokey for a new JobPlan. This is a unique key(jpnum)that represent a job plan. The same key is copied to jobtask, joblabor, jobmaterial,jobtool and jpassetsplink associated with this job plan.
        Specified by:
        generateAutoKey in interface MboRemote
        Overrides:
        generateAutoKey in class Mbo
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        MboValue.autoKey()
      • duplicate

        public MboRemote duplicate()
                            throws MXException,
                                   java.rmi.RemoteException
        This method creates a duplicate record for JobPlan and related objects.
        Only related objects that the current user has access to will be duplicated.
        Specified by:
        duplicate in interface MboRemote
        Overrides:
        duplicate in class Mbo
        Returns:
        MboRemote The newly duplicated Jobplan
        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 skipped by using the data from the static HashSet. If this field does not need to be copied return true. The following are jobplan fields will be skipped without being copied to the newly duplicated jobplan
        1. jpnum
        2. status
        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
      • getTotals

        public java.util.Vector getTotals(java.lang.String siteid)
                                   throws MXException,
                                          java.rmi.RemoteException
        Returns a vector of the totals for a given jobplan. Totals are based on the jobplan being applied to a specific site.
        The Vector contains the following values in the order as specified below.
        1. totalLabHrs - sum of Labor Hrs
        2. totalLabCost - sum of all the linecost for the labor
        3. totalMatCost - sum of all the linecost for the Material
        4. totalToolCost - sum of all the linecost for the Tool
        5. grandTotal - sum of totalLabCost, totalMatCost, totalToolCost
        Specified by:
        getTotals in interface JobPlanRemote
        Parameters:
        siteid - the site the jobplan applies to.
        Returns:
        A vector of the totals.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        JobPlanRemote.getTotals(String siteid)
      • createJPTaskFromWOTask

        public Mbo createJPTaskFromWOTask(Mbo fromWO,
                                          Mbo fromWOTask,
                                          MboSet jpTasks)
                                   throws MXException,
                                          java.rmi.RemoteException
        Create a Job Plan Task mbo from information on the given Work Order Task mbo.
        Parameters:
        fromWO - = The WO mbo being copied from.
        fromWOTask - = The WO Task mbo being copied.
        jpTasks - = The set of Task mbo's for this Job Plan.
        Returns:
        = The newly created Job Plan Task mbo.
        Throws:
        MXException
        java.rmi.RemoteException
      • createJPTaskFromWOChild

        public Mbo createJPTaskFromWOChild(Mbo fromWO,
                                           Mbo fromWOChild,
                                           MboSet jpTasks)
                                    throws MXException,
                                           java.rmi.RemoteException
        Create a Nested Job Plan Task mbo from information on the given Work Order Task mbo.
        Parameters:
        fromWO - = The WO mbo being copied from.
        fromWOTask - = The WO Child mbo being copied.
        jpTasks - = The set of Task mbo's for this Job Plan.
        Returns:
        = The newly created Job Plan Task mbo with its nested jpnum.
        Throws:
        MXException
        java.rmi.RemoteException
      • createJPLaborFromWOLabor

        public Mbo createJPLaborFromWOLabor(Mbo fromWO,
                                            Mbo fromWOLabor,
                                            MboSet jpLabors)
                                     throws MXException,
                                            java.rmi.RemoteException
        Create a Job Plan Labor mbo from information on the given Work Order Labor mbo.
        Parameters:
        fromWO - = The WO mbo being copied from.
        fromWOLabor - = The WO Labor mbo being copied.
        jpLabors - = The set of Labor mbo's for this Job Plan.
        Returns:
        = The newly created Job Plan Labor mbo.
        Throws:
        MXException
        java.rmi.RemoteException
      • createJPMaterialFromWOMaterial

        public Mbo createJPMaterialFromWOMaterial(Mbo fromWO,
                                                  Mbo fromWOMaterial,
                                                  MboSet jpMaterials)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Create a Job Plan Material mbo from information on the given Work Order Material mbo.
        Parameters:
        fromWO - = The WO mbo being copied from.
        fromWOMaterial - = The WO Material mbo being copied.
        jpMaterials - = The set of Material mbo's for this Job Plan.
        Returns:
        = The newly created Job Plan Material mbo.
        Throws:
        MXException
        java.rmi.RemoteException
      • createJPServiceFromWPService

        public Mbo createJPServiceFromWPService(Mbo fromWO,
                                                Mbo fromWPService,
                                                MboSet jpServiceSet)
                                         throws MXException,
                                                java.rmi.RemoteException
        Create a Job Plan Service mbo from information on the given WP Service mbo.
        Parameters:
        fromWO - = The WO mbo being copied from.
        fromWPService - = The WO Material mbo being copied.
        jpServiceSet - = The set of Service mbo's for this Job Plan.
        Returns:
        = The newly created Job Plan Service mbo.
        Throws:
        MXException
        java.rmi.RemoteException
      • createJPToolFromWOTool

        public Mbo createJPToolFromWOTool(Mbo fromWO,
                                          Mbo fromWOTool,
                                          MboSet jpTools)
                                   throws MXException,
                                          java.rmi.RemoteException
        Create a Job Plan Tool mbo from information on the given Work Order Tool mbo.
        Parameters:
        fromWO - = The WO mbo being copied from.
        fromWOTool - = The WO Tool mbo being copied.
        jpTools - = The set of Tool mbo's for this Job Plan.
        Returns:
        = The newly created Job Plan Tool mbo.
        Throws:
        MXException
        java.rmi.RemoteException
      • createJPAssetFromWOAsset

        public void createJPAssetFromWOAsset(Mbo fromWO,
                                             MboSet jpAssets)
                                      throws MXException,
                                             java.rmi.RemoteException
        Create a Job Plan Asset Set from information on the given Work Order mbo.
        Parameters:
        fromWO - = The WO mbo being copied from.
        jpAssets - = The set of Asset mbo's for this Job Plan.
        Throws:
        MXException
        java.rmi.RemoteException
      • createJPTaskRelFromWOTaskRel

        public Mbo createJPTaskRelFromWOTaskRel(Mbo fromWO,
                                                Mbo fromWOTaskRel,
                                                MboSet jptaskRelations,
                                                java.util.Map woTaskLookup)
                                         throws MXException,
                                                java.rmi.RemoteException
        Create a Job Plan Task Relation mbo from information on the given Work Order Task Relation mbo.
        If the owning wonum or the predrefwonum is not found in the woTaskLookup Map then a null will be returned.
        Parameters:
        fromWO - = The WO mbo being copied from.
        fromWOTaskRel - = The WO task relationship mbo being copied.
        jpTaskRelations - = The set of task relationship mbo's for this Job Plan.
        woTaskLookup - = A Map containing original wo numbers and new task ids
        Returns:
        = The newly created Job Plan JpTaskRelation mbo.
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        This method will be called to make sure it is a valid Job Plan record.
        If this jobplan is not being added, the validateJPKey() method is called to validate the jpnum, orgid, siteid key combination.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException - If jobplan key is invalid then an MXApplicationException will be thrown
        java.rmi.RemoteException
      • validateJPKey

        public void validateJPKey()
                           throws MXException,
                                  java.rmi.RemoteException
        This method will be called to verify the Job Plan key combination. Job Plans can be defined at the system level, the organization level, or the site level. Using different key combinations a specific jpnum can only exist in one level.
        For example :
        If Job Plan 1000 has no org id and no site id then Job Plan 1000 can only exist at the system level. In this case there can only be one Job Plan 1000
        If Job Plan 2000 has an orgid and no siteid then Job Plan 2000 can exist at the organization level. In this case there can be many Job Plan 2000's, but the org ids cannot be null and they all must be different.
        If Job Plan 3000 has an orgid and a siteid then Job Plan 3000 can only exist at the site level. In this case there can be many Job Plan 3000's, but the org and site ids cannot be null and all the site ids must be different.
        Job Plan 2000 can exist at the org level for org A and at the site level for org B.
        Throws:
        MXException - If job plan key is invalid for a specific level
        java.rmi.RemoteException
      • getMboSet

        public MboSetRemote getMboSet(java.lang.String name)
                               throws MXException,
                                      java.rmi.RemoteException
        Return related Job Plan sets that belong to the orgs and sites the user has access to.
        This would include rows where the org id is in the set of orgs the user has access to or where the org id is null
        - AND / OR -
        Rows where the site id is in the set of sites the user has access to or where the site id is null
        For example :
        If the user only has access to org A, this method will return rows in related sets where the orgid = 'A' or the orgid is null.
        Specified by:
        getMboSet in interface MboRemote
        Overrides:
        getMboSet in class Mbo
        Parameters:
        name - The relationship provided to retrieve a related mboSet, usually using foreign keys. For example, "psdi.app.workorder.WOSetRemote.ASSET" is a relationship for the work order object to access the asset Set where "workorder.assetnum=asset.assetnum". The relationship can also be chained. Such as ASSET.ASSETSTATUS.
        Returns:
        The returned related set specified through the relationship.
        Throws:
        MXException - "A relationship called {0} does not exist for the {1} business object" exception will be thrown if the relationship was not found. "Unknown Object" exception will be thrown if the database object can not be found through the relationship.
        java.rmi.RemoteException
        See Also:
        Mbo.getMboSet(String)
      • deleteJobTaskComponents

        public void deleteJobTaskComponents(int jptask,
                                            java.lang.String taskorg,
                                            java.lang.String tasksite)
                                     throws MXException,
                                            java.rmi.RemoteException
        Deletes the jobtask component records that belong to the given Task Number:Orgid:Siteid key combination. A components will be deleted when an associated job task is deleted from a job plan.
        Parameters:
        jptask - Job Task number
        orgid - Job Task org
        siteid - Job Task site
        Throws:
        MXException
        java.rmi.RemoteException
      • undeleteJobTaskComponents

        public void undeleteJobTaskComponents(int jptask,
                                              java.lang.String taskorg,
                                              java.lang.String tasksite)
                                       throws MXException,
                                              java.rmi.RemoteException
        Undeletes the jobtask component records that belong to the given Task Number:Orgid:Siteid key combination. A components will be undeleted when an associated job task is undeleted from a job plan.
        Parameters:
        jptask - Job Task number
        orgid - Job Task org
        siteid - Job Task site
        Throws:
        MXException
        java.rmi.RemoteException
      • updatePredecessorFields

        public void updatePredecessorFields()
                                     throws MXException,
                                            java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • componentAdded

        public void componentAdded()
                            throws MXException,
                                   java.rmi.RemoteException
        Called when a component is added to this Job Plan. If this Job Plan is to be added then this method will make the org and site fields readonly so they cannot be changed
        Specified by:
        componentAdded in interface JobPlanRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        JobPlan.componentAdded()
      • getStatusHistory

        protected MboSetRemote getStatusHistory()
                                         throws MXException,
                                                java.rmi.RemoteException
        Jobplan revision control status. OLD Since the jobplan does not have status history, JPDUMMYSTATUS object is created as a place holder for it.
        Specified by:
        getStatusHistory in class StatefulMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • changeStatus

        public void changeStatus(java.lang.String status,
                                 java.util.Date date,
                                 java.lang.String memo,
                                 long accessModifier)
                          throws MXException,
                                 java.rmi.RemoteException
        This method is overridden to add a wrapper to exceptions thrown during change status and to write warnings whether or not the status change is successful
        Specified by:
        changeStatus in interface StatefulMboRemote
        Overrides:
        changeStatus in class StatefulMbo
        Parameters:
        status - The new desired status. This is the translated status (that is, the status code as it would have been entered by a user, or valuelist.value), not the internal status value (valuelist.maxvalue).
        date - The effective date of the new status (java.util.Date). If null the current date/time is used.
        memo - A string briefly describing the circumstances of the change. The memo can be null.
        accessModifier - A value of NOACCESSCHECK will cause the method not to call canChangeStatus. Callers using this flag are responsible for ensuring that they are attempting a valid status change.
        Throws:
        MXException - Thrown if there is a problem.
        java.rmi.RemoteException
        See Also:
        StatefulMbo.canChangeStatus(String)
      • canChangeStatus

        public void canChangeStatus(JobPlanRemote jobplan,
                                    java.lang.String currentStatus,
                                    java.lang.String desiredStatus)
                             throws MXException,
                                    java.rmi.RemoteException
        Checks the nested jobplans, parent to see if status change is allowed. Throw message when a status change is attempted on a Job Plan that is nested under another Job Plan.
        Parameters:
        jobplan - The current jobplan mbo.
        currentStatus - The current status of the jobplan.
        desiredStatus - The desired status of the jobplan, that its being changed to.
        Throws:
        MXException
        java.rmi.RemoteException
      • nestedJobPlans

        public boolean nestedJobPlans(JobPlanRemote jobplan,
                                      java.lang.String currentStatus,
                                      java.lang.String desiredStatus)
                               throws MXException,
                                      java.rmi.RemoteException
        Check the nested status's and throws a message prompting the user to change the status.
        Parameters:
        jobplan - The current jobplan mbo.
        currentStatus - The current status of the jobplan.
        desiredStatus - The desired status of the jobplan, that its being changed to.
        Returns:
        true or false - True is returned is user agrees to change the status, else false is returned.
        Throws:
        MXException
        java.rmi.RemoteException
      • doChangeStatus

        public void doChangeStatus(JobPlanRemote jobplan,
                                   java.lang.String currentStatus,
                                   java.lang.String desiredStatus,
                                   java.util.Date date,
                                   java.lang.String memo)
                            throws MXException,
                                   java.rmi.RemoteException
        Does the actual work of changing the status down the hierarchy.
        Parameters:
        jobplan - The current jobplan, in the nest.
        currentStatus - The current status of the jobplan.
        desiredStatus - The desired status of the jobplan, that its being changed to.
        memo -
        date -
        Throws:
        MXException
        java.rmi.RemoteException
      • getJobPlanComponentSet

        public MboSetRemote getJobPlanComponentSet(java.lang.String maxRelName,
                                                   java.lang.String orgid,
                                                   java.lang.String siteid)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Get a set of components for this job plan based on relationship name, orgid and siteid.

        Components returned for this job plan are any components where :
        the orgid and siteid match the passed in orgid and siteid,
        the orgid matches the passed in orgid and the siteid is null,
        the orgid and siteid are null
        Note : This method will return a set where one or more objects may have been removed() from the set. Do not use .count() on the returned set. .count() will return a count of all the objects in the set, including the ojects that have been removed.
        Specified by:
        getJobPlanComponentSet in interface JobPlanRemote
        Parameters:
        maxRelName - - name of the job plan component relationship
        orgid - - organization id
        siteid - - site id
        Returns:
        MboSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        JobPlan.getJobPlanComponentSet(java.lang.String, java.lang.String, java.lang.String)
      • validateProcessFlow

        public void validateProcessFlow()
                                 throws MXException,
                                        java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • validateNetwork

        public void validateNetwork(java.util.Hashtable htSuccessors,
                                    java.util.LinkedList startingNodes,
                                    boolean printDebugMsgs)
                             throws MXException,
                                    java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • findMatchingTasks

        public java.util.Stack findMatchingTasks(MboSetRemote taskSet,
                                                 java.lang.String orgid,
                                                 java.lang.String siteid,
                                                 java.lang.String jptask)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        protected void save()
                     throws MXException,
                            java.rmi.RemoteException
        Actions which occur when a job plan is saved.
        Overrides:
        save in class StatefulMbo
        Throws:
        MXException - MAXIMO System Error
        java.rmi.RemoteException - RMI Error
        See Also:
        Mbo.add()
      • suspendChildrensProcessFlow

        public void suspendChildrensProcessFlow(boolean torf)
                                         throws MXException,
                                                java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • setChildrensFlowControl

        public void setChildrensFlowControl(boolean torf)
                                     throws MXException,
                                            java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • changeChildrensFieldValue

        public void changeChildrensFieldValue(java.lang.String fieldname,
                                              java.lang.String fieldvalue,
                                              long accessModifier)
                                       throws MXException,
                                              java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getPreviousActiveRevisionJobPlan

        protected MboSetRemote getPreviousActiveRevisionJobPlan(int revisionNum)
                                                         throws MXException,
                                                                java.rmi.RemoteException
        Gets the previous active revision job plan.
        Parameters:
        revisionNum - the revision num
        Returns:
        the previous revision job plan
        Throws:
        MXException - MAXIMO System Error
        java.rmi.RemoteException - RMI Error
      • hasWarning

        protected boolean hasWarning(MboSetRemote set,
                                     java.lang.String errGrp,
                                     java.lang.String errKey)
                              throws java.rmi.RemoteException
        Determines if the given MBOSet contains the given type of error.
        Parameters:
        set -
        errGrp -
        errKey -
        Returns:
        Throws:
        java.rmi.RemoteException
      • propagateRevisionStatus

        public void propagateRevisionStatus(JobPlanRemote newRevision)
                                     throws java.rmi.RemoteException,
                                            MXException
        Propagate the new Status number to related objects.
        Parameters:
        newRevision - the new job plan revision
        Throws:
        MXException
        java.rmi.RemoteException
      • propagateRevisionNumber

        public void propagateRevisionNumber(JobPlanRemote newRevision)
                                     throws java.rmi.RemoteException,
                                            MXException
        Propagate the new revision number to related objects.
        Parameters:
        newRevision - the new job plan revision
        Throws:
        MXException
        java.rmi.RemoteException
      • revise

        public MboRemote revise(java.lang.String revDescription)
                         throws MXException,
                                java.rmi.RemoteException
        Creates a new revision of the current Job Plan.
        1. The new job plan has the same jp number as the old data sheet.
        2. The new job plan has a new revision number.
        3. The status of the new job plan will be set to PENDING REVISION. The status of the old revision will remain ACTIVE.
        4. When the status new revision is changed to ACTIVE, the status of the old revision will be set to REVISED.
        Specified by:
        revise in interface JobPlanRemote
        Returns:
        a reference to the newly created job plan.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        canRevise
      • canRevise

        public void canRevise()
                       throws MXException,
                              java.rmi.RemoteException
        Checks if a new revison can be created from the current job plan.
        1. A revision cannot be created from a job plan that has already been revised. In other words, the currenct job plan cannot be in the REVISED status.
        2. The current job plan must be in the ACTIVE status before a revision can be created.
        Specified by:
        canRevise in interface JobPlanRemote
        Throws:
        MXApplicationException("pluscjp", - "AlreadyRevised") - thrown if the current job plan is in the REVISED status.
        MXApplicationException("pluscjp", - "ShouldBeActive") - thrown if the currenct job plan is not active
        MXException
        java.rmi.RemoteException
        See Also:
        JobPlan.canRevise()
      • isRevisionStatusNotAllowed

        public boolean isRevisionStatusNotAllowed()
                                           throws java.rmi.RemoteException,
                                                  MXException
        Checks if the actual status is PNDRV OR REVISED
        Returns:
        true, if is revision status not allowed
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • setStatusHistoryFields

        public void setStatusHistoryFields(JobPlan jp,
                                           java.util.Date date,
                                           java.lang.String memo)
                                    throws java.rmi.RemoteException,
                                           MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • active

        public void active(MboRemote jobplan,
                           java.lang.String currentMaxStatus,
                           java.lang.String desiredStatus,
                           java.util.Date date)
                    throws MXException,
                           java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getNextRevNum

        public int getNextRevNum()
                          throws java.rmi.RemoteException,
                                 MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • getMaxValidStatusRevNum

        public int getMaxValidStatusRevNum()
                                    throws java.rmi.RemoteException,
                                           MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • getSpecificStringOfSites

        public java.lang.String getSpecificStringOfSites(MboSetRemote jobPlanSubSets)
                                                  throws MXException,
                                                         java.rmi.RemoteException
        IV59026: this is a different way of 12-14141/IV26317 to avoid while looping mbosets of jpassetsplink, joblabor,jobmaterial,jobservice, jobtool, and jobtasks this method is used in conjuntion with getMboSet(String) for the sub sets of a jobplan such as Materials/tools/services/tasks. The JobPlan.getMboSet() intends to further restrict the subsets by the sites they are authorized for. But if the security group has more than 1000 sites, then sql error occurred. This method intends to produce a smaller set of sites by the records inside the subsets.
        Parameters:
        jobPlanSubSets -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • copyCrewTypeToWpLaborSet

        public void copyCrewTypeToWpLaborSet(MboSetRemote crewTypeSet)
                                      throws MXException,
                                             java.rmi.RemoteException
        copyCrewTypeCreates method - job plan labor set for the selected crew Type set.
        Parameters:
        crewTypeSet -
        Throws:
        MXException
        java.rmi.RemoteException
      • getHistoryFlag

        public boolean getHistoryFlag()
                               throws java.rmi.RemoteException,
                                      MXException
        From StatefulMo: "For stateful mbo, there should always be a history flag. If not, overwrite this method to return true if the record is closed or considered as a historic record. Don't call super() when overwrite this method. In all other cases, return false."
        Throws:
        MXException
        java.rmi.RemoteException
      • setRevisedStatus

        public void setRevisedStatus(boolean value)
                              throws MXException,
                                     java.rmi.RemoteException
        Set JobPlan Revised status.
        Throws:
        MXException
        java.rmi.RemoteException
      • getRevisedStatus

        public boolean getRevisedStatus()
                                 throws MXException,
                                        java.rmi.RemoteException
        Return JobPlan if it's Revised status or not.
        Throws:
        MXException
        java.rmi.RemoteException
      • setListPage

        public void setListPage(boolean value)
                         throws MXException,
                                java.rmi.RemoteException
        Set listPage flag to be true, if it's coming from List Page Job Plan.
        Throws:
        MXException
        java.rmi.RemoteException
      • getListPage

        public boolean getListPage()
                            throws MXException,
                                   java.rmi.RemoteException
        Return true if it's coming from List Page Job Plan.
        Throws:
        MXException
        java.rmi.RemoteException
      • isDuringDUPLICATE

        public boolean isDuringDUPLICATE()
        IJ09032: Return true if it's coming from the app bean DUPLICATE method
      • setDuringDUPLICATE

        public void setDuringDUPLICATE(boolean value)
        IJ09032: Used by JobPlanAppBean to set whether the DUPLICATE method is executing