psdi.app.safety

Class SafetyService

    • Constructor Detail

      • SafetyService

        public SafetyService()
                      throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
      • SafetyService

        public SafetyService(MXServer mxServer)
                      throws java.rmi.RemoteException
        Parameters:
        srvEnv - -- the "Server Environment" this Service is being created in.
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • removeHazardFromAsset

        public MboSetRemote removeHazardFromAsset(MboRemote assetMbo,
                                                  MboSetRemote lexSet,
                                                  java.lang.String hazardid)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Removes a hazard (safetylexicon) from an sset or location.

        This method can be called multiple times to remove different hazards to the same asset. The first time, the lexSet parameter will be null. Subsequently, the lexSet parameter will be whatever was returned from the prior iteration. The owner of lexSet is the asset or location mbo.

        (See Centura HazMatForm, HazPrecForm, TagLockForm/tblTagHazards)

        Specified by:
        removeHazardFromAsset in interface SafetyServiceRemote
        Parameters:
        assetMbo - Asset or Location mbo.
        lexSet - The safetylexicon mboset for this asset or location. Can be null.
        hazardid - The hazardid to be removed.
        Returns:
        SafetyLexicon set for this asset, with mbos flagged for deletion.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        SafetyService.associateHazardToAsset(psdi.mbo.MboRemote, psdi.mbo.MboSetRemote, java.lang.String)
      • associateTagOutToAsset

        public MboSetRemote associateTagOutToAsset(MboRemote assetMbo,
                                                   MboSetRemote lexSet,
                                                   java.lang.String hazardid,
                                                   java.lang.String tagoutid)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Associate a tagout with a hazard and (asset or location). This is called after first having called associateHazardToAsset to define the set of safetylexicon for this assetnum or location.

        If the safetylexicon set was created some time ago and all you need to do is add a tagout, then first get the set by matching on assetnum or location (the owner must be the asset or location mbo) (see Centura TagLockForm/tblTagOuts).

        Throws an error if the safetylexicon already exists for this asset, hazardid and tagoutid. Assumes the tagoutid is valid.

        Specified by:
        associateTagOutToAsset in interface SafetyServiceRemote
        Parameters:
        assetMbo - Asset or Location mbo.
        lexSet - The safetylexicon mboset for this asset or location. Can be null.
        hazardid - The hazardid to which this tagout is to be added. If this installation does not associate tagouts with hazards, then this will be null.
        tagoutid - The tagoutid to be added. Assumed to be valid.
        Returns:
        SafetyLexicon set for this asset, containing the newly added mbo.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        SafetyService.removeTagOutFromAsset(psdi.mbo.MboRemote, psdi.mbo.MboSetRemote, java.lang.String, java.lang.String)
      • removeTagOutFromAsset

        public MboSetRemote removeTagOutFromAsset(MboRemote assetMbo,
                                                  MboSetRemote lexSet,
                                                  java.lang.String hazardid,
                                                  java.lang.String tagoutid)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Removes a tagout (safetylexicon) from an asset or location. If you are deleting the entire hazard via removeHazardFromAsset, then you do not need to also call removeTagOutFromAsset.

        This method can be called multiple times to remove different tagouts to the same asset. The first time, the lexSet parameter will be null. Subsequently, the lexSet parameter will be whatever was returned from the prior iteration. The owner of lexSet is the asset or location mbo.

        (see Centura TagLockForm/tblTagOuts).

        Specified by:
        removeTagOutFromAsset in interface SafetyServiceRemote
        Parameters:
        assetMbo - Asset or Location mbo.
        lexSet - The safetylexicon mboset for this Asset or location. Can be null.
        hazardid - If this installation does not associate tagouts with hazards, then this will be null.
        tagoutid -
        Returns:
        SafetyLexicon set for this asset, with mbos flagged for deletion.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        SafetyService.associateTagOutToAsset(psdi.mbo.MboRemote, psdi.mbo.MboSetRemote, java.lang.String, java.lang.String)
      • tagoutsMustBelongToHazards

        public boolean tagoutsMustBelongToHazards()
                                           throws MXException,
                                                  java.rmi.RemoteException
        Identify whether tagouts must belong to hazards. If true, then all tagout throughout the system must belong to hazard. If false, then NO tagout anywhere in the system may belong to hazard. This used to be identified via the maxvar TAGOUTSHAVEHAZARDS, but now always returns True.

        Note: Even if this method returns True, the incremental process of building safety info can nevertheless involve creating tagout that are independent of hazard. However, once all the safety info has been built and is ready to apply to safety plans and workorders, then tagout will belong to hazard (or not, as dictated by this MaxVar). If the safety info has not been properly built, then the tagout will not end up on a workorder.

        Returns:
        True if tagouts must belong to hazards, else False
        Throws:
        MXException
        java.rmi.RemoteException