public class GWAGanttUtil
extends java.lang.Object
Constructor and Description |
---|
GWAGanttUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addCellIcon(DataRow row,
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 java.lang.String |
buildGWAAssignmentID(MboRemote wo,
MboRemote assignment) |
static void |
detectAllConflicts(Activity resv,
GWASchedule model,
java.lang.String resource,
ReplyBuilder reply) |
static void |
detectCalendarBreakConflicts(Activity resv,
GWASchedule model,
java.lang.String resource,
ReplyBuilder reply) |
static void |
detectNonWorkAndDoubleBookedConflicts(Activity resv,
GWASchedule model,
java.lang.String resource,
ReplyBuilder reply)
Detect "time" conflicts between resv and the list of activities.
|
static void |
detectShiftConflicts(Activity resv,
GWASchedule model,
java.lang.String resource,
ReplyBuilder reply) |
static void |
encodeActivityColumnValues(TGJsonWriter jsonWriter,
IMXGanttModel model,
IMXActivity mxa,
boolean isRunBar,
TreeGridUtil.ITGSerializationHelper helper,
CompareMaxModelTGEmitter.ModelNumIDGenerator idGen)
Writes the Activity Column Data to Json
|
static void |
encodeFields(IMXActivity act,
java.lang.String[] fields,
GWASchedule model,
ReplyBuilder builder,
TreeGridUtil.ITGSerializationHelper helper)
Encode fields into a Changes segment of the ReplyBuilder
|
static boolean |
equals(Activity mx1,
Activity 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 java.util.List<DateRange> |
getCalendarBreakRanges(java.lang.String resource,
GWASchedule model) |
static java.util.List<java.util.Date> |
getShiftPeriodsForResource(java.lang.String resource,
GWASchedule model)
Returns the Shift Dates as a List of Dates for the Shift on the Resource.
|
static java.lang.String |
getTGNWParts(GWASchedule model,
Activity mxa,
TreeGridUtil.ITGSerializationHelper helper) |
static java.lang.String |
getTGNWParts(IMXGanttModel model,
IMXActivity mxa,
TreeGridUtil.ITGSerializationHelper helper) |
static boolean |
isAssignmentDummy(IMXActivity node) |
static boolean |
isCompleted(IMXActivity mxa) |
static boolean |
isDummy(IMXActivity next) |
static boolean |
isHidden(IMXActivity mxa) |
static boolean |
isInterruptable(GWASchedule model,
Activity mxa) |
static boolean |
isInterruptable(IMXGanttModel model,
IMXActivity mxa) |
static boolean |
isLocked(IMXActivity activity) |
static boolean |
isTask(Activity act) |
static boolean |
isValid(Activity from,
Activity to,
UserInfo userInfo)
Determine if a Constraint is valid from the given 'from' activity to the provided 'to' activity.
|
static boolean |
isWorkorder(Activity mxa)
Returns true if the given
IlvActivity is a work order |
static java.util.List<Activity> |
resolveSelectedActivitiesById(GWASchedule model,
java.util.List<java.lang.Object> arr) |
static boolean |
showRequirementIcon(IMXActivity mxa) |
static boolean |
showWorklogIcon(IMXActivity mxa) |
static java.lang.String |
toStringProps(Activity from,
java.lang.String... props)
Given a UserPropertyHolder create a toString from the given properties
|
static void |
writeIDFields(TGJsonWriter jsonWriter,
IMXActivity mxa,
CompareMaxModelTGEmitter.ModelNumIDGenerator idGen)
Writes the ID field for the TreeGrid.
|
static void |
writeIDFields(TGJsonWriter jsonWriter,
IMXResource mxa,
CompareMaxModelTGEmitter.ModelNumIDGenerator idGen)
Writes the ID field for the TreeGrid.
|
public static boolean isValid(Activity from, Activity to, UserInfo userInfo) throws java.rmi.RemoteException, MXException
from
- to
- MXException
java.rmi.RemoteException
public static boolean isWorkorder(Activity mxa)
IlvActivity
is a work orderact
- IlvActivity
instancepublic static boolean isTask(Activity act)
public static java.lang.String toStringProps(Activity from, java.lang.String... props)
from
- props
- public static void encodeFields(IMXActivity act, java.lang.String[] fields, GWASchedule model, ReplyBuilder builder, TreeGridUtil.ITGSerializationHelper helper) throws java.io.IOException
act
- builder
- helper
- java.io.IOException
public static boolean isInterruptable(GWASchedule model, Activity mxa)
public static java.lang.String getTGNWParts(GWASchedule model, Activity mxa, TreeGridUtil.ITGSerializationHelper helper)
public static boolean equals(Activity mx1, Activity mx2, java.lang.String propName)
mx1
- mx2
- propName
- public static java.util.List<Activity> resolveSelectedActivitiesById(GWASchedule model, java.util.List<java.lang.Object> arr)
public static boolean isHidden(IMXActivity mxa)
public static boolean isDummy(IMXActivity next)
public static boolean isAssignmentDummy(IMXActivity node)
public static void encodeActivityColumnValues(TGJsonWriter jsonWriter, IMXGanttModel model, IMXActivity mxa, boolean isRunBar, TreeGridUtil.ITGSerializationHelper helper, CompareMaxModelTGEmitter.ModelNumIDGenerator idGen) throws java.io.IOException
jsonWriter
- model
- mxa
- java.io.IOException
public static java.lang.String getTGNWParts(IMXGanttModel model, IMXActivity mxa, TreeGridUtil.ITGSerializationHelper helper) throws java.io.IOException
java.io.IOException
public static void writeIDFields(TGJsonWriter jsonWriter, IMXActivity mxa, CompareMaxModelTGEmitter.ModelNumIDGenerator idGen) throws java.io.IOException
jsonWriter
- mxa
- java.io.IOException
public static void writeIDFields(TGJsonWriter jsonWriter, IMXResource mxa, CompareMaxModelTGEmitter.ModelNumIDGenerator idGen) throws java.io.IOException
jsonWriter
- mxa
- java.io.IOException
public static boolean isLocked(IMXActivity activity)
public static boolean showRequirementIcon(IMXActivity mxa)
public static boolean showWorklogIcon(IMXActivity mxa)
public static boolean isCompleted(IMXActivity mxa)
public static boolean isInterruptable(IMXGanttModel model, IMXActivity mxa)
public static java.lang.String buildGWAAssignmentID(MboRemote wo, MboRemote assignment) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public static void addCellIcon(DataRow row, java.lang.String colName, java.lang.String imageUrl, int iconWidth, java.lang.String align, TMenuItem item)
writer
- colName
- imageUrl
- iconWidth
- align
- item
- java.io.IOException
public static void detectAllConflicts(Activity resv, GWASchedule model, java.lang.String resource, ReplyBuilder reply)
public static void detectNonWorkAndDoubleBookedConflicts(Activity resv, GWASchedule model, java.lang.String resource, ReplyBuilder reply)
resv
- nonWork
- reply
- public static void detectShiftConflicts(Activity resv, GWASchedule model, java.lang.String resource, ReplyBuilder reply)
public static void detectCalendarBreakConflicts(Activity resv, GWASchedule model, java.lang.String resource, ReplyBuilder reply)
public static java.util.List<java.util.Date> getShiftPeriodsForResource(java.lang.String resource, GWASchedule model)
IterableDateRange
to iterate the dates as Ranges.mxr
- model
- public static java.util.List<DateRange> getCalendarBreakRanges(java.lang.String resource, GWASchedule model)