psdi.app.workorder

Class WPItemSet

    • Constructor Detail

      • WPItemSet

        public WPItemSet(MboServerInterface ms)
                  throws MXException,
                         java.rmi.RemoteException
        Construct the set of work plan Item.
        Parameters:
        ms - The MboServerInterface for WPItemSet to access internals of the MXServer.
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • getMboInstance

        protected Mbo getMboInstance(MboSet ms)
                              throws MXException,
                                     java.rmi.RemoteException
        Factory method to create a work plan Item.
        Specified by:
        getMboInstance in class MboSet
        Parameters:
        ms - The WPItem MboSet.
        Returns:
        a work plan Item Mbo.
        Throws:
        MXException
        java.rmi.RemoteException
      • clearIfFirst

        protected void clearIfFirst()
                             throws MXException,
                                    java.rmi.RemoteException
        Clears the work order estimates if this is the first mbo to be added
        Throws:
        MXException
        java.rmi.RemoteException
      • add

        public boolean add(java.lang.String[][] values)
                    throws MXException,
                           java.rmi.RemoteException
        add an item to the wpitem Note that this does setValues for each attribute, in the order they appear in the array, so you need to be careful about the attribute order since field validation is in effect.
        Parameters:
        a - two dimensional array consisting of attribute/value for the item to be added
        Returns:
        true if item is added, false if item is not added
        Throws:
        MXException
        java.rmi.RemoteException
      • canAdd

        public void canAdd()
                    throws MXException
        Determines if the work order can add work plan material/service/tool.
        Overrides:
        canAdd in class MboSet
        Throws:
        MXApplicationException - Thrown with "workorder","ownerWoWPMaterial" if this set isn't owned by a work order.
        Thrown with "workorder", "WOHistory", param (wonum) if the work order is in history.
        Thrown with "workorder", "WPMaterialEdit", param (wonum, status) if the work order edit setting for material/service isn't enabled for this work order's status.
        MXException
      • remove

        public void remove(MboRemote mbo)
                    throws MXException,
                           java.rmi.RemoteException
        remove the child mbo need remove it from the childlookup. Also informs the listeners of the removal.
        Specified by:
        remove in interface MboSetRemote
        Overrides:
        remove in class MboSet
        Throws:
        MXException
        java.rmi.RemoteException
      • setOwner

        public void setOwner(MboRemote mbo)
                      throws MXException,
                             java.rmi.RemoteException
        setOwner is overridden so we can save a reference to the workorder owner.
        Specified by:
        setOwner in interface MboSetRemote
        Overrides:
        setOwner in class MboSet
        Parameters:
        mbo - the owner mbo of this WPItem set.
        Throws:
        MXException
        java.rmi.RemoteException
      • deleteInvReserves

        public void deleteInvReserves()
                               throws MXException,
                                      java.rmi.RemoteException
        When a work order is cancelled, unapproved, or completed/closed, all of the InvReserve Mbos are deleted. This method accomplishes this.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        This method creates the reserve records when the WO is approved., Called when a modification is made to the WPItemSet., This method is called to delete the correct reserves.