public class ConstraintUtil
extends java.lang.Object
| Constructor and Description |
|---|
ConstraintUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
acceptDestination(MXActivity fromActivity,
MXActivity toActivity,
MXGanttModel mxGanttModel,
ilog.views.gantt.IlvConstraintType constraintType)
Makes sure that constraints cannot be draw TO Roots and dummys and PM
type activities
Following rules are covered -Constraint is not allowed on PM Forecasts. -You cannot link a predecessor task twice to the same successor task. -Constraint Cycle is detected, which is not allowed. -Same Constraint is being added again, which is not allowed. -Constraint is not allowed from root level nodes. -Constraint is only allowed within siblings of a parent |
static boolean |
acceptOrigin(MXActivity fromActivity,
MXGanttModel mxGanttModel)
Makes sure that constraints cannot be draw FROM Roots and dummys and PM
type activities
Following rules are covered -Constraint is not allowed on PM Forecasts. -Constraint is not allowed from top level nodes. -Constraint is not allowed from root level nodes. |
static void |
createLinkedConstraints(MXGanttModel model,
BaseTreeGridMiniAppBean bean,
java.util.List ids,
java.lang.String projectId,
SKDAppServiceBeanRemote serviceBean)
For a given list of Activity IDs then create a Finish to Start constrain
with the next Activity, IF POSSIBLE.
|
static void |
createLinkedConstraints(Schedule model,
AbstractTreeGridMiniAppBean bean,
java.util.List ids,
java.lang.String projectId)
For a given list of Activity IDs then create a Finish to Start constrain
with the next Activity, IF POSSIBLE.
|
static ilog.views.gantt.IlvConstraintType |
getConstraintType(Dependency dep) |
static java.util.List |
getDeletedDependencies(java.util.List oldDeps,
java.util.List newDeps)
Returns a list of dependencies for which the oldDeps has a dependency
relationship that is not in newDeps
|
static Dependency |
getDependenyTo(java.util.List deps,
java.lang.String to)
For the list of Dependencies, find the Dependency for the given "to"
|
static java.util.List |
getInsertedDependencies(java.util.List oldDeps,
java.util.List newDeps)
For the given list of dependencies, return a new list of ONLY the ones
that are newly added in newDeps
|
static java.util.List |
getModifiedDependencies(java.util.List oldDeps,
java.util.List newDeps)
Returns a list of dependencies where they share the same from,to, but the
type and/or lag has been modified.
|
static boolean |
isCycleDetected(MXGanttModel mxGanttModel,
ilog.views.gantt.IlvActivity fromActivity,
ilog.views.gantt.IlvActivity toActivityToCheck,
java.util.HashMap activityPathMap) |
static boolean |
isValid(MXActivity from,
MXActivity to,
MXGanttModel model,
UserInfo userInfo)
Determine if a Constraint is valid from the given 'from' activity to the
provided 'to' activity.
|
static boolean |
isValidParent(java.lang.String parent,
java.lang.String checkWonum,
UserInfo userInfo)
Check the parents based on the ID_PROPERTY.
|
static java.lang.Double |
parseLeadLagHrs(java.lang.String lag)
Given the lag string as "-12.5h" or "90m" convert it to a double Hours.
|
static boolean |
performCPMALL(MXGanttModel model,
BaseTreeGridMiniAppBean bean,
DataBean appBean) |
static boolean |
performCPMALL(Schedule model,
BaseLargeGanttView bean,
DataBean appBean) |
static IMXActivity[] |
performCPMSelected(MXGanttModel model,
BaseTreeGridMiniAppBean bean,
java.util.List activityIds,
DataBean appBean) |
static IMXActivity[] |
performCPMSelected(Schedule model,
BaseLargeGanttView bean,
java.util.List activityIds,
DataBean appBean) |
public static boolean acceptOrigin(MXActivity fromActivity, MXGanttModel mxGanttModel)
public static boolean acceptDestination(MXActivity fromActivity, MXActivity toActivity, MXGanttModel mxGanttModel, ilog.views.gantt.IlvConstraintType constraintType)
IlvPoint - , IlvGraphicpublic static boolean isCycleDetected(MXGanttModel mxGanttModel, ilog.views.gantt.IlvActivity fromActivity, ilog.views.gantt.IlvActivity toActivityToCheck, java.util.HashMap activityPathMap)
public static ilog.views.gantt.IlvConstraintType getConstraintType(Dependency dep)
public static Dependency getDependenyTo(java.util.List deps, java.lang.String to)
deps - to - public static java.util.List getDeletedDependencies(java.util.List oldDeps,
java.util.List newDeps)
oldDeps - newDeps - public static java.util.List getInsertedDependencies(java.util.List oldDeps,
java.util.List newDeps)
oldDeps - newDeps - public static java.util.List getModifiedDependencies(java.util.List oldDeps,
java.util.List newDeps)
oldDeps - newDeps - public static java.lang.Double parseLeadLagHrs(java.lang.String lag)
lag - public static boolean performCPMALL(MXGanttModel model, BaseTreeGridMiniAppBean bean, DataBean appBean) throws java.lang.Exception
java.lang.Exceptionpublic static boolean performCPMALL(Schedule model, BaseLargeGanttView bean, DataBean appBean) throws java.lang.Exception
java.lang.Exceptionpublic static IMXActivity[] performCPMSelected(MXGanttModel model, BaseTreeGridMiniAppBean bean, java.util.List activityIds, DataBean appBean) throws MXException, java.io.IOException
MXExceptionjava.io.IOExceptionpublic static IMXActivity[] performCPMSelected(Schedule model, BaseLargeGanttView bean, java.util.List activityIds, DataBean appBean) throws MXException, java.io.IOException
MXExceptionjava.io.IOExceptionpublic static void createLinkedConstraints(MXGanttModel model, BaseTreeGridMiniAppBean bean, java.util.List ids, java.lang.String projectId, SKDAppServiceBeanRemote serviceBean) throws java.rmi.RemoteException, MXException, java.io.IOException
model - bean - ids - projectId - serviceBean - MXExceptionjava.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionjava.rmi.RemoteExceptionpublic static void createLinkedConstraints(Schedule model, AbstractTreeGridMiniAppBean bean, java.util.List ids, java.lang.String projectId) throws MXException, java.io.IOException
model - bean - ids - projectId - MXExceptionjava.io.IOExceptionpublic static boolean isValid(MXActivity from, MXActivity to, MXGanttModel model, UserInfo userInfo) throws java.rmi.RemoteException, MXException
from - to - model - modelFuture - MXExceptionjava.rmi.RemoteExceptionpublic static boolean isValidParent(java.lang.String parent,
java.lang.String checkWonum,
UserInfo userInfo)
throws java.rmi.RemoteException,
MXException
parent - ID_PROPERTY, For recursively calls it will be the FROM
record's WONUMcheckWonum - ID_PROPERTY, For recursively calls it will be the TO record's
WONUMuserInfo - needed to check it from data (Where the consistency was
implemented for Scheduler plus)java.rmi.RemoteExceptionMXException