public class GanttUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
GanttUtil.FieldPredicate |
static interface |
GanttUtil.IDGenerator |
static class |
GanttUtil.IDPredicate |
static class |
GanttUtil.NodeDirection |
static class |
GanttUtil.NodeLocation
Structure to represent the location of a node in a heirarchy
|
static interface |
GanttUtil.Predicate<T> |
static class |
GanttUtil.ResourceFieldPredicate |
static class |
GanttUtil.ResourceIDPredicate |
Modifier and Type | Field and Description |
---|---|
static int |
ALL |
static int |
BUCKET_BASED |
static GanttUtil.IDGenerator |
DEFAULT_ID_GENERATOR |
static java.lang.String |
RESOURCE_USERDATA_SHIFTDATES |
static int |
TIME_BASED |
Constructor and Description |
---|
GanttUtil() |
Modifier and Type | Method and Description | ||
---|---|---|---|
static void |
addBold(TGJsonWriter writer,
java.lang.String boldUrl)
Add Class
|
||
static void |
addCellIcon(TGJsonWriter writer,
java.lang.String colName,
java.lang.String imageUrl,
int iconWidth,
java.lang.String align,
TMenuItem item)
Adds a Table Cell Icon with optional action
|
||
static void |
addClass(TGJsonWriter writer,
java.lang.String classUrl)
Add Class
|
||
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
|
||
static void |
addCommonCFG(WebClientSession sess,
com.ibm.json.java.JSONObject Cfg,
UIOptions options,
AbstractTreeGridMiniAppBean bean)
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.
|
||
static void |
addCommonGantt(com.ibm.json.java.JSONObject Gantt,
UIOptions opts) |
||
static void |
addCommonGanttStartEnd(com.ibm.json.java.JSONObject Gantt,
IMXGanttModel model,
java.util.TimeZone timeZone) |
||
static void |
addCommonGanttStartEnd(com.ibm.json.java.JSONObject Gantt,
IMXGanttModel model,
java.util.TimeZone timeZone,
boolean fixedStartEnd) |
||
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.
|
||
static void |
addCommonPrintOptions(WebClientSession clientSession,
com.ibm.json.java.JSONObject cfg,
UIOptions options,
AbstractTreeGridMiniAppBean bean) |
||
static void |
addComplianceDetails(TGJsonWriter jsonWriter,
IMXGanttModel model,
IMXActivity mxa,
AbstractTreeGridMiniAppBean bean,
TreeGridUtil.ITGSerializationHelper helper) |
||
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.
|
||
static void |
addLeftIconClass(TGJsonWriter jsonWriter,
java.lang.String className)
Adds a Left Icon indicator to a gantt bar
|
||
static void |
addLeftIconClass(TGJsonWriter jsonWriter,
java.lang.String className,
java.lang.String tip) |
||
static void |
addLeftIconClick(TGJsonWriter jsonWriter,
java.lang.String eventName)
Adds a left icon click event handler to the icon.
|
||
static void |
addPerfOptions(com.ibm.json.java.JSONObject Cfg,
UIOptions opts) |
||
static void |
addRightIconClass(TGJsonWriter jsonWriter,
java.lang.String className)
Adds a right icon indicator to a gantt bar.
|
||
static void |
addRightIconClass(TGJsonWriter jsonWriter,
java.lang.String className,
java.lang.String tip) |
||
static void |
addRightIconClick(TGJsonWriter jsonWriter,
java.lang.String eventName)
Adds a right icon click event handler to the icon.
|
||
static void |
addSafeCSS(WebClientSession sess,
com.ibm.json.java.JSONObject Cfg)
TreeGrid may require SafeCSS on some browsers.
|
||
static com.ibm.json.java.JSONObject |
addToolbarIcons(com.ibm.json.java.JSONObject Toolbar,
UIOptions options) |
||
static void |
addTreeDef(com.ibm.json.java.JSONArray Defs)
Set the default Tree style for the the TreeControl in TreeGrid
|
||
static com.ibm.json.java.JSONObject |
addWorkPeriodInfo(com.ibm.json.java.JSONObject gantt,
IMXGanttModel model,
java.util.Properties props,
java.util.List<java.lang.String> shifts)
Add the WorkPeriod information to the TreeGrid UI
|
||
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
|
||
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
|
||
static void |
applyDefaultStyle(com.ibm.json.java.JSONObject Cfg) |
||
static void |
applyReadonlyOrLocked(TGJsonWriter jsonWriter,
MXActivity mxa,
boolean isRunBar) |
||
static java.lang.String |
buildActivityID(MboRemote mbo,
java.lang.String objectName,
java.lang.String key) |
||
static void |
buildInfoRow(UIBuilder data,
IMXGanttModel schedule,
UIOptions options) |
||
static java.lang.String |
buildResourceID(java.lang.String key,
java.lang.String orgID) |
||
static boolean |
canProcessUpdateSecondaryAssignments(MXGanttModel model,
MXActivity mxa)
Return true if the given activity is a type that can support secondary
assignments
|
||
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"
|
||
static com.ibm.json.java.JSONObject |
ColMoveInSectionOnly(com.ibm.json.java.JSONObject col)
Updates column so that it can move within a SECTION only
|
||
static java.util.Date |
convertDate(java.util.Date date,
java.util.TimeZone timezone) |
||
static com.ibm.json.java.JSONObject |
createAndAddToolbar(com.ibm.json.java.JSONObject root,
UIOptions options) |
||
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.
|
||
static com.ibm.json.java.JSONObject |
createLevel(java.lang.String name,
float width,
com.ibm.tivoli.maximo.miniapps.scheduler.GanttUtil.ZoomRangeSpec spec) |
||
static com.ibm.json.java.JSONArray |
createZooms(Range<java.util.Date> range,
int snapToGridInterval) |
||
static void |
detectAllConflicts(MXActivity resv,
MXGanttModel model,
MXResource mxr,
java.util.List<MXActivity> nonWork,
ReplyBuilder reply) |
||
static void |
detectCalendarBreakConflicts(MXActivity resv,
MXGanttModel model,
MXResource mxr,
ReplyBuilder reply) |
||
static void |
detectConflicts(MXGanttModel model,
MXResource mxr,
ReplyBuilder reply) |
||
static void |
detectNonWorkAndDoubleBookedConflicts(MXActivity resv,
MXGanttModel model,
java.util.List<MXActivity> nonWork,
ReplyBuilder reply)
Detect "time" conflicts between resv and the list of activities.
|
||
static void |
detectShiftConflicts(MXActivity resv,
MXGanttModel model,
MXResource mxr,
ReplyBuilder reply) |
||
static java.lang.String |
doReplacementsForZoom(java.lang.String zoomJSON,
ISKDUIInfo skdUIInfo,
UIOptions options) |
||
static void |
encodeFields(IMXActivity act,
java.lang.String[] fields,
MXGanttModel model,
ReplyBuilder builder,
TreeGridUtil.ITGSerializationHelper helper)
Encode fields into a Changes segment of the ReplyBuilder
|
||
static void |
encodeModifiedFields(MXActivity act,
ReplyBuilder builder,
TreeGridUtil.ITGSerializationHelper helper)
Encode the modified fields as a Changes segment into the reply object
|
||
static java.lang.String |
encodeTreeGridActivityContraints(MXGanttModel model,
MXActivity mxa,
UserInfo userInfo)
Encodes the Contstaints and form the IlvConstaints coming from this
activity and update the Activity's DECENDENTS field with the newly
calculated descendents.
|
||
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.
|
||
static ilog.views.gantt.IlvHierarchyNode |
find(GanttUtil.Predicate idp,
ilog.views.gantt.IlvHierarchyNode start,
ilog.views.gantt.IlvGanttModel model) |
||
static IMXActivity |
find(GanttUtil.Predicate idp,
IMXActivity start,
IMXGanttModel model) |
||
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.
|
||
static IMXActivity |
findActivityById(java.lang.String id,
IMXGanttModel model) |
||
static ilog.views.gantt.IlvResource |
findAssignedResource(MXGanttModel model,
MXActivity mxa)
For a given activity return the assigned resource, or null, if nothing is
assigned.
|
||
static MXConstraint |
findContrantFor(MXActivity from,
MXActivity to,
MXGanttModel model) |
||
static MXConstraint |
findContrantFor(java.lang.String fromId,
java.lang.String toId,
MXGanttModel model) |
||
static ilog.views.gantt.IlvResource |
findResourceById(java.lang.String id,
ilog.views.gantt.IlvHierarchyNode start,
MXGanttModel model) |
||
static ilog.views.gantt.IlvResource |
findResourceById(java.lang.String id,
MXGanttModel model) |
||
static java.util.Date |
fromTreeGridDate(long ms,
java.util.TimeZone tz)
Convert a GMT-0 TreeGrid time into a Maximo Time
|
||
static java.util.List<IMXGanttPropertyInfo> |
getActivityColumns(IGanttConfigInfo info) |
||
static Range<java.util.Date> |
getActualStartEnd(MXGanttModel model)
Traverses the entire project to find the start/end dates the covers the
project work
|
||
static java.util.List<MXActivity> |
getAssignmentsAndNonWork(MXGanttModel model,
MXResource mxr) |
||
static boolean |
getBoolean(java.lang.Object value) |
||
static java.util.List<DateRange> |
getCalendarBreakRanges(MXResource mxr,
MXGanttModel model) |
||
static MXActivity |
getEndLocation(MXGanttModel model,
MXResource resource) |
||
static java.util.List<MXActivity> |
getExtaWork(MXGanttModel model,
MXResource mxr) |
||
static java.lang.String |
getGanttComplete(IMXGanttModel model) |
||
static java.lang.String |
getGanttUnits() |
||
static java.lang.String |
getID(ilog.views.gantt.IlvResource mxa) |
||
static java.lang.String |
getID(IMXActivity mxa)
Returns the TreeGrid ID for this activity and creates one, if one does
not exist.
|
||
static java.lang.String |
getID(IMXResource mxa) |
||
static java.lang.String |
getID(java.lang.String actid)
Given an activity ID from ILOG create a TreeGrid compatible ID
|
||
static java.lang.String |
getInfoRowText(IMXGanttModel schedule,
UIOptions options) |
||
static java.lang.String |
getMergedShiftsAsBackground(IMXGanttModel schedule)
Returns the merged shift pattern as a TreeGrid background.
|
||
static java.lang.String |
getMergedShiftsAsInclude(IMXGanttModel model,
UserInfo userInfo)
Creates a shift pattern in TreeGrid format that are Include ranges.
|
||
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.
|
||
static MXActivity |
getParentWorkorder(MXGanttModel model,
ilog.views.gantt.IlvActivity assignment) |
||
static MXActivity |
getParentWorkorderThatIsNotATask(MXGanttModel model,
ilog.views.gantt.IlvActivity assignment) |
||
static Range<java.util.Date> |
getProjectStartEnd(IMXGanttModel model)
Traverses the entire project to find the start/end dates the covers the
project work
|
||
static java.lang.String |
getReadOnlyStyledText(java.lang.String value,
boolean readOnly)
Gets the styled text for GA - Scenarios.
|
||
static MXActivity |
getRelatedActivity(MXGanttModel model,
MXActivity activity,
MXResource resource,
GanttUtil.NodeDirection location) |
||
static java.util.List<IMXGanttPropertyInfo> |
getResourceColumns(IGanttConfigInfo info) |
||
static MXResource |
getResourceForActivity(MXGanttModel model,
MXActivity mxa) |
||
static java.util.List<java.lang.String> |
getResourceObjectNames(int type) |
||
static java.util.List<MXActivity> |
getSecondaryAssignmens(MXGanttModel model,
MXActivity primary) |
||
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.
|
||
static java.lang.String |
getShiftColor(IMXGanttModel schedule,
java.util.Properties props,
java.lang.String shift) |
||
static java.lang.String |
getShiftColorId(IMXGanttModel schedule,
java.util.Properties props,
java.lang.String shift) |
||
static java.util.List<java.util.Date> |
getShiftPeriodsForResource(MXResource mxr,
MXGanttModel model)
Returns the Shift Dates as a List of Dates for the Shift on the Resource.
|
||
static java.lang.String |
getShiftsAsBackground(IMXGanttModel schedule,
java.util.Properties props,
java.util.List<java.lang.String> shifts) |
||
static java.lang.String |
getShortDateFormat(ISKDUIInfo skdUIInfo) |
||
static MXActivity |
getStartLocation(MXGanttModel model,
MXResource resource) |
||
static java.lang.String |
getTGNWParts(MXGanttModel model,
MXActivity mxa,
TreeGridUtil.ITGSerializationHelper helper) |
||
static java.lang.String |
getTGStyle() |
||
static java.lang.String |
getTGStylePrefix() |
||
static java.lang.String |
getTreeGridID(java.lang.String ilogID)
proxy for getID()
|
||
static double |
IlvDurationToDouble(ilog.views.gantt.IlvDuration lv,
UserInfo ui)
Convert IlvDuration to a double
|
||
static boolean |
isActualPercentComplete(IMXGanttModel model) |
||
static boolean |
isAssignment(MXActivity mxa) |
||
static boolean |
isCompleted(MXActivity mxa) |
||
static boolean |
isCrew(IMXResource mxr) |
||
static boolean |
isDummy(ilog.views.gantt.IlvResource next) |
||
static boolean |
isExtraTime(MXActivity a) |
||
static boolean |
isGanttColumn(java.lang.String col) |
||
static boolean |
isHidden(MXActivity mxa) |
||
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.
|
||
static boolean |
isInterruptable(MXGanttModel model,
MXActivity mxa) |
||
static boolean |
isLabor(IMXResource mxr) |
||
static boolean |
isLaborOrCrew(IMXResource mxr) |
||
static boolean |
isLaborOrCrewOrLocations(IMXResource mxr) |
||
static boolean |
isLocations(IMXResource mxr) |
||
static boolean |
isLocked(MXActivity activity) |
||
static boolean |
isModAvail(MXActivity a) |
||
static boolean |
isNonWork(MXActivity mxa) |
||
static boolean |
isOtherAssignment(MXActivity act) |
||
static boolean |
isOtherAssignment(MXActivity act,
MXGanttModel model) |
||
static boolean |
isOtherAssignment(MXReservation act) |
||
static boolean |
isPercentCompleteNone(IMXGanttModel model) |
||
static boolean |
isPhysicalPercentComplete(IMXGanttModel model) |
||
static boolean |
isReadOnly(MXActivity mxa) |
||
static boolean |
isSecondary(MXActivity mxa) |
||
static boolean |
isSerializable(java.lang.String columnName,
java.lang.Object data) |
||
static boolean |
isTask(IMXActivity act) |
||
static boolean |
isTaskPercentComplete(IMXGanttModel model) |
||
static boolean |
isWorkorder(IMXActivity mxa)
Returns true if the given
IlvActivity is a work order |
||
static MXGanttPropertyInfo |
newActivityColumn(java.lang.String name,
int type) |
||
static MXGanttPropertyInfo |
newResourceColumn(java.lang.String name,
int type) |
||
static java.util.List<ilog.views.gantt.IlvActivity> |
resolveSelectedActivities(MXGanttModel model,
java.util.List<java.lang.String> activityIds)
For the list of Activity IDs, return a List of actual Activities
|
||
static java.util.List<ilog.views.gantt.IlvActivity> |
resolveSelectedActivitiesByUniqueIds(MXGanttModel model,
java.util.List<java.lang.Object> uniqueIds)
Resolves a list of object unique IDs into IlvActvity Objects
|
||
static java.lang.String |
sanitizeDateTimeFormatForTreeGrid(java.lang.String mask) |
||
static void |
setCommonPrintExportMenuOptions(com.ibm.json.java.JSONObject root,
UserInfo userInfo) |
||
static void |
setLeftPanelOptions(com.ibm.json.java.JSONObject Panel,
UIOptions options) |
||
static boolean |
showBoldResourceName(MXResource mxr) |
||
static boolean |
showRequirementIcon(MXActivity mxa) |
||
static boolean |
showWeatherAlertIcon(MXActivity mxa) |
||
static boolean |
showWorklogIcon(MXActivity mxa) |
||
static java.lang.Object |
toSerializedValue(java.lang.Object o,
TreeGridUtil.ITGSerializationHelper helper) |
||
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
|
||
static long |
toTreeGridUTCDate(java.util.Date d) |
||
static void |
updateFormatForLocale(com.ibm.json.java.JSONObject format,
UserInfo userInfo,
ISKDUIInfo skdUIInfo)
static MXResource updateResourceTravelTimes(MXGanttModel model,
DispatchViewBean bean,
MXResource resource) | ||
static void |
updateSecondarAssignments(MXGanttModel model,
MXActivity act,
ReplyBuilder reply,
TreeGridUtil.ITGSerializationHelper helper)
Given the Activity, update any secondary Assignments, so that the
secondary date/times will be adjects to match the primary.
|
||
static void |
updateSecondAssignment(MXActivity pri,
MXActivity sec,
ReplyBuilder reply,
TreeGridUtil.ITGSerializationHelper helper)
Given the primary and secondary, update the time and status to match the
primary.
|
||
static void |
write(com.ibm.json.java.JSONObject json,
java.lang.String name,
java.lang.Object value,
TreeGridUtil.ITGSerializationHelper helper) |
||
static void |
write(TGJsonWriter jsonWriter,
java.lang.String name,
java.lang.Object value,
TreeGridUtil.ITGSerializationHelper helper) |
||
static void |
writeAdditionalWorkOrderFieldsForAssignment(MXActivity act,
MXGanttModel model,
TGJsonWriter jsonWriter,
TreeGridUtil.ITGSerializationHelper helper)
Given the assignment, add in various WO fields.
|
||
static void |
writeIDFields(TGJsonWriter jsonWriter,
ilog.views.gantt.IlvResource res,
GanttUtil.IDGenerator idGen) |
||
static void |
writeIDFields(TGJsonWriter jsonWriter,
MXActivity mxa)
Writes the ID field for the TreeGrid.
|
||
static void |
writeIDFields(TGJsonWriter jsonWriter,
MXActivity mxa,
GanttUtil.IDGenerator idGen)
Writes the ID field for the TreeGrid.
|
||
static void |
writeJsonActivityContraints(com.ibm.json.java.JSONObject json,
MXGanttModel model,
MXActivity mxa,
UserInfo userInfo) |
public static final GanttUtil.IDGenerator DEFAULT_ID_GENERATOR
public static final java.lang.String RESOURCE_USERDATA_SHIFTDATES
public static final int BUCKET_BASED
public static final int TIME_BASED
public static final int ALL
public static IMXActivity findActivityById(java.lang.String id, IMXGanttModel model)
public static void writeAdditionalWorkOrderFieldsForAssignment(MXActivity act, MXGanttModel model, TGJsonWriter jsonWriter, TreeGridUtil.ITGSerializationHelper helper) throws java.io.IOException
java.io.IOException
public static ilog.views.gantt.IlvActivity findActivityById(java.lang.String id, ilog.views.gantt.IlvHierarchyNode start, ilog.views.gantt.IlvGanttModel model)
id
- start
- model
- public static ilog.views.gantt.IlvResource findResourceById(java.lang.String id, ilog.views.gantt.IlvHierarchyNode start, MXGanttModel model)
public static ilog.views.gantt.IlvHierarchyNode find(GanttUtil.Predicate idp, ilog.views.gantt.IlvHierarchyNode start, ilog.views.gantt.IlvGanttModel model)
public static IMXActivity find(GanttUtil.Predicate idp, IMXActivity start, IMXGanttModel model)
public static long toTreeGridDate(java.util.Date d, java.util.TimeZone tz)
d
- Date using TimeZone specifiedtz
- User's TimeZonepublic static long toTreeGridUTCDate(java.util.Date d)
public static java.util.Date fromTreeGridDate(long ms, java.util.TimeZone tz)
ms
- TreeGrid's Time in MStz
- User's TimeZonepublic static java.lang.String getReadOnlyStyledText(java.lang.String value, boolean readOnly)
value
- readOnly
- public static Range<java.util.Date> getProjectStartEnd(IMXGanttModel model)
model
- public static Range<java.util.Date> getActualStartEnd(MXGanttModel model)
model
- 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
writer
- colName
- imageUrl
- iconWidth
- align
- item
- java.io.IOException
public static void addLeftIconClass(TGJsonWriter jsonWriter, java.lang.String className) throws java.io.IOException
jsonWriter
- className
- java.io.IOException
public static void addLeftIconClick(TGJsonWriter jsonWriter, java.lang.String eventName) throws java.io.IOException
jsonWriter
- eventName
- java.io.IOException
public static void addLeftIconClass(TGJsonWriter jsonWriter, java.lang.String className, java.lang.String tip) throws java.io.IOException
java.io.IOException
public static void addRightIconClass(TGJsonWriter jsonWriter, java.lang.String className) throws java.io.IOException
jsonWriter
- className
- java.io.IOException
public static void addRightIconClick(TGJsonWriter jsonWriter, java.lang.String eventName) throws java.io.IOException
jsonWriter
- eventName
- java.io.IOException
public static void addRightIconClass(TGJsonWriter jsonWriter, java.lang.String className, java.lang.String tip) throws java.io.IOException
java.io.IOException
public static boolean isGanttColumn(java.lang.String col)
public static boolean isAssignment(MXActivity mxa)
public static boolean isNonWork(MXActivity mxa)
public static java.util.List<java.util.Date> getShiftPeriodsForResource(MXResource mxr, MXGanttModel model)
IterableDateRange
to iterate the dates as Ranges.mxr
- model
- public static boolean isWorkorder(IMXActivity mxa)
IlvActivity
is a work orderact
- IlvActivity
instancepublic static boolean isLabor(IMXResource mxr)
public static boolean isCrew(IMXResource mxr)
public static boolean isLocations(IMXResource mxr)
public static boolean isLaborOrCrew(IMXResource mxr)
public static boolean isLaborOrCrewOrLocations(IMXResource mxr)
public static boolean isTask(IMXActivity act)
public static boolean isReadOnly(MXActivity mxa)
public static boolean isLocked(MXActivity activity)
public static boolean isSecondary(MXActivity mxa)
public static boolean isHidden(MXActivity mxa)
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
java.io.IOException
public static void write(TGJsonWriter jsonWriter, java.lang.String name, java.lang.Object value, TreeGridUtil.ITGSerializationHelper helper) throws java.io.IOException
java.io.IOException
public static java.lang.Object toSerializedValue(java.lang.Object o, TreeGridUtil.ITGSerializationHelper helper) throws java.io.IOException
java.io.IOException
public static boolean showWorklogIcon(MXActivity mxa)
public static boolean getBoolean(java.lang.Object value)
public static boolean showRequirementIcon(MXActivity mxa)
public static boolean showWeatherAlertIcon(MXActivity mxa)
public static void addClass(TGJsonWriter writer, java.lang.String classUrl) throws java.io.IOException
writer
- styleUrl
- java.io.IOException
public static void addBold(TGJsonWriter writer, java.lang.String boldUrl) throws java.io.IOException
writer
- styleUrl
- java.io.IOException
public static boolean showBoldResourceName(MXResource mxr)
public static boolean isSerializable(java.lang.String columnName, java.lang.Object data)
public static boolean isDummy(ilog.views.gantt.IlvResource next)
public static void applyReadonlyOrLocked(TGJsonWriter jsonWriter, MXActivity mxa, boolean isRunBar) throws java.io.IOException
java.io.IOException
public static boolean isCompleted(MXActivity mxa)
public static MXGanttPropertyInfo newActivityColumn(java.lang.String name, int type)
public static MXGanttPropertyInfo newResourceColumn(java.lang.String name, int type)
public static java.lang.String sanitizeDateTimeFormatForTreeGrid(java.lang.String mask)
public static void applyDefaultStyle(com.ibm.json.java.JSONObject Cfg)
public static java.lang.String getTGStyle()
public static java.lang.String getTGStylePrefix()
public static com.ibm.json.java.JSONObject addWorkPeriodInfo(com.ibm.json.java.JSONObject gantt, IMXGanttModel model, java.util.Properties props, java.util.List<java.lang.String> shifts)
gantt
- model
- public static java.lang.String getShiftColorId(IMXGanttModel schedule, java.util.Properties props, java.lang.String shift)
public static java.lang.String getShiftColor(IMXGanttModel schedule, java.util.Properties props, java.lang.String shift)
public static java.lang.String getMergedShiftsAsBackground(IMXGanttModel schedule)
model
- userInfo
- public static java.lang.String getShiftsAsBackground(IMXGanttModel schedule, java.util.Properties props, java.util.List<java.lang.String> shifts)
public static com.ibm.json.java.JSONObject addWorkPeriodInfoAsTGInclude(com.ibm.json.java.JSONObject gantt, MXGanttModel model, UserInfo userInfo)
gantt
- model
- public static java.lang.String getMergedShiftsAsInclude(IMXGanttModel model, UserInfo userInfo)
model
- userInfo
- 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)
sb
- StringBuilder to which to append the datastart
- end
- tz
- tgColor
- - TreeGrid color valuepublic static java.lang.String createBackground(java.util.Date start, java.util.Date end, java.util.TimeZone tz, java.lang.String tgColor)
start
- end
- tz
- tgColor
- TreeGrid colorpublic static void updateFormatForLocale(com.ibm.json.java.JSONObject format, UserInfo userInfo, ISKDUIInfo skdUIInfo)
format
- locale
- public static java.lang.String getShortDateFormat(ISKDUIInfo skdUIInfo)
public static void addGanttZooms(com.ibm.json.java.JSONObject root, ISKDUIInfo skdUIInfo, UIOptions options, AbstractTreeGridMiniAppBean bean, com.ibm.json.java.JSONObject Gantt)
root
- skdUIInfo
- options
- bean
- Gantt
- public static com.ibm.json.java.JSONArray createZooms(Range<java.util.Date> range, int snapToGridInterval)
public static com.ibm.json.java.JSONObject createLevel(java.lang.String name, float width, com.ibm.tivoli.maximo.miniapps.scheduler.GanttUtil.ZoomRangeSpec spec)
public static java.lang.String getGanttUnits()
public static void addCommonGanttStartEnd(com.ibm.json.java.JSONObject Gantt, IMXGanttModel model, java.util.TimeZone timeZone)
public static void addCommonGanttStartEnd(com.ibm.json.java.JSONObject Gantt, IMXGanttModel model, java.util.TimeZone timeZone, boolean fixedStartEnd)
public static void addCommonGantt(com.ibm.json.java.JSONObject Gantt, UIOptions opts)
public static java.lang.String doReplacementsForZoom(java.lang.String zoomJSON, ISKDUIInfo skdUIInfo, UIOptions options)
public static com.ibm.json.java.JSONObject createAndAddToolbar(com.ibm.json.java.JSONObject root, UIOptions options)
public static com.ibm.json.java.JSONObject addToolbarIcons(com.ibm.json.java.JSONObject Toolbar, UIOptions options)
public static void addSafeCSS(WebClientSession sess, com.ibm.json.java.JSONObject Cfg)
sess
- Cfg
- public static MXConstraint findContrantFor(java.lang.String fromId, java.lang.String toId, MXGanttModel model)
public static MXConstraint findContrantFor(MXActivity from, MXActivity to, MXGanttModel model)
public static MXActivity getParentWorkorder(MXGanttModel model, ilog.views.gantt.IlvActivity assignment)
public static MXActivity getParentWorkorderThatIsNotATask(MXGanttModel model, ilog.views.gantt.IlvActivity assignment)
public static MXResource getResourceForActivity(MXGanttModel model, MXActivity mxa)
public static java.util.List<MXActivity> getSecondaryAssignmens(MXGanttModel model, MXActivity primary)
public static void addCommonLangCFG(com.ibm.json.java.JSONObject root, UserInfo userInfo, ISKDUIInfo skdUIInfo)
root
- userInfo
- skdUIInfo
- public static void setCommonPrintExportMenuOptions(com.ibm.json.java.JSONObject root, UserInfo userInfo)
public static void addCommonCFG(WebClientSession sess, com.ibm.json.java.JSONObject Cfg, UIOptions options, AbstractTreeGridMiniAppBean bean) throws java.io.IOException, MXException
sess
- Cfg
- options
- bean
- java.io.IOException
MXException
public static void addPerfOptions(com.ibm.json.java.JSONObject Cfg, UIOptions opts)
public static void addTreeDef(com.ibm.json.java.JSONArray Defs)
Defs
- public static void addCommonActions(com.ibm.json.java.JSONObject root, UIOptions options)
root
- public static com.ibm.json.java.JSONObject ColMoveInSectionOnly(com.ibm.json.java.JSONObject col)
col
- public static void writeIDFields(TGJsonWriter jsonWriter, MXActivity mxa) throws java.io.IOException
jsonWriter
- mxa
- java.io.IOException
public static void writeIDFields(TGJsonWriter jsonWriter, MXActivity mxa, GanttUtil.IDGenerator idGen) throws java.io.IOException
jsonWriter
- mxa
- java.io.IOException
public static void writeIDFields(TGJsonWriter jsonWriter, ilog.views.gantt.IlvResource res, GanttUtil.IDGenerator idGen) throws java.io.IOException
java.io.IOException
public static java.lang.String getID(IMXActivity mxa)
act
- model
- public static java.lang.String getID(IMXResource mxa)
public static java.lang.String getID(ilog.views.gantt.IlvResource mxa)
public static java.lang.String getID(java.lang.String actid)
actid
- public static java.lang.String getTreeGridID(java.lang.String ilogID)
ilogID
- public static boolean isIDField(java.lang.String s)
s
- field namepublic static double IlvDurationToDouble(ilog.views.gantt.IlvDuration lv, UserInfo ui) throws java.lang.Exception
lv
- java.lang.Exception
public static java.util.List<ilog.views.gantt.IlvActivity> resolveSelectedActivities(MXGanttModel model, java.util.List<java.lang.String> activityIds)
model
- activityIds
- public static java.util.List<ilog.views.gantt.IlvActivity> resolveSelectedActivitiesByUniqueIds(MXGanttModel model, java.util.List<java.lang.Object> uniqueIds)
model
- activityIds
- public static java.lang.String encodeTreeGridActivityContraints(MXGanttModel model, MXActivity mxa, UserInfo userInfo) throws java.io.IOException
model
- mxa
- java.io.IOException
public static void writeJsonActivityContraints(com.ibm.json.java.JSONObject json, MXGanttModel model, MXActivity mxa, UserInfo userInfo) throws java.io.IOException
java.io.IOException
public static void encodeModifiedFields(MXActivity act, ReplyBuilder builder, TreeGridUtil.ITGSerializationHelper helper) throws java.io.IOException
act
- builder
- helper
- java.io.IOException
public static void encodeFields(IMXActivity act, java.lang.String[] fields, MXGanttModel model, ReplyBuilder builder, TreeGridUtil.ITGSerializationHelper helper) throws java.io.IOException
act
- builder
- helper
- java.io.IOException
public static ilog.views.gantt.IlvResource findAssignedResource(MXGanttModel model, MXActivity mxa)
model
- mxa
- public static boolean equals(MXActivity mx1, MXActivity mx2, java.lang.String propName)
mx1
- mx2
- propName
- public static void updateSecondarAssignments(MXGanttModel model, MXActivity act, ReplyBuilder reply, TreeGridUtil.ITGSerializationHelper helper) throws java.io.IOException
model
- act
- reply
- helper
- java.io.IOException
public static void updateSecondAssignment(MXActivity pri, MXActivity sec, ReplyBuilder reply, TreeGridUtil.ITGSerializationHelper helper) throws java.io.IOException
pri
- sec
- reply
- helper
- java.io.IOException
public static boolean canProcessUpdateSecondaryAssignments(MXGanttModel model, MXActivity mxa)
model
- mxa
- public static void setLeftPanelOptions(com.ibm.json.java.JSONObject Panel, UIOptions options)
public static boolean isInterruptable(MXGanttModel model, MXActivity mxa)
public static java.util.List<IMXGanttPropertyInfo> getActivityColumns(IGanttConfigInfo info)
public static java.util.List<IMXGanttPropertyInfo> getResourceColumns(IGanttConfigInfo info)
public static GanttUtil.NodeLocation getNodeLocationDetails(ilog.views.gantt.IlvGanttModel model, ilog.views.gantt.IlvHierarchyNode node)
model
- node
- public static ilog.views.gantt.IlvResource findResourceById(java.lang.String id, MXGanttModel model)
public static void addCommonPrintOptions(WebClientSession clientSession, com.ibm.json.java.JSONObject cfg, UIOptions options, AbstractTreeGridMiniAppBean bean)
public static boolean isOtherAssignment(MXActivity act)
public static boolean isOtherAssignment(MXReservation act)
public static boolean isOtherAssignment(MXActivity act, MXGanttModel model)
public static boolean isPhysicalPercentComplete(IMXGanttModel model)
public static boolean isTaskPercentComplete(IMXGanttModel model)
public static boolean isActualPercentComplete(IMXGanttModel model)
public static boolean isPercentCompleteNone(IMXGanttModel model)
public static java.lang.String getGanttComplete(IMXGanttModel model)
public static void addComplianceDetails(TGJsonWriter jsonWriter, IMXGanttModel model, IMXActivity mxa, AbstractTreeGridMiniAppBean bean, TreeGridUtil.ITGSerializationHelper helper) throws java.io.IOException
java.io.IOException
public static java.util.List<MXActivity> getAssignmentsAndNonWork(MXGanttModel model, MXResource mxr)
public static java.util.List<MXActivity> getExtaWork(MXGanttModel model, MXResource mxr)
public static void detectConflicts(MXGanttModel model, MXResource mxr, ReplyBuilder reply)
public static void detectAllConflicts(MXActivity resv, MXGanttModel model, MXResource mxr, java.util.List<MXActivity> nonWork, ReplyBuilder reply)
public static boolean isModAvail(MXActivity a)
public static boolean isExtraTime(MXActivity a)
public static void detectShiftConflicts(MXActivity resv, MXGanttModel model, MXResource mxr, ReplyBuilder reply)
public static long getSequenceDay(java.util.Date workPeriodBeginDate, java.util.Date tempVisibleStartDate, long patternDays, java.util.TimeZone userTz, java.util.Locale userLocale)
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.public static java.util.List<DateRange> getCalendarBreakRanges(MXResource mxr, MXGanttModel model)
public static void detectCalendarBreakConflicts(MXActivity resv, MXGanttModel model, MXResource mxr, ReplyBuilder reply)
public static void detectNonWorkAndDoubleBookedConflicts(MXActivity resv, MXGanttModel model, java.util.List<MXActivity> nonWork, ReplyBuilder reply)
resv
- nonWork
- reply
- public static void buildInfoRow(UIBuilder data, IMXGanttModel schedule, UIOptions options)
public static java.lang.String getInfoRowText(IMXGanttModel schedule, UIOptions options)
public static MXActivity getRelatedActivity(MXGanttModel model, MXActivity activity, MXResource resource, GanttUtil.NodeDirection location)
public static MXActivity getStartLocation(MXGanttModel model, MXResource resource)
public static MXActivity getEndLocation(MXGanttModel model, MXResource resource)
public static MXResource updateResourceTravelTimes(MXGanttModel model, DispatchViewBean bean, MXResource resource)
public static java.lang.String cleanProperty(java.lang.String in)
public static java.util.Date convertDate(java.util.Date date, java.util.TimeZone timezone)
public static java.lang.String getTGNWParts(MXGanttModel model, MXActivity mxa, TreeGridUtil.ITGSerializationHelper helper) throws java.io.IOException
java.io.IOException
public static java.lang.String buildActivityID(MboRemote mbo, java.lang.String objectName, java.lang.String key) throws java.rmi.RemoteException, MXException
java.rmi.RemoteException
MXException
public static java.lang.String buildResourceID(java.lang.String key, java.lang.String orgID)
public static java.util.List<java.lang.String> getResourceObjectNames(int type)