psdi.app.workorder

Class WOSet

    • Field Detail

      • skipappvalidate

        public boolean skipappvalidate
      • dispWonumExpr

        protected java.lang.String dispWonumExpr
        Holds the QBE filter for the nonpersistent attribute DisplayWonum
      • dispTaskExpr

        protected java.lang.String dispTaskExpr
        Holds the QBE filter for the nonpersistent attribute DisplayTaskID
      • unCommittedAncestors

        public java.util.Vector unCommittedAncestors
    • Constructor Detail

      • WOSet

        public WOSet(MboServerInterface ms)
              throws MXException,
                     java.rmi.RemoteException
        Construct the set of work orders.
        Parameters:
        ms - The MboServerInterface WOSet used 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 work orders.
        Specified by:
        getMboInstance in class MboSet
        Parameters:
        ms - the WO MboSet.
        Returns:
        a work order Mbo.
        Throws:
        MXException
        java.rmi.RemoteException
      • workordersForLaborOrCraft

        public void workordersForLaborOrCraft(java.lang.String labor,
                                              java.lang.String craft)
                                       throws MXException,
                                              java.rmi.RemoteException
        Sets this WOSet to work orders which have assignments either assigned for the laborcode specified or wait-to-be-assigned for the craft specified. The set is ordered by the work order's target start dates.
        Specified by:
        workordersForLaborOrCraft in interface WOSetRemote
        Parameters:
        craft - Craft to use to search for unassigned requirements.
        labor - LaborCode to use to search for assigned requirements.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WOSet.workordersForLaborOrCraft(String labor, String craft)
      • onlyTopLevels

        public void onlyTopLevels()
                           throws MXException,
                                  java.rmi.RemoteException
        Takes the current where clause of the set and limits it further to work orders which aren't sub-work orders. The set's where clause is changed and the set is reset.
        Specified by:
        onlyTopLevels in interface WOSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WOSet.onlyTopLevels()
      • getHistory

        public boolean getHistory()
                           throws MXException,
                                  java.rmi.RemoteException
        Get method for show no cancelled work orders filter.
        Specified by:
        getHistory in interface WOSetRemote
        Returns:
        The userpref setting for history work orders(true/false).
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WOSet.getHistory()
      • getCurrent

        public boolean getCurrent()
                           throws MXException,
                                  java.rmi.RemoteException
        Gets the current setting which was set by the user.
        Specified by:
        getCurrent in interface WOSetRemote
        Returns:
        The userpref setting for current work orders(true/false).
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WOSet.getCurrent()
      • getLocsystem

        public java.lang.String getLocsystem()
                                      throws MXException,
                                             java.rmi.RemoteException
        Gets the locsystem setting which was set by the user.
        Specified by:
        getLocsystem in interface WOSetRemote
        Returns:
        The userpref setting for the location system.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WOSet.getLocsystem()
      • getLocgroup

        public java.lang.String getLocgroup()
                                     throws MXException,
                                            java.rmi.RemoteException
        Gets the locgroup setting which was set by the user.
        Specified by:
        getLocgroup in interface WOSetRemote
        Returns:
        The userpref setting for the location group.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WOSet.getLocgroup()
      • canAdd

        public void canAdd()
                    throws MXException
        Work orders may be added to a set which is owned by a work order which may not own other work orders.
        Overrides:
        canAdd in class MboSet
        Throws:
        MXException
      • changeWorkOrderParent

        public void changeWorkOrderParent(MboRemote woparent)
                                   throws MXException,
                                          java.rmi.RemoteException
        Changes the selected work order's parents to point to the work order passed as a parameter. Since this may be a longish operation, the method can spawn a thread and run in the background and the output of the reassignments will be emailed to the user. If the method is run in the foreground, then the warnings should be gotten from the WOSet. If no records are selected, then nothing happens and no email is sent.
        Specified by:
        changeWorkOrderParent in interface WOSetRemote
        Parameters:
        woparent - The new parent of this work order.
        executeAsync - If true, a new thread is spawned to perform the task in the background.
        Throws:
        MXAccessException - Thrown with "workorder","noemail" when the logged in user does not have an email address defined.
        MXApplicationException - Thrown with "pm", "MailServerMissing" when there's no email server defined in the MXServer properties file.
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.workorder.WOSet#changeWorkOrderParent()
      • getUserWhere

        public java.lang.String getUserWhere(java.lang.String alias)
                                      throws MXException,
                                             java.rmi.RemoteException
        This method overridden to support QBE on nonpersistent attributes DisplayWonum and DisplayTaskID. Method getQbeWhere is not overrideable but this method is called to get the "User" clause or the QBE clause by the method that builds the complete where clause.
        Overrides:
        getUserWhere in class MboSet
        Throws:
        MXException
        java.rmi.RemoteException
      • getExternalList

        public java.lang.String getExternalList(java.lang.String listName,
                                                java.lang.String internalValue,
                                                java.lang.String siteID,
                                                java.lang.String orgID)
                                         throws MXException,
                                                java.rmi.RemoteException
        Returns the external list of synonyms for a given valuelist and maxvalue (+ site and org).
        Specified by:
        getExternalList in interface WOSetRemote
        Parameters:
        listName - Name of the ValueList
        internalValue - The MaxValue to get synonyms for
        siteID - The Site to get the synonyms for.
        orgID - The organization to get the synonyms for.
        Returns:
        The comma, quoted list.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.workorder.WOSet#getExternalList(String listName, String internalValue)
      • getExternalValues

        public java.lang.String getExternalValues(java.lang.String listName,
                                                  java.lang.String internalValue,
                                                  java.lang.String siteID,
                                                  java.lang.String orgID)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Returns the external list of synonyms for a given valuelist and maxvalue (+ site and org).
        Specified by:
        getExternalValues in interface WOSetRemote
        Parameters:
        listName - Name of the ValueList
        internalValue - The MaxValue to get synonyms for
        siteID - The Site to get the synonyms for.
        orgID - The organization to get the synonyms for.
        Returns:
        The comma, quoted list.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.workorder.WOSet#getExternalList(String listName, String internalValue)
      • getChildren

        public MboValueData[][] getChildren(java.lang.String object,
                                            java.lang.String key,
                                            java.lang.String[] attrs,
                                            int maxRows)
                                     throws MXException,
                                            java.rmi.RemoteException
        Returns zero or more children objects in the hierarchy.
        Specified by:
        getChildren in interface HierarchicalMboSetRemote
        Parameters:
        object - - name of the object whose children are being requested.
        key - - unique id of the object whose children are being fetched.
        attrs - - list of attributes whose values are requested, the attribute data returned in the attribute list correspond to this list.
        maxRows - - maximum number of rows to return.
        Returns:
        MboValueData[][] - contains an array of Object name, Object key, hasChildren flag, hasParents flag, list of attributes data from the passed attributes list.
        Throws:
        MXException
        java.rmi.RemoteException
      • getParent

        public MboValueData[] getParent(java.lang.String object,
                                        java.lang.String key,
                                        java.lang.String[] attrs)
                                 throws MXException,
                                        java.rmi.RemoteException
        Returns zero or one parent object for the given object in the hierarchy. This method returns the immediate parent object of the given object.
        Specified by:
        getParent in interface HierarchicalMboSetRemote
        Parameters:
        object - - name of the object whose children are being requested.
        key - - unique id of the object whose children are being fetched.
        attrs - - list of attributes whose values are requested, the attribute data returned in the attribute list correspond to this list.
        Returns:
        MboValueData[] - contains Object name, Object key, hasChildren flag, hasParents flag, list of attributes data from the passed attributes list.
        Throws:
        MXException
        java.rmi.RemoteException
      • getSiblings

        public MboValueData[][] getSiblings(java.lang.String object,
                                            java.lang.String key,
                                            java.lang.String[] attrs,
                                            int maxRows)
                                     throws MXException,
                                            java.rmi.RemoteException
        Returns zero or more siblings of the given object in the hierarchy.
        Specified by:
        getSiblings in interface HierarchicalMboSetRemote
        Parameters:
        object - - name of the object whose children are being requested.
        key - - unique id of the object whose children are being fetched.
        attrs - - list of attributes whose values are requested, the attribute data returned in the attribute list correspond to this list.
        maxRows - - maximum number of rows to return.
        Returns:
        MboValueData[][] - contains an array of Object name, Object key, hasChildren flag, hasParents flag, list of attributes data from the passed attributes list.
        Throws:
        MXException
        java.rmi.RemoteException
      • getTop

        public MboValueData[][] getTop(java.lang.String[] attrs,
                                       int maxRows)
                                throws MXException,
                                       java.rmi.RemoteException
        Returns all the top level objects in the hierarchy, i.e. objects that do not have parents.
        Specified by:
        getTop in interface HierarchicalMboSetRemote
        Parameters:
        attrs - - list of attributes whose values are requested, the attribute data returned in the attribute list correspond to this list.
        maxRows - - maximum number of rows to return.
        Returns:
        MboValueData[][] - contains an array of Object name, Object key, hasChildren flag, hasParents flag, list of attributes data from the passed attributes list.
        Throws:
        MXException
        java.rmi.RemoteException
      • getPathToTop

        public MboValueData[][] getPathToTop(java.lang.String object,
                                             java.lang.String key,
                                             java.lang.String[] attrs,
                                             int maxRows)
                                      throws MXException,
                                             java.rmi.RemoteException
        Returns all objects in the path to the top from the current object, i.e. every parent of the object in a sequence.
        Specified by:
        getPathToTop in interface HierarchicalMboSetRemote
        Parameters:
        object - - name of the object whose children are being requested.
        key - - unique id of the object whose children are being fetched.
        attrs - - list of attributes whose values are requested, the attribute data returned in the attribute list correspond to this list.
        maxRows - - maximum number of rows to return.
        Returns:
        MboValueData[][] - contains an array of Object name, Object key, hasChildren flag, hasParents flag, list of attributes data from the passed attributes list.
        Throws:
        MXException
        java.rmi.RemoteException
      • canSetRepairFacilityFromProfile

        protected boolean canSetRepairFacilityFromProfile()
                                                   throws java.rmi.RemoteException
        Says if the Default Repair Facility defined to the current user has to be automatically associated to new work orders
        Returns:
        Throws:
        java.rmi.RemoteException
      • appendToWhere

        public java.lang.String appendToWhere()
                                       throws MXException,
                                              java.rmi.RemoteException
        Description copied from class: MboSet
        Append a value to the where clause. This called by the framework to allow any app specific modifications to the whereClause. An implementation of the a MboSet can override this method.
        Overrides:
        appendToWhere in class MboSet
        Throws:
        MXException
        java.rmi.RemoteException
      • getUncommittedAncestorVector

        public java.util.Vector getUncommittedAncestorVector()
                                                      throws MXException,
                                                             java.rmi.RemoteException
        12-10173/IV12943:WOANCESOTR did not go out via publish channel
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • storeUncommittedAncestorVector

        public void storeUncommittedAncestorVector(MXTransaction uncommitted)
                                            throws MXException,
                                                   java.rmi.RemoteException
        12-10173/IV12943: store the uncommited transaction in vector
        Throws:
        MXException
        java.rmi.RemoteException
      • setSourceWODuplicatedBy

        public void setSourceWODuplicatedBy(MboRemote wo)
                                     throws MXException,
                                            java.rmi.RemoteException
        IV32850/64208:set by WO.duplicate() and WO.createAssociatedWOSA to indicate that the passed wo is the original/source work order that user uses Select Action Duplicate to duplicate a new work order.
        Throws:
        MXException
        java.rmi.RemoteException
      • getSourceWODuplicatedBy

        public MboRemote getSourceWODuplicatedBy()
                                          throws MXException,
                                                 java.rmi.RemoteException
        IV32850/64208:get the original wo that duplicat() is happening - this is used in WO.createAssociatedWOSA and wo.duplicate()
        Throws:
        MXException
        java.rmi.RemoteException
      • getMaxAppsWhere

        public java.lang.String getMaxAppsWhere()
                                         throws MXException,
                                                java.rmi.RemoteException
        IV98844: overrides getMaxAppsWhere to detect if the app is true WO based app. If app is not null for the WOSet and the appwhere restriction comes from the different app, it should not append the app restriction to to WOSet.
        Overrides:
        getMaxAppsWhere in class MboSet
        Returns:
        The app restriction where clause
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Calls this method.