com.ibm.tivoli.maximo.slroute

Class SLRouteServiceCache

  • java.lang.Object
    • com.ibm.tivoli.maximo.slroute.SLRouteServiceCache


  • public class SLRouteServiceCache
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor and Description
      SLRouteServiceCache(java.lang.String currentProjectId) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addResourceRow(java.lang.String name, java.lang.String id, java.lang.String parentid, java.lang.String objectname, java.lang.String refobjname, java.lang.String objectid)
      adds a row to the skdresource hashmap
      void clearResourceHier()
      clears the resource hierarchy caches
      java.util.HashMap getCalendarBreaks()
      returns the calendar breaks
      java.util.HashMap getDaysInShiftPattern()
      returns the days in shift pattern
      java.util.ArrayList getMergedWorkPeriods()
      returns the merged work periods
      com.ibm.tivoli.maximo.slroute.SLRouteServiceCache.SKDResource getObjKeyedResourceHier(java.lang.String refobjname, java.lang.String objectid)
      return the resource row given by refobjectname and objectid
      java.lang.String getOrgId()
      returns the orgid for the current project
      java.lang.String getProjectName()
      returns the project name (name column from skdproject)
      java.util.HashMap getResourceHier()
      simple getter for the resourcehierarchy
      java.util.HashMap getShiftCalMap()
      return the shift calendar map
      java.util.HashMap getShiftInfo(java.lang.String shift)
      returns a deep copy of the shift information from the cache, if the shift information is present
      com.ibm.tivoli.maximo.slroute.SLRouteServiceCache.SKDResource getSKDResourceInstance(java.lang.String name, java.lang.String id, java.lang.String parentid, java.lang.String objectname, java.lang.String refobjname, java.lang.String objectid)
      Factories out an instance of a new SKDResource; the class is not added to the cache
      java.lang.String getWorkQuery()
      gets the work query string
      boolean hasShiftGridInfo()
      return true if we have cached shift grid information
      boolean isUIDebug()
      returns if we are running with the UI in debug mode
      void putShiftInfo(java.lang.String shift, java.util.HashMap baseModShifts)
      add the shift information hashmap for the given shift to the shift data cache
      void setShiftGridInfo(java.util.HashMap shiftCalMap, java.util.HashMap calendarBreaks, java.util.HashMap daysInShiftPattern, java.util.ArrayList mergedWorkPeriods)
      Sets all of the shift background information (used by FWMShiftWorkingHourGrid) as a group
      void setUIDebug(boolean isUIDebug)
      set the UI debug flag
      void setWorkQuery(java.lang.String workQuery)
      sets the work query string
      void updateResourceMaps()
      updates the parent row and the refreshes the object keyed hashmap
      void verifyProject(java.lang.String id, java.lang.String calendar, java.lang.String shift, java.util.Date startDate, java.util.Date endDate, java.lang.String projectName, java.lang.String orgId)
      Verifies the project including the id, calendar, shift, and start and end dates If anything has changed, then clear the cached information.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SLRouteServiceCache

        public SLRouteServiceCache(java.lang.String currentProjectId)
    • Method Detail

      • verifyProject

        public void verifyProject(java.lang.String id,
                                  java.lang.String calendar,
                                  java.lang.String shift,
                                  java.util.Date startDate,
                                  java.util.Date endDate,
                                  java.lang.String projectName,
                                  java.lang.String orgId)
        Verifies the project including the id, calendar, shift, and start and end dates If anything has changed, then clear the cached information.
        Parameters:
        id -
      • putShiftInfo

        public void putShiftInfo(java.lang.String shift,
                                 java.util.HashMap baseModShifts)
        add the shift information hashmap for the given shift to the shift data cache
        Parameters:
        org -
        calendar -
        shift -
        baseModShifts -
      • getShiftInfo

        public java.util.HashMap getShiftInfo(java.lang.String shift)
        returns a deep copy of the shift information from the cache, if the shift information is present
        Parameters:
        org -
        calendar -
        shift -
        Returns:
      • getShiftCalMap

        public java.util.HashMap getShiftCalMap()
        return the shift calendar map
        Returns:
      • getCalendarBreaks

        public java.util.HashMap getCalendarBreaks()
        returns the calendar breaks
        Returns:
      • getDaysInShiftPattern

        public java.util.HashMap getDaysInShiftPattern()
        returns the days in shift pattern
        Returns:
      • getMergedWorkPeriods

        public java.util.ArrayList getMergedWorkPeriods()
        returns the merged work periods
        Returns:
      • setShiftGridInfo

        public void setShiftGridInfo(java.util.HashMap shiftCalMap,
                                     java.util.HashMap calendarBreaks,
                                     java.util.HashMap daysInShiftPattern,
                                     java.util.ArrayList mergedWorkPeriods)
        Sets all of the shift background information (used by FWMShiftWorkingHourGrid) as a group
        Parameters:
        shiftCalMap -
        calendarBreaks -
        daysInShiftPattern -
        mergedWorkPeriods -
      • hasShiftGridInfo

        public boolean hasShiftGridInfo()
        return true if we have cached shift grid information
        Returns:
      • addResourceRow

        public void addResourceRow(java.lang.String name,
                                   java.lang.String id,
                                   java.lang.String parentid,
                                   java.lang.String objectname,
                                   java.lang.String refobjname,
                                   java.lang.String objectid)
        adds a row to the skdresource hashmap
        Parameters:
        name -
        id -
        parentid -
        objectname -
        refobjname -
        objectid -
      • updateResourceMaps

        public void updateResourceMaps()
        updates the parent row and the refreshes the object keyed hashmap
      • getResourceHier

        public java.util.HashMap getResourceHier()
        simple getter for the resourcehierarchy
        Returns:
      • getObjKeyedResourceHier

        public com.ibm.tivoli.maximo.slroute.SLRouteServiceCache.SKDResource getObjKeyedResourceHier(java.lang.String refobjname,
                                                                                                     java.lang.String objectid)
        return the resource row given by refobjectname and objectid
        Parameters:
        refobjname -
        objectid -
        Returns:
      • clearResourceHier

        public void clearResourceHier()
        clears the resource hierarchy caches
      • isUIDebug

        public boolean isUIDebug()
        returns if we are running with the UI in debug mode
        Returns:
      • setUIDebug

        public void setUIDebug(boolean isUIDebug)
        set the UI debug flag
        Parameters:
        isUIDebug -
      • getWorkQuery

        public java.lang.String getWorkQuery()
        gets the work query string
        Returns:
      • setWorkQuery

        public void setWorkQuery(java.lang.String workQuery)
        sets the work query string
      • getProjectName

        public java.lang.String getProjectName()
        returns the project name (name column from skdproject)
        Returns:
      • getOrgId

        public java.lang.String getOrgId()
        returns the orgid for the current project
        Returns:
      • getSKDResourceInstance

        public com.ibm.tivoli.maximo.slroute.SLRouteServiceCache.SKDResource getSKDResourceInstance(java.lang.String name,
                                                                                                    java.lang.String id,
                                                                                                    java.lang.String parentid,
                                                                                                    java.lang.String objectname,
                                                                                                    java.lang.String refobjname,
                                                                                                    java.lang.String objectid)
        Factories out an instance of a new SKDResource; the class is not added to the cache
        Parameters:
        name -
        id -
        parentid -
        objectname -
        refobjname -
        objectid -
        Returns: