com.ibm.tivoli.maximo.miniapps.scheduler

Class GanttUtil

  • java.lang.Object
    • com.ibm.tivoli.maximo.miniapps.scheduler.GanttUtil


  • public class GanttUtil
    extends java.lang.Object
    Utility methods for dealing with Activities (ie, WorkOrders, Assignments, etc)
    • Constructor Detail

      • GanttUtil

        public GanttUtil()
    • Method Detail

      • findActivityById

        public static ilog.views.gantt.IlvActivity findActivityById(java.lang.String id,
                                                                    ilog.views.gantt.IlvHierarchyNode start,
                                                                    ilog.views.gantt.IlvGanttModel model)
        Will find the given MXActivity in the GanttModel. If the ID is a PM id then it will return a MXPMActivity instance for that ID. Otherwise you'll get a normal MXActivity instance. If an id that starts with aidx_ is passed, then the ID resolved against the _idx field.
        Parameters:
        id -
        start -
        model -
        Returns:
      • findResourceById

        public static ilog.views.gantt.IlvResource findResourceById(java.lang.String id,
                                                                    ilog.views.gantt.IlvHierarchyNode start,
                                                                    MXGanttModel model)
      • find

        public static ilog.views.gantt.IlvHierarchyNode find(GanttUtil.Predicate idp,
                                                             ilog.views.gantt.IlvHierarchyNode start,
                                                             ilog.views.gantt.IlvGanttModel model)
      • toTreeGridDate

        public static long toTreeGridDate(java.util.Date d,
                                          java.util.TimeZone tz)
        Used to convert from "Maximo" time to "TreeGrid" time where TreeGrid time does not use seconds, and it uses GMT-0
        Parameters:
        d - Date using TimeZone specified
        tz - User's TimeZone
        Returns:
      • toTreeGridUTCDate

        public static long toTreeGridUTCDate(java.util.Date d)
      • fromTreeGridDate

        public static java.util.Date fromTreeGridDate(long ms,
                                                      java.util.TimeZone tz)
        Convert a GMT-0 TreeGrid time into a Maximo Time
        Parameters:
        ms - TreeGrid's Time in MS
        tz - User's TimeZone
        Returns:
        Date in the User's TimeZone
      • getReadOnlyStyledText

        public static java.lang.String getReadOnlyStyledText(java.lang.String value,
                                                             boolean readOnly)
        Gets the styled text for GA - Scenarios. Font color is set to RED and the text style to BOLD, in order to reflect that the GA - Scenario is READONLY.
        Parameters:
        value -
        readOnly -
        Returns:
      • getProjectStartEnd

        public static Range getProjectStartEnd(IMXGanttModel model)
        Traverses the entire project to find the start/end dates the covers the project work
        Parameters:
        model -
        Returns:
      • getActualStartEnd

        public static Range getActualStartEnd(MXGanttModel model)
        Traverses the entire project to find the start/end dates the covers the project work
        Parameters:
        model -
        Returns:
      • addCellIcon

        public static void addCellIcon(TGJsonWriter writer,
                                       java.lang.String colName,
                                       java.lang.String imageUrl,
                                       int iconWidth,
                                       java.lang.String align,
                                       TMenuItem item)
                                throws java.io.IOException
        Adds a Table Cell Icon with optional action
        Parameters:
        writer -
        colName -
        imageUrl -
        iconWidth -
        align -
        item -
        Throws:
        java.io.IOException
      • addLeftIconClass

        public static void addLeftIconClass(TGJsonWriter jsonWriter,
                                            java.lang.String className)
                                     throws java.io.IOException
        Adds a Left Icon indicator to a gantt bar
        Parameters:
        jsonWriter -
        className -
        Throws:
        java.io.IOException
      • addLeftIconClick

        public static void addLeftIconClick(TGJsonWriter jsonWriter,
                                            java.lang.String eventName)
                                     throws java.io.IOException
        Adds a left icon click event handler to the icon.
        Parameters:
        jsonWriter -
        eventName -
        Throws:
        java.io.IOException
      • addLeftIconClass

        public static void addLeftIconClass(TGJsonWriter jsonWriter,
                                            java.lang.String className,
                                            java.lang.String tip)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • addRightIconClass

        public static void addRightIconClass(TGJsonWriter jsonWriter,
                                             java.lang.String className)
                                      throws java.io.IOException
        Adds a right icon indicator to a gantt bar.
        Parameters:
        jsonWriter -
        className -
        Throws:
        java.io.IOException
      • addRightIconClick

        public static void addRightIconClick(TGJsonWriter jsonWriter,
                                             java.lang.String eventName)
                                      throws java.io.IOException
        Adds a right icon click event handler to the icon.
        Parameters:
        jsonWriter -
        eventName -
        Throws:
        java.io.IOException
      • addRightIconClass

        public static void addRightIconClass(TGJsonWriter jsonWriter,
                                             java.lang.String className,
                                             java.lang.String tip)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • isGanttColumn

        public static boolean isGanttColumn(java.lang.String col)
      • isAssignment

        public static boolean isAssignment(MXActivity mxa)
      • isNonWork

        public static boolean isNonWork(MXActivity mxa)
      • getShiftPeriodsForResource

        public static java.util.List getShiftPeriodsForResource(MXResource mxr,
                                                                MXGanttModel model)
        Returns the Shift Dates as a List of Dates for the Shift on the Resource. Use IterableDateRange to iterate the dates as Ranges.
        Parameters:
        mxr -
        model -
        Returns:
        null or empty list of there are no shift dates
      • isWorkorder

        public static boolean isWorkorder(IMXActivity mxa)
        Returns true if the given IlvActivity is a work order
        Parameters:
        act - IlvActivity instance
        Returns:
        true if it's a work order activity
      • isLabor

        public static boolean isLabor(IMXResource mxr)
      • isCrew

        public static boolean isCrew(IMXResource mxr)
      • isLocations

        public static boolean isLocations(IMXResource mxr)
      • isLaborOrCrew

        public static boolean isLaborOrCrew(IMXResource mxr)
      • isLaborOrCrewOrLocations

        public static boolean isLaborOrCrewOrLocations(IMXResource mxr)
      • isTask

        public static boolean isTask(IMXActivity act)
      • isReadOnly

        public static boolean isReadOnly(MXActivity mxa)
      • isLocked

        public static boolean isLocked(MXActivity activity)
      • isResourceLocked

        public static boolean isResourceLocked(MXActivity activity)
      • isSecondary

        public static boolean isSecondary(MXActivity mxa)
      • isHidden

        public static boolean isHidden(MXActivity mxa)
      • write

        public static void write(com.ibm.json.java.JSONObject json,
                                 java.lang.String name,
                                 java.lang.Object value,
                                 TreeGridUtil.ITGSerializationHelper helper)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • toSerializedValue

        public static java.lang.Object toSerializedValue(java.lang.Object o,
                                                         TreeGridUtil.ITGSerializationHelper helper)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • showWorklogIcon

        public static boolean showWorklogIcon(MXActivity mxa)
      • getBoolean

        public static boolean getBoolean(java.lang.Object value)
      • showRequirementIcon

        public static boolean showRequirementIcon(MXActivity mxa)
      • showWeatherAlertIcon

        public static boolean showWeatherAlertIcon(MXActivity mxa)
      • addClass

        public static void addClass(TGJsonWriter writer,
                                    java.lang.String classUrl)
                             throws java.io.IOException
        Add Class
        Parameters:
        writer -
        styleUrl -
        Throws:
        java.io.IOException
      • addBold

        public static void addBold(TGJsonWriter writer,
                                   java.lang.String boldUrl)
                            throws java.io.IOException
        Add Class
        Parameters:
        writer -
        styleUrl -
        Throws:
        java.io.IOException
      • showBoldResourceName

        public static boolean showBoldResourceName(MXResource mxr)
      • isSerializable

        public static boolean isSerializable(java.lang.String columnName,
                                             java.lang.Object data)
      • isDummy

        public static boolean isDummy(ilog.views.gantt.IlvResource next)
      • applyReadonlyOrLocked

        public static void applyReadonlyOrLocked(TGJsonWriter jsonWriter,
                                                 MXActivity mxa,
                                                 boolean isRunBar)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • isCompleted

        public static boolean isCompleted(MXActivity mxa)
      • newActivityColumn

        public static MXGanttPropertyInfo newActivityColumn(java.lang.String name,
                                                            int type)
      • newResourceColumn

        public static MXGanttPropertyInfo newResourceColumn(java.lang.String name,
                                                            int type)
      • sanitizeDateTimeFormatForTreeGrid

        public static java.lang.String sanitizeDateTimeFormatForTreeGrid(java.lang.String mask)
      • applyDefaultStyle

        public static void applyDefaultStyle(com.ibm.json.java.JSONObject Cfg)
      • getTGStyle

        public static java.lang.String getTGStyle()
      • getTGStylePrefix

        public static java.lang.String getTGStylePrefix()
      • addWorkPeriodInfo

        public static com.ibm.json.java.JSONObject addWorkPeriodInfo(com.ibm.json.java.JSONObject gantt,
                                                                     IMXGanttModel model,
                                                                     java.util.Properties props,
                                                                     java.util.List shifts)
        Add the WorkPeriod information to the TreeGrid UI
        Parameters:
        gantt -
        model -
      • getShiftColorId

        public static java.lang.String getShiftColorId(IMXGanttModel schedule,
                                                       java.util.Properties props,
                                                       java.lang.String shift)
      • getShiftColor

        public static java.lang.String getShiftColor(IMXGanttModel schedule,
                                                     java.util.Properties props,
                                                     java.lang.String shift)
      • getMergedShiftsAsBackground

        public static java.lang.String getMergedShiftsAsBackground(IMXGanttModel schedule)
        Returns the merged shift pattern as a TreeGrid background.
        Parameters:
        model -
        userInfo -
        Returns:
      • getShiftsAsBackground

        public static java.lang.String getShiftsAsBackground(IMXGanttModel schedule,
                                                             java.util.Properties props,
                                                             java.util.List shifts)
      • addWorkPeriodInfoAsTGInclude

        public static com.ibm.json.java.JSONObject addWorkPeriodInfoAsTGInclude(com.ibm.json.java.JSONObject gantt,
                                                                                MXGanttModel model,
                                                                                UserInfo userInfo)
        Add the WorkPeriod information to the TreeGrid UI
        Parameters:
        gantt -
        model -
      • getMergedShiftsAsInclude

        public static java.lang.String getMergedShiftsAsInclude(IMXGanttModel model,
                                                                UserInfo userInfo)
        Creates a shift pattern in TreeGrid format that are Include ranges. Normally treegrid ranges are Excude ranges, but, since this code uses "#0" treegrid will interpret the ranges as include. This shiftrange also sets a default exlude range for ALL other times.
        Parameters:
        model -
        userInfo -
        Returns:
      • appendBackground

        public static java.lang.StringBuilder appendBackground(java.lang.StringBuilder sb,
                                                               java.util.Date start,
                                                               java.util.Date end,
                                                               java.util.TimeZone tz,
                                                               java.lang.String tgColor)
        Creats a TreeGrid Background range segment
        Parameters:
        sb - StringBuilder to which to append the data
        start -
        end -
        tz -
        tgColor - - TreeGrid color value
        Returns:
      • createBackground

        public static java.lang.String createBackground(java.util.Date start,
                                                        java.util.Date end,
                                                        java.util.TimeZone tz,
                                                        java.lang.String tgColor)
        Convenience method for creating a single background. Use appendBackground if you are doing multiple backgrounds.
        Parameters:
        start -
        end -
        tz -
        tgColor - TreeGrid color
        Returns:
      • updateFormatForLocale

        public static void updateFormatForLocale(com.ibm.json.java.JSONObject format,
                                                 UserInfo userInfo,
                                                 ISKDUIInfo skdUIInfo)
        Parameters:
        format -
        locale -
      • getShortDateFormat

        public static java.lang.String getShortDateFormat(ISKDUIInfo skdUIInfo)
      • addGanttZooms

        public static void addGanttZooms(com.ibm.json.java.JSONObject root,
                                         ISKDUIInfo skdUIInfo,
                                         UIOptions options,
                                         AbstractTreeGridMiniAppBean bean,
                                         com.ibm.json.java.JSONObject Gantt)
        Adds the default Gantt Zoom levels to a TreeGrid, and initializes the default Zoom to be the "middle" Zoom level.
        Parameters:
        root -
        skdUIInfo -
        options -
        bean -
        Gantt -
      • createZooms

        protected static com.ibm.json.java.JSONArray createZooms(Range range,
                                                                 UIOptions options)
      • createZooms

        public static com.ibm.json.java.JSONArray createZooms(Range range,
                                                              int snapToGridInterval)
      • createLevels

        protected static com.ibm.json.java.JSONArray createLevels(com.ibm.json.java.JSONArray arr,
                                                                  com.ibm.tivoli.maximo.miniapps.scheduler.GanttUtil.ZoomRangeSpec spec)
      • createLevels

        protected static com.ibm.json.java.JSONArray createLevels(com.ibm.json.java.JSONArray arr,
                                                                  com.ibm.tivoli.maximo.miniapps.scheduler.GanttUtil.ZoomRangeSpec spec,
                                                                  int count)
      • createLevel

        public static com.ibm.json.java.JSONObject createLevel(java.lang.String name,
                                                               float width,
                                                               com.ibm.tivoli.maximo.miniapps.scheduler.GanttUtil.ZoomRangeSpec spec)
      • getGanttUnits

        public static java.lang.String getGanttUnits()
      • addCommonGanttStartEnd

        public static void addCommonGanttStartEnd(com.ibm.json.java.JSONObject Gantt,
                                                  IMXGanttModel model,
                                                  java.util.TimeZone timeZone)
      • addCommonGanttStartEnd

        public static void addCommonGanttStartEnd(com.ibm.json.java.JSONObject Gantt,
                                                  IMXGanttModel model,
                                                  java.util.TimeZone timeZone,
                                                  boolean fixedStartEnd)
      • addCommonGantt

        public static void addCommonGantt(com.ibm.json.java.JSONObject Gantt,
                                          UIOptions opts)
      • doReplacementsForZoom

        public static java.lang.String doReplacementsForZoom(java.lang.String zoomJSON,
                                                             ISKDUIInfo skdUIInfo,
                                                             UIOptions options)
      • createAndAddToolbar

        public static com.ibm.json.java.JSONObject createAndAddToolbar(com.ibm.json.java.JSONObject root,
                                                                       UIOptions options)
      • addToolbarIcons

        public static com.ibm.json.java.JSONObject addToolbarIcons(com.ibm.json.java.JSONObject Toolbar,
                                                                   UIOptions options)
      • addSafeCSS

        public static void addSafeCSS(WebClientSession sess,
                                      com.ibm.json.java.JSONObject Cfg)
        TreeGrid may require SafeCSS on some browsers.
        Parameters:
        sess -
        Cfg -
      • findContrantFor

        public static MXConstraint findContrantFor(java.lang.String fromId,
                                                   java.lang.String toId,
                                                   MXGanttModel model)
      • getParentWorkorder

        public static MXActivity getParentWorkorder(MXGanttModel model,
                                                    ilog.views.gantt.IlvActivity assignment)
      • getParentWorkorderThatIsNotATask

        public static MXActivity getParentWorkorderThatIsNotATask(MXGanttModel model,
                                                                  ilog.views.gantt.IlvActivity assignment)
      • getSecondaryAssignmens

        public static java.util.List getSecondaryAssignmens(MXGanttModel model,
                                                            MXActivity primary)
      • addCommonLangCFG

        public static void addCommonLangCFG(com.ibm.json.java.JSONObject root,
                                            UserInfo userInfo,
                                            ISKDUIInfo skdUIInfo)
        Adds the default Formats based on the user's SKD locale object. It also forces the grid to use GMT0, since, TreeGrid can only use GMTO or the Browser's timezone... you cannot set a TimeZone.
        Parameters:
        root -
        userInfo -
        skdUIInfo -
      • setCommonPrintExportMenuOptions

        public static void setCommonPrintExportMenuOptions(com.ibm.json.java.JSONObject root,
                                                           UserInfo userInfo)
      • addCommonCFG

        public static void addCommonCFG(WebClientSession sess,
                                        com.ibm.json.java.JSONObject Cfg,
                                        UIOptions options,
                                        AbstractTreeGridMiniAppBean bean)
                                 throws java.io.IOException,
                                        MXException
        Sets up the Common Cfg node for TreeGrid will all the default options that likely to be shared in ALL TreeGrid instances, at least for Scheduler apps.
        Parameters:
        sess -
        Cfg -
        options -
        bean -
        Throws:
        java.io.IOException
        MXException
      • addPerfOptions

        public static void addPerfOptions(com.ibm.json.java.JSONObject Cfg,
                                          UIOptions opts)
      • addTreeDef

        public static void addTreeDef(com.ibm.json.java.JSONArray Defs)
        Set the default Tree style for the the TreeControl in TreeGrid
        Parameters:
        Defs -
      • addCommonActions

        public static void addCommonActions(com.ibm.json.java.JSONObject root,
                                            UIOptions options)
        Adds all the base common actions that are likely to be shared among all grids
        Parameters:
        root -
      • ColMoveInSectionOnly

        public static com.ibm.json.java.JSONObject ColMoveInSectionOnly(com.ibm.json.java.JSONObject col)
        Updates column so that it can move within a SECTION only
        Parameters:
        col -
        Returns:
      • writeIDFields

        public static void writeIDFields(TGJsonWriter jsonWriter,
                                         MXActivity mxa)
                                  throws java.io.IOException
        Writes the ID field for the TreeGrid.
        Parameters:
        jsonWriter -
        mxa -
        Throws:
        java.io.IOException
      • writeIDFields

        public static void writeIDFields(TGJsonWriter jsonWriter,
                                         MXActivity mxa,
                                         GanttUtil.IDGenerator idGen)
                                  throws java.io.IOException
        Writes the ID field for the TreeGrid.
        Parameters:
        jsonWriter -
        mxa -
        Throws:
        java.io.IOException
      • writeIDFields

        public static void writeIDFields(TGJsonWriter jsonWriter,
                                         ilog.views.gantt.IlvResource res,
                                         GanttUtil.IDGenerator idGen)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • getID

        public static java.lang.String getID(IMXActivity mxa)
        Returns the TreeGrid ID for this activity and creates one, if one does not exist.
        Parameters:
        act -
        model -
        Returns:
      • getID

        public static java.lang.String getID(IMXResource mxa)
      • getID

        public static java.lang.String getID(ilog.views.gantt.IlvResource mxa)
      • getID

        public static java.lang.String getID(java.lang.String actid)
        Given an activity ID from ILOG create a TreeGrid compatible ID
        Parameters:
        actid -
        Returns:
      • getTreeGridID

        public static java.lang.String getTreeGridID(java.lang.String ilogID)
        proxy for getID()
        Parameters:
        ilogID -
        Returns:
      • isIDField

        public static boolean isIDField(java.lang.String s)
        Returns TRUE if the named field is an ID field and should not be automatically outputted to the TreeGrid JSON.
        Parameters:
        s - field name
        Returns:
      • IlvDurationToDouble

        public static double IlvDurationToDouble(ilog.views.gantt.IlvDuration lv,
                                                 UserInfo ui)
                                          throws java.lang.Exception
        Convert IlvDuration to a double
        Parameters:
        lv -
        Returns:
        duration in double
        Throws:
        java.lang.Exception
      • resolveSelectedActivities

        public static java.util.List resolveSelectedActivities(MXGanttModel model,
                                                               java.util.List activityIds)
        For the list of Activity IDs, return a List of actual Activities
        Parameters:
        model -
        activityIds -
        Returns:
      • resolveSelectedActivitiesByUniqueIds

        public static java.util.List resolveSelectedActivitiesByUniqueIds(MXGanttModel model,
                                                                          java.util.List uniqueIds)
        Resolves a list of object unique IDs into IlvActvity Objects
        Parameters:
        model -
        activityIds -
        Returns:
      • encodeTreeGridActivityContraints

        public static java.lang.String encodeTreeGridActivityContraints(MXGanttModel model,
                                                                        MXActivity mxa,
                                                                        UserInfo userInfo)
                                                                 throws java.io.IOException
        Encodes the Contstaints and form the IlvConstaints coming from this activity and update the Activity's DECENDENTS field with the newly calculated descendents. It will return the encoded constraint data as well.
        Parameters:
        model -
        mxa -
        Returns:
        Throws:
        java.io.IOException
      • writeJsonActivityContraints

        public static void writeJsonActivityContraints(com.ibm.json.java.JSONObject json,
                                                       MXGanttModel model,
                                                       MXActivity mxa,
                                                       UserInfo userInfo)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • encodeModifiedFields

        public static void encodeModifiedFields(MXActivity act,
                                                ReplyBuilder builder,
                                                TreeGridUtil.ITGSerializationHelper helper)
                                         throws java.io.IOException
        Encode the modified fields as a Changes segment into the reply object
        Parameters:
        act -
        builder -
        helper -
        Throws:
        java.io.IOException
      • findAssignedResource

        public static ilog.views.gantt.IlvResource findAssignedResource(MXGanttModel model,
                                                                        MXActivity mxa)
        For a given activity return the assigned resource, or null, if nothing is assigned. It will also return null if more than one resource is assigned to it. So, it will only return a resource if one and only one resource is assigned to the activity.
        Parameters:
        model -
        mxa -
        Returns:
      • equals

        public static boolean equals(MXActivity mx1,
                                     MXActivity mx2,
                                     java.lang.String propName)
        Returns true if both activities have the same object property, and the object property is equal() using the Java equals() method. NOTE if both properties are NULL, this method will return false for equals. ie, this will only do an equals provided that both properties exist.
        Parameters:
        mx1 -
        mx2 -
        propName -
        Returns:
      • updateSecondarAssignments

        public static void updateSecondarAssignments(MXGanttModel model,
                                                     MXActivity act,
                                                     ReplyBuilder reply,
                                                     TreeGridUtil.ITGSerializationHelper helper)
                                              throws java.io.IOException
        Given the Activity, update any secondary Assignments, so that the secondary date/times will be adjects to match the primary.
        Parameters:
        model -
        act -
        reply -
        helper -
        Throws:
        java.io.IOException
      • updateSecondAssignment

        public static void updateSecondAssignment(MXActivity pri,
                                                  MXActivity sec,
                                                  ReplyBuilder reply,
                                                  TreeGridUtil.ITGSerializationHelper helper)
                                           throws java.io.IOException
        Given the primary and secondary, update the time and status to match the primary.
        Parameters:
        pri -
        sec -
        reply -
        helper -
        Throws:
        java.io.IOException
      • canProcessUpdateSecondaryAssignments

        public static boolean canProcessUpdateSecondaryAssignments(MXGanttModel model,
                                                                   MXActivity mxa)
        Return true if the given activity is a type that can support secondary assignments
        Parameters:
        model -
        mxa -
        Returns:
      • setLeftPanelOptions

        public static void setLeftPanelOptions(com.ibm.json.java.JSONObject Panel,
                                               UIOptions options)
      • getActivityColumns

        public static java.util.List getActivityColumns(IGanttConfigInfo info)
      • getResourceColumns

        public static java.util.List getResourceColumns(IGanttConfigInfo info)
      • getNodeLocationDetails

        public static GanttUtil.NodeLocation getNodeLocationDetails(ilog.views.gantt.IlvGanttModel model,
                                                                    ilog.views.gantt.IlvHierarchyNode node)
        Given the node, return the NODE location in the node heirarchy.
        Parameters:
        model -
        node -
        Returns:
      • findResourceById

        public static ilog.views.gantt.IlvResource findResourceById(java.lang.String id,
                                                                    MXGanttModel model)
      • isOtherAssignment

        public static boolean isOtherAssignment(MXActivity act)
      • isOtherAssignment

        public static boolean isOtherAssignment(MXReservation act)
      • isPhysicalPercentComplete

        public static boolean isPhysicalPercentComplete(IMXGanttModel model)
      • isTaskPercentComplete

        public static boolean isTaskPercentComplete(IMXGanttModel model)
      • isActualPercentComplete

        public static boolean isActualPercentComplete(IMXGanttModel model)
      • isPercentCompleteNone

        public static boolean isPercentCompleteNone(IMXGanttModel model)
      • getGanttComplete

        public static java.lang.String getGanttComplete(IMXGanttModel model)
      • getAssignmentsAndNonWork

        public static java.util.List getAssignmentsAndNonWork(MXGanttModel model,
                                                              MXResource mxr)
      • isModAvail

        public static boolean isModAvail(MXActivity a)
      • isExtraTime

        public static boolean isExtraTime(MXActivity a)
      • getSequenceDay

        public static long getSequenceDay(java.util.Date workPeriodBeginDate,
                                          java.util.Date tempVisibleStartDate,
                                          long patternDays,
                                          java.util.TimeZone userTz,
                                          java.util.Locale userLocale)
        Gets the Shift Pattern Day of the passed in visible date.
        Parameters:
        workPeriodBeginDate - First Day of the pattern on the Calendar.
        tempVisibleStartDate - Date that is visible on the screen as the user scrolls through the Gannt chart.
        patternDays - Total number of days in the shift.
        Returns:
      • getCalendarBreakRanges

        public static java.util.List getCalendarBreakRanges(MXResource mxr,
                                                            MXGanttModel model)
      • detectNonWorkAndDoubleBookedConflicts

        public static void detectNonWorkAndDoubleBookedConflicts(MXActivity resv,
                                                                 MXGanttModel model,
                                                                 java.util.List nonWork,
                                                                 ReplyBuilder reply)
        Detect "time" conflicts between resv and the list of activities. Only Assignments will be updated.
        Parameters:
        resv -
        nonWork -
        reply -
      • cleanProperty

        public static java.lang.String cleanProperty(java.lang.String in)
        Takes a property like, "EXTRA-time" and clean any non alpha numeric characters, so that it ends up like "EXTRATIME"
        Returns:
      • convertDate

        public static java.util.Date convertDate(java.util.Date date,
                                                 java.util.TimeZone timezone)
      • buildActivityID

        public static java.lang.String buildActivityID(MboRemote mbo,
                                                       java.lang.String objectName,
                                                       java.lang.String key)
                                                throws java.rmi.RemoteException,
                                                       MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • buildResourceID

        public static java.lang.String buildResourceID(java.lang.String key,
                                                       java.lang.String orgID)
      • buildGResourceID

        public static java.lang.String buildGResourceID(java.lang.String craft,
                                                        java.lang.String key,
                                                        java.lang.String orgID)
      • getResourceObjectNames

        public static java.util.List getResourceObjectNames(int type)
      • getMinRowHeight

        public static int getMinRowHeight()
      • getDefaultRowHeight

        public static int getDefaultRowHeight()