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<java.lang.String> 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<java.lang.String> 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<Dependency> |
getDeletedDependencies(java.util.List<Dependency> oldDeps,
java.util.List<Dependency> 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<Dependency> deps,
java.lang.String to)
For the list of Dependencies, find the Dependency for the given "to"
|
static java.util.List<Dependency> |
getInsertedDependencies(java.util.List<Dependency> oldDeps,
java.util.List<Dependency> 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<Dependency> |
getModifiedDependencies(java.util.List<Dependency> oldDeps,
java.util.List<Dependency> 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<java.lang.String,ilog.views.gantt.IlvActivity> 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<java.lang.String> activityIds,
DataBean appBean) |
static IMXActivity[] |
performCPMSelected(Schedule model,
BaseLargeGanttView bean,
java.util.List<java.lang.String> 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<java.lang.String,ilog.views.gantt.IlvActivity> activityPathMap)
public static ilog.views.gantt.IlvConstraintType getConstraintType(Dependency dep)
public static Dependency getDependenyTo(java.util.List<Dependency> deps, java.lang.String to)
deps
- to
- public static java.util.List<Dependency> getDeletedDependencies(java.util.List<Dependency> oldDeps, java.util.List<Dependency> newDeps)
oldDeps
- newDeps
- public static java.util.List<Dependency> getInsertedDependencies(java.util.List<Dependency> oldDeps, java.util.List<Dependency> newDeps)
oldDeps
- newDeps
- public static java.util.List<Dependency> getModifiedDependencies(java.util.List<Dependency> oldDeps, java.util.List<Dependency> 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.Exception
public static boolean performCPMALL(Schedule model, BaseLargeGanttView bean, DataBean appBean) throws java.lang.Exception
java.lang.Exception
public static IMXActivity[] performCPMSelected(MXGanttModel model, BaseTreeGridMiniAppBean bean, java.util.List<java.lang.String> activityIds, DataBean appBean) throws MXException, java.io.IOException
MXException
java.io.IOException
public static IMXActivity[] performCPMSelected(Schedule model, BaseLargeGanttView bean, java.util.List<java.lang.String> activityIds, DataBean appBean) throws MXException, java.io.IOException
MXException
java.io.IOException
public static void createLinkedConstraints(MXGanttModel model, BaseTreeGridMiniAppBean bean, java.util.List<java.lang.String> ids, java.lang.String projectId, SKDAppServiceBeanRemote serviceBean) throws java.rmi.RemoteException, MXException, java.io.IOException
model
- bean
- ids
- projectId
- serviceBean
- MXException
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
java.rmi.RemoteException
public static void createLinkedConstraints(Schedule model, AbstractTreeGridMiniAppBean bean, java.util.List<java.lang.String> ids, java.lang.String projectId) throws MXException, java.io.IOException
model
- bean
- ids
- projectId
- MXException
java.io.IOException
public static boolean isValid(MXActivity from, MXActivity to, MXGanttModel model, UserInfo userInfo) throws java.rmi.RemoteException, MXException
from
- to
- model
- modelFuture
- MXException
java.rmi.RemoteException
public 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.RemoteException
MXException