psdi.app.workorder.util

Class WOPredecessorUtil

  • java.lang.Object
    • psdi.app.workorder.util.WOPredecessorUtil


  • public class WOPredecessorUtil
    extends java.lang.Object
    Class helper to validate predecessors work orders.
    See Also:
    psdi.app.workorde.WOTaskRelation
    • Constructor Detail

      • WOPredecessorUtil

        public WOPredecessorUtil()
    • Method Detail

      • getExcludedList

        public java.util.List getExcludedList()
      • setExcludedList

        public void setExcludedList(java.util.List excludedList)
      • getChildList

        public java.util.List getChildList()
      • setChildList

        public void setChildList(java.util.List childList)
      • getLinkList

        public java.util.List getLinkList()
      • setLinkList

        public void setLinkList(java.util.List linkList)
      • validateLink

        public boolean validateLink(MboRemote workorder,
                                    java.lang.String wonum,
                                    java.lang.String target)
                             throws java.rmi.RemoteException,
                                    MXException
        Main function to validate: - Circular dependencies - Parent link
        Parameters:
        workorder - Source mbo.
        wonum - Source wonum record
        target - Target relationship
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getRelationshipsUp

        public void getRelationshipsUp(UserInfo userInfo,
                                       java.lang.String wonum)
                                throws java.rmi.RemoteException,
                                       MXException
        Check circular references
        Parameters:
        workorder -
        wonum -
        target -
        Throws:
        java.rmi.RemoteException
        MXException
      • getRelationshipsDown

        public void getRelationshipsDown(UserInfo userInfo,
                                         java.lang.String predwonum)
                                  throws java.rmi.RemoteException,
                                         MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • checkDirectRelationship

        public boolean checkDirectRelationship(MboRemote workorder,
                                               java.lang.String wonum,
                                               java.lang.String target)
                                        throws java.rmi.RemoteException,
                                               MXException
        Check direct relationships between source and target avoid direct circular relationship
        Parameters:
        workorder -
        wonum -
        target -
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • getParent

        public java.lang.String getParent(MboRemote workorder,
                                          java.lang.String wonum)
                                   throws java.rmi.RemoteException,
                                          MXException
        select parent list to avoid make a link with parents in the same package
        Parameters:
        workorder -
        wonum -
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • getAllChildrenToExclude

        public void getAllChildrenToExclude(MboRemote workorder,
                                            java.lang.String wonum)
                                     throws java.rmi.RemoteException,
                                            MXException
        Will populate the exclude list with all children and children of each child.
        Parameters:
        workorder -
        wonum -
        Throws:
        java.rmi.RemoteException
        MXException
      • getAllChildren

        public void getAllChildren(MboRemote workorder,
                                   java.lang.String wonum)
                            throws java.rmi.RemoteException,
                                   MXException
        Will populate the exclude list with all children and children of each child.
        Parameters:
        workorder -
        wonum -
        Throws:
        java.rmi.RemoteException
        MXException
      • getWOMboFromWonum

        public MboRemote getWOMboFromWonum(java.lang.String wonum,
                                           UserInfo userinfo)
                                    throws java.rmi.RemoteException,
                                           MXException
        Return the MboRemote of a WorkOrder from a given wonum
        Parameters:
        wonum -
        userinfo -
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • isALinked

        public boolean isALinked(MboRemote workorder,
                                 java.lang.String wonum)
                          throws java.rmi.RemoteException,
                                 MXException
        Return if this registry is a Link
        Parameters:
        workorder -
        wonum -
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • hasALink

        public boolean hasALink(MboRemote workorder,
                                java.lang.String wonum)
                         throws java.rmi.RemoteException,
                                MXException
        Return is this links is has a link
        Parameters:
        workorder -
        wonum -
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException