psdi.plusc.app.pluscds

Class PlusCDS

    • Field Detail

      • CANDELETEPOINTAPPR

        public static final java.lang.String CANDELETEPOINTAPPR
        The Constant CANDELETEPOINTAPPR.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PlusCDS

        public PlusCDS(MboSet ms)
                throws MXException,
                       java.rmi.RemoteException
        Instantiates a new plus cds.
        Parameters:
        ms - the ms
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
    • Method Detail

      • 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
      • setFieldEditibilityFlags

        protected void setFieldEditibilityFlags()
                                         throws MXException,
                                                java.rmi.RemoteException
        Sets the field editibility flags.
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • initRelationship

        public void initRelationship(java.lang.String relationName,
                                     MboSetRemote mboSet)
                              throws MXException,
                                     java.rmi.RemoteException
        Description copied from class: Mbo
        Called whenever a relationship is initialized or reset from this Mbo to another MboSet. Programmers can override this method for custom handling of related objects. An example of this would be making the WPMATERIAL object read only if the status of the Work Order is CLOSED.
        Overrides:
        initRelationship in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • 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
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Description copied from class: Mbo
        Can the object be deleted ? This is object specific and should be overridden.
        Overrides:
        canDelete 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)
      • undelete

        public void undelete()
                      throws MXException,
                             java.rmi.RemoteException
        Description copied from class: Mbo
        Unmark the Mbo for deletion. Can only be called after a delete() and before the save() has been performed. This method will also unmark associated Long Description and Translation Mbos.
        Specified by:
        undelete in interface MboRemote
        Overrides:
        undelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • duplicateforRevise

        public MboRemote duplicateforRevise(boolean isRevising)
                                     throws MXException,
                                            java.rmi.RemoteException
        Duplicatefor revise.
        Parameters:
        isRevising - the is revising
        Returns:
        the mbo remote
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - Duplicate a DS, depending on isRevising variable, it will apply or not a revision on the duplicated DS.
      • copyDSInstrAndPoints

        public MboRemote copyDSInstrAndPoints(MboRemote newDS)
                                       throws MXException,
                                              java.rmi.RemoteException
        Copy ds instr and points.
        Parameters:
        newDS - the new ds
        Returns:
        the mbo remote
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - Copies the AF and CalPoints to a DS passed as parameter.
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        Fields that are not to be copied.
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        mvi - the mvi
        Returns:
        true, if successful
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • getStatusHandler

        protected StatusHandler getStatusHandler()
        Description copied from class: StatefulMbo
        Return the status handler object to be used for the actual changing of the status. This is only called once by the framework. This method must be provided by the Mbo programmer.
        Specified by:
        getStatusHandler in class StatefulMbo
      • getStatusHistory

        protected MboSetRemote getStatusHistory()
                                         throws MXException,
                                                java.rmi.RemoteException
        Description copied from class: StatefulMbo
        Return the MboSet object used for storing the status change history. This method must be provided by the Mbo programmer.
        Specified by:
        getStatusHistory in class StatefulMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • changeStatus

        public void changeStatus(java.lang.String newStatus,
                                 java.util.Date date,
                                 java.lang.String memo)
                          throws MXException,
                                 java.rmi.RemoteException
        Change status.
        Specified by:
        changeStatus in interface StatefulMboRemote
        Overrides:
        changeStatus in class StatefulMbo
        Parameters:
        newStatus - the new status
        date - the date
        memo - the memo
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
        See Also:
        psdi.plusc.app.pluscds.PlusCDSStatusHandler.approve
      • reviseDataSheet

        public MboRemote reviseDataSheet(java.lang.String revDescription)
                                  throws MXException,
                                         java.rmi.RemoteException
        Diego Moreira - Issue #14574 Creates a new revision of the current Data Sheet.
        1. The new Data Sheet has the same ds number as the old data sheet.
        2. The new data sheet has a new revision number.
        3. When the status of the new data sheet would be set to PENDING REVISION. The status of the old revision will remain APPROVED.
        4. When the new revision is approved the status of the old revision will be set to REVISED.
        Specified by:
        reviseDataSheet in interface PlusCDSRemote
        Parameters:
        revDescription - the rev description
        Returns:
        Returns the newly created data sheet revision reference.
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
        See Also:
        canReviseDataSheet
      • canReviseDataSheet

        public void canReviseDataSheet()
                                throws MXException,
                                       java.rmi.RemoteException
        Checks if a new revison can be created from the current data sheet.
        1. A revision cannot be created from a data sheet that has already been revised. In other words the currenct data sheet cannot be in the REVISED status.
        2. The current data sheet must be in the APPROVED status before a revision can be created.
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        Description copied from class: StatefulMbo
        Overrides the save of Mbo so that a row is added to the status history table when a new object is saved.
        Overrides:
        save in class StatefulMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Description copied from class: Mbo
        Pre-save validation method. Programmer can override with specific rules.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • checkStatus

        public void checkStatus()
                         throws MXException,
                                java.rmi.RemoteException
        Check the status of the DataSheet before any row is add to it's set obejct. If the Data Sheet is in approved Status no row can be added.
        Specified by:
        checkStatus in interface PlusCDSRemote
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • getRecordType

        protected java.lang.String getRecordType()
        Overrides:
        getRecordType in class Mbo