psdi.app.location

Class LocationSet

    • Method Detail

      • getMboInstance

        protected Mbo getMboInstance(MboSet ms)
                              throws MXException,
                                     java.rmi.RemoteException
        Generate a new location object
        Specified by:
        getMboInstance in class MboSet
        Parameters:
        ms - mboset
        Returns:
        Mbo object
        Throws:
        MXException
        java.rmi.RemoteException
      • findTopLevel

        public void findTopLevel(java.lang.String locSiteId)
                          throws MXException,
                                 java.rmi.RemoteException
        Resets the set to contain only the top level locations in the system with a given site.

        Method called in location drilldown for asset move

        Specified by:
        findTopLevel in interface LocationSetRemote
        Parameters:
        locSiteId - The newsite where the asset is moved
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        LocationSet.findTopLevel(String locSiteId)
      • 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
      • 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
      • 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
      • 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
      • 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
      • setHierarchy

        public void setHierarchy(java.lang.String hierarchy)
                          throws MXException,
                                 java.rmi.RemoteException
        set the hierarchy for location
        Parameters:
        hierarchy - Hierarchy
        Throws:
        MXException
        java.rmi.RemoteException
      • setHierarchy

        public void setHierarchy(java.lang.String object,
                                 java.lang.String key,
                                 java.lang.String hierarchy)
                          throws MXException,
                                 java.rmi.RemoteException
        Description copied from class: HierarchicalMboSet
        Sets the hierarchy of the location object.
        Specified by:
        setHierarchy in interface HierarchicalMboSetRemote
        Overrides:
        setHierarchy in class HierarchicalMboSet
        Parameters:
        object - - name of the object whose children are being requested.
        key - - unique id of the object whose children are being fetched.
        hierarchy - - name of the hierarchy.
        Throws:
        MXException
        java.rmi.RemoteException
      • getAllHierarchies

        public MboValueData[][] getAllHierarchies(java.lang.String object,
                                                  java.lang.String key,
                                                  java.lang.String[] attrs,
                                                  int maxRows)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Description copied from class: HierarchicalMboSet
        Returns all hierarchies for the object, this is mainly used in the case of locations.
        Specified by:
        getAllHierarchies in interface HierarchicalMboSetRemote
        Overrides:
        getAllHierarchies in class HierarchicalMboSet
        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
      • getSystemId

        protected java.lang.String getSystemId()
                                        throws MXException,
                                               java.rmi.RemoteException
        the system where the locations in this set belongs
        Throws:
        MXException
        java.rmi.RemoteException
      • findTopLocationsAtSystem

        public void findTopLocationsAtSystem(java.lang.String system)
                                      throws MXException,
                                             java.rmi.RemoteException
        Finds top location in a given system
        Specified by:
        findTopLocationsAtSystem in interface LocationSetRemote
        Parameters:
        system - system for a location(hierarcial or network)
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.location.LocationSet#findTopLocationsAtSystem()
      • findLocation

        public void findLocation(java.lang.String location)
                          throws MXException,
                                 java.rmi.RemoteException
        Finds location
        Specified by:
        findLocation in interface LocationSetRemote
        Parameters:
        location -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.location.LocationSet#findLocation()
      • getAllLocationTypes

        public java.util.Vector getAllLocationTypes(boolean internalVals)
                                             throws MXException,
                                                    java.rmi.RemoteException
        Gets all location types
        Specified by:
        getAllLocationTypes in interface LocationSetRemote
        Parameters:
        internalVals - if true, populate return vector with internal values, that is, Valuelist.Maxvalue instead of translated values, that is, Valuelist.Value. If false, populate the vector with the translated values.
        Returns:
        vector of types of location
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        LocationSet.getAllLocationTypes(boolean internalVals)
      • findSelectedLocs

        public void findSelectedLocs(java.lang.String where)
                              throws MXException,
                                     java.rmi.RemoteException
        Filter location set with the where statement
        Specified by:
        findSelectedLocs in interface LocationSetRemote
        Parameters:
        where - where clause
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.location.LocationSet#findSelectedLocs()
      • getUserPrefWhere

        public java.lang.String getUserPrefWhere()
        overrides the MboSet getUserPrefWhere() to return a userpref where clause which is appended to the existing whereClause. The location set is either a "STOREROOM" ' type of locations or the others such as "OPERATING","COURIER", and "LABOR".
        Overrides:
        getUserPrefWhere in class MboSet
        Returns:
        The userpref where clause.
      • setStoreroom

        public void setStoreroom()
                          throws MXException,
                                 java.rmi.RemoteException
        sets the type of location to the "STOREROOM" type. Used to return the WHERE clause for the "STOREROOM" locations. A storeroom type of locations is a special type. The assumption is the "Locations" table contains two categories of locations: STOREROOM and the others.
        Specified by:
        setStoreroom in interface LocationSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        LocationSet.setStoreroom()
      • setNonStoreroom

        public void setNonStoreroom()
                             throws MXException,
                                    java.rmi.RemoteException
        sets the type of location to any type but "STOREROOM". Used to return the WHERE clause for the non-STOREROOM locations. A storeroom type of locations is a special type. The assumption is the "Locations" table contains two categories of locations: STOREROOM and the others.
        Specified by:
        setNonStoreroom in interface LocationSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        LocationSet.setNonStoreroom()
      • isStoreroom

        protected boolean isStoreroom()
                               throws MXException,
                                      java.rmi.RemoteException
        return true if the set contains only "STOREROOM" type of location
        Throws:
        MXException
        java.rmi.RemoteException
      • getDataList

        public java.lang.String[][] getDataList(java.lang.String[] attributes,
                                                int overFlowValue,
                                                MboRemote parent)
                                         throws MXException,
                                                java.rmi.RemoteException
        For location drilldown -
        Specified by:
        getDataList in interface LocationSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • getItemForAddToStore

        public MboRemote getItemForAddToStore()
                                       throws MXException,
                                              java.rmi.RemoteException
        This location set is instantiated by item for Add Item to Store
        Throws:
        MXException
        java.rmi.RemoteException
      • getSqlForAuthorizedStorerooms

        public java.lang.String getSqlForAuthorizedStorerooms()
                                                       throws MXException,
                                                              java.rmi.RemoteException
        returns sql for select * from location where (generated sql)
        Specified by:
        getSqlForAuthorizedStorerooms in interface LocationSetRemote
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.location.LocationSet#getSqlForAuthorizedStore
      • getMultiSiteWhere

        public java.lang.String getMultiSiteWhere()
                                           throws MXException,
                                                  java.rmi.RemoteException
        Do not apply the standard multi-site where if we're in the USER or SECURGROUP app. Otherwise, call super.
        Overrides:
        getMultiSiteWhere in class MboSet
        Returns:
        The Multi-Site where clause
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Calls this method.
      • getRoleRestrictionWhere

        public java.lang.String getRoleRestrictionWhere()
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Provide a group restriction where clause based on profile
        Returns:
        The group restriction where clause
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Calls this method.
      • addWorkZones

        public void addWorkZones(java.lang.String workzone,
                                 java.lang.String type,
                                 java.lang.String orgid)
                          throws MXException,
                                 java.rmi.RemoteException
        Specified by:
        addWorkZones in interface LocationSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.location.LocationSet#addWorkZones()