psdi.app.workorder

Class FailureReportSet

    • Constructor Detail

      • FailureReportSet

        public FailureReportSet(MboServerInterface ms)
                         throws MXException,
                                java.rmi.RemoteException
        Construct the set
        Parameters:
        ms - The MboServerInterface of failure report.
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • getMboInstance

        protected Mbo getMboInstance(MboSet ms)
                              throws MXException,
                                     java.rmi.RemoteException
        Generates a new failure report object
        Specified by:
        getMboInstance in class MboSet
        Parameters:
        ms - The MboSet of the failure report.
        Returns:
        a new failure report Mbo object.
        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 the failure report, it should be WORKORDER or null.
        Throws:
        MXException
        java.rmi.RemoteException
      • canAdd

        public void canAdd()
                    throws MXException
        Can't add if the report is complete or if the owning work order does not have a value for its FailureCode attribute.
        Overrides:
        canAdd in class MboSet
        Throws:
        MXAccessException - Thrown with "access","method" when it's not possible to add to the failure report.
        MXApplicationException - Thrown with "workorder", "FRNoEditWithOutWO" if this set isn't owned by its work order.
        MXException
      • doDelete

        public boolean doDelete()
        Called by FR's when they are to be deleted. If they should just delete, this function returns true. Otherwise the FR.delete will call clearFromHere to take control of the deletions.
      • clearFromHere

        public void clearFromHere(FailureReport fr)
                           throws MXException,
                                  java.rmi.RemoteException
        Delete from the passed FR down to the end of the failure report. Updates internal variables. Normally called via the FR's delete method. Will clear the workorder's ProblemCode if the first level of the report is deleted.
        Parameters:
        fr - The level to delete from.
        Throws:
        MXApplicationException - FRBroken when the FR to delete is not found.
        MXException
        java.rmi.RemoteException
      • deleteAll

        public void deleteAll(long accessModifier)
                       throws MXException,
                              java.rmi.RemoteException
        Overridden for efficancy's sake. Will clear the work order's ProblemCode.
        Specified by:
        deleteAll in interface MboSetRemote
        Overrides:
        deleteAll in class MboSet
        Parameters:
        accessModifier -
        Throws:
        MXException
        java.rmi.RemoteException
      • codeSet

        public void codeSet(MboRemote forThisFR)
                     throws MXException,
                            java.rmi.RemoteException
        Called when a FR's FailureCode is set and should be called after the LineNum attribute is set. Updates internal variables. Changing the failure code deletes any FRs in the report after the one whose code is changing. Will update the ProblemCode if the first level's failure code changes.
        Parameters:
        forThisFR - The FailureReport line whose FailureCode attribute changed.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        FldFRCode
      • isComplete

        public boolean isComplete()
                           throws MXException,
                                  java.rmi.RemoteException
        Returns whether this report can be added to. Returns true if the failure report cannot be extended. Also returns false if the WO's Failure Code is not set since no report lines can be written with out it.
        Specified by:
        isComplete in interface FailureReportSetRemote
        Returns:
        true if this report be added to.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        FailureReportSet.isComplete()
      • reflectFailureClass

        public void reflectFailureClass()
                                 throws MXException,
                                        java.rmi.RemoteException
        Called when the WO's FailureCode attribute's value is changed. Clears any existing failure report.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        FldWOFailureCode
      • reflectProblemCode

        public void reflectProblemCode()
                                throws MXException,
                                       java.rmi.RemoteException
        Called when the WO's ProblemCode attribute is updated. Starts or modifies the FailureReport.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        FldWOProblemCode
      • getParentOfProblemCode

        public java.lang.String getParentOfProblemCode()
                                                throws MXException,
                                                       java.rmi.RemoteException
        Returns the parent key into FailureList for the 1st level of the report. For validation of the WO ProblemCode attribute. Returns the FailureList parent of the work order's problem code, a.k.a. the parent of the first level.
        Specified by:
        getParentOfProblemCode in interface FailureReportSetRemote
        Returns:
        The parent in the failure list heirarchy of the problem code.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        FailureReportSet.getParentOfProblemCode()
      • getEndOfReport

        public MboRemote getEndOfReport()
                                 throws MXException,
                                        java.rmi.RemoteException
        Returns the end of the failure report. If the failure report is complete, null is returned. If the last level of the report doesn't have a null failure code, another level is added. If the return value isn't null, than the MboRemote will have null for the FailureCode attribute.
        Specified by:
        getEndOfReport in interface FailureReportSetRemote
        Returns:
        the end Mbo of the failure report or null.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        FailureReportSet.getEndOfReport()
      • register

        public void register(int levelNum)
      • isLevelEditable

        public boolean isLevelEditable(int levelNum)
                                throws MXException,
                                       java.rmi.RemoteException
        Registers FR<#>Code attributes on the Work Order
        Throws:
        MXException
        java.rmi.RemoteException
      • refreshFRCodes

        public void refreshFRCodes()
                            throws MXException,
                                   java.rmi.RemoteException
        Refreshes the values of the FR<#>Code attributes on the work order
        Throws:
        MXException
        java.rmi.RemoteException
      • doUndelete

        public boolean doUndelete()
        Called by FR's when they are to be deleted. If they should just delete, this function returns true. Otherwise the FR.delete will call clearFromHere to take control of the deletions.