com.ibm.tivoli.maximo.skd.model

Class MXGanttModel

  • java.lang.Object
    • ilog.views.gantt.model.IlvAbstractGanttModel
      • ilog.views.gantt.model.IlvDefaultGanttModel
        • com.ibm.tivoli.maximo.skd.model.MXGanttModel
  • All Implemented Interfaces:
    IMXGanttModel, ilog.views.gantt.IlvGanttModel, java.io.Serializable


    public class MXGanttModel
    extends ilog.views.gantt.model.IlvDefaultGanttModel
    implements java.io.Serializable, IMXGanttModel
    See Also:
    Serialized Form
    • Constructor Detail

      • MXGanttModel

        public MXGanttModel()
    • Method Detail

      • getUserData

        public java.lang.Object getUserData(java.lang.String key)
        Returns a piece of in-memory stored user data for this model. Never use primatives, since this method will cast to the type, and the value is null, then null pointer will the thrown. User Data is will not be serialized when the model is serialized, so you an store non-serializable objects if needed.
        Specified by:
        getUserData in interface IMXGanttModel
        Parameters:
        key -
        Returns:
        Throws:
        java.lang.NullPointerException - if data is null, and return type is a java primative
      • setUserData

        public void setUserData(java.lang.String key,
                                java.lang.Object data)
        Sets a piece of user data in the model. User data is not serialized with the model.
        Specified by:
        setUserData in interface IMXGanttModel
        Parameters:
        key -
        data -
      • setGanttConfigInfo

        public void setGanttConfigInfo(IGanttConfigInfo ganttConfigInfo)
        Set the Gannt config info for the model
        Parameters:
        ganttConfigInfo -
      • setWorkHourList

        public void setWorkHourList(java.util.HashMap skdCals)
        Set calendar and work hour information.
        Specified by:
        setWorkHourList in interface IMXGanttModel
        Parameters:
        Hashmap - skdCals
      • setSkdActionInfo

        public void setSkdActionInfo(java.util.HashMap info)
        Set action information
        Parameters:
        HashMap - HashMap> info
      • getSkdActionInfo

        public java.util.HashMap getSkdActionInfo()
        Get action information
        Specified by:
        getSkdActionInfo in interface IMXGanttModel
        Returns:
        HashMap>
      • getSkdActionInfo

        public java.util.HashMap getSkdActionInfo(java.lang.String useWith)
        Get action information
        Returns:
        HashMap>
      • setSkdActionUidInfo

        public void setSkdActionUidInfo(java.util.HashMap info)
        Set action information with key as action unique id
        Parameters:
        HashMap - info
      • getSkdActionUidInfo

        public java.util.HashMap getSkdActionUidInfo()
        // * Get action information with key as action unique id
        Returns:
        HashMap
      • getWorkHourList

        public java.util.HashMap getWorkHourList()
        Get calendar information
        Specified by:
        getWorkHourList in interface IMXGanttModel
        Returns:
        HashMap
      • setProjectStartDate

        public void setProjectStartDate(java.util.Date start)
        Set project start date
        Parameters:
        start - date
      • getProjectStartDate

        public java.util.Date getProjectStartDate()
        Get project start date
        Returns:
        start date
      • setMergedNonWorkPeriod

        public void setMergedNonWorkPeriod(java.util.ArrayList mergedWorkPeriods)
        Set non work period after merging all shifts
        Specified by:
        setMergedNonWorkPeriod in interface IMXGanttModel
        Parameters:
        ArrayList - mergedWorkPeriods
      • getMergedNonWorkPeriod

        public java.util.ArrayList getMergedNonWorkPeriod()
        Get non work period after merging all shifts
        Specified by:
        getMergedNonWorkPeriod in interface IMXGanttModel
        Returns:
        ArrayList
      • setMergedWorkPeriod

        public void setMergedWorkPeriod(java.util.ArrayList mergedWorkPeriods)
        Set work period after merging all shifts
        Specified by:
        setMergedWorkPeriod in interface IMXGanttModel
        Parameters:
        ArrayList - mergedWorkPeriods
      • getMergedWorkPeriods

        public java.util.ArrayList getMergedWorkPeriods()
        Get work period after merging all shifts
        Specified by:
        getMergedWorkPeriods in interface IMXGanttModel
        Returns:
        ArrayList
      • setSortedActivityChildren

        public void setSortedActivityChildren(java.util.Map sortedActivityChildren)
        Set sorted activity children
        Parameters:
        Map - List> sortedActivityChildren
      • getSortedActivityChildren

        public java.util.Map getSortedActivityChildren()
        Get sorted activity children
        Returns:
        Map>
      • setSortedResourceChildren

        public void setSortedResourceChildren(java.util.Map sortedResourceChildren)
        Set sorted resource children
        Parameters:
        Map - List> sortedResourceChildren
      • getSortedResourceChildren

        public java.util.Map getSortedResourceChildren()
        Get sorted resource children
        Returns:
        Map>
      • getParentActivityIndex

        public int getParentActivityIndex(ilog.views.gantt.IlvActivity activity)
        Returns the index of the specified activity within its parent activity. If the activity is the root activity of the data model, -1 is returned.
        Specified by:
        getParentActivityIndex in interface ilog.views.gantt.IlvGanttModel
        Overrides:
        getParentActivityIndex in class ilog.views.gantt.model.IlvDefaultGanttModel
        Parameters:
        activity - The activity.
        Returns:
        The index of the activity within its parent.
      • getChildActivity

        public ilog.views.gantt.IlvActivity getChildActivity(ilog.views.gantt.IlvActivity parent,
                                                             int index)
        Returns the child of the specified parent activity at index index.
        Specified by:
        getChildActivity in interface ilog.views.gantt.IlvGanttModel
        Overrides:
        getChildActivity in class ilog.views.gantt.model.IlvDefaultGanttModel
        Parameters:
        parent - The parent activity.
        index - The child index.
        Returns:
        The child activity at index index.
      • getChildActivityIndex

        public int getChildActivityIndex(ilog.views.gantt.IlvActivity parent,
                                         ilog.views.gantt.IlvActivity child)
        Returns the index of the specified child in the parent activity's list of children.
        Specified by:
        getChildActivityIndex in interface ilog.views.gantt.IlvGanttModel
        Overrides:
        getChildActivityIndex in class ilog.views.gantt.model.IlvDefaultGanttModel
        Parameters:
        parent - The parent activity.
        child - The child activity to find the index of.
        Returns:
        The index of the child activity, or -1 if the activity is not a child of parent.
      • childActivityIterator

        public java.util.Iterator childActivityIterator(ilog.views.gantt.IlvActivity parent)
        Get iterator of sorted child activities
        Specified by:
        childActivityIterator in interface ilog.views.gantt.IlvGanttModel
        Overrides:
        childActivityIterator in class ilog.views.gantt.model.IlvDefaultGanttModel
        Parameters:
        parent - IlvActivity
      • getChildIndex

        public int getChildIndex(ilog.views.gantt.IlvHierarchyNode parent,
                                 ilog.views.gantt.IlvHierarchyNode child)
        Get index of sorted child activity
        Specified by:
        getChildIndex in interface ilog.views.gantt.IlvGanttModel
        Overrides:
        getChildIndex in class ilog.views.gantt.model.IlvAbstractGanttModel
        Parameters:
        parent - IlvHierarchyNode
        Returns:
        index
      • getParentResourceIndex

        public int getParentResourceIndex(ilog.views.gantt.IlvResource resource)
        Returns the index of the specified resource within its parent resource. If the resource is the root resource of the data model, -1 is returned.
        Specified by:
        getParentResourceIndex in interface ilog.views.gantt.IlvGanttModel
        Overrides:
        getParentResourceIndex in class ilog.views.gantt.model.IlvDefaultGanttModel
        Parameters:
        resource - The resource.
        Returns:
        The index of the resource within its parent.
      • getChildResource

        public ilog.views.gantt.IlvResource getChildResource(ilog.views.gantt.IlvResource parent,
                                                             int index)
        Returns the child of the specified parent resource at index index.
        Specified by:
        getChildResource in interface ilog.views.gantt.IlvGanttModel
        Overrides:
        getChildResource in class ilog.views.gantt.model.IlvDefaultGanttModel
        Parameters:
        parent - The parent resource.
        index - The child index.
        Returns:
        The child activity at index index.
      • getChildResourceIndex

        public int getChildResourceIndex(ilog.views.gantt.IlvResource parent,
                                         ilog.views.gantt.IlvResource child)
        Returns the index of the specified child in the parent resource's list of children.
        Specified by:
        getChildResourceIndex in interface ilog.views.gantt.IlvGanttModel
        Overrides:
        getChildResourceIndex in class ilog.views.gantt.model.IlvDefaultGanttModel
        Parameters:
        parent - The parent resource.
        child - The child resource to find the index of.
        Returns:
        The index of the child resource, or -1 if the activity is not a child of parent.
      • childResourceIterator

        public java.util.Iterator childResourceIterator(ilog.views.gantt.IlvResource parent)
        Get iterator of child resources for a parent
        Specified by:
        childResourceIterator in interface ilog.views.gantt.IlvGanttModel
        Overrides:
        childResourceIterator in class ilog.views.gantt.model.IlvDefaultGanttModel
        Parameters:
        parent - IlvResource
        Returns:
        Iterator
      • setActivityApplinkList

        public void setActivityApplinkList(java.lang.String className,
                                           java.util.HashMap list)
        Set activity applink list.
        Parameters:
        className -
        list -
      • getActivityApplinkList

        public java.util.HashMap getActivityApplinkList(java.lang.String className)
        Get activity applink list for a class name
        Parameters:
        className -
        Returns:
        HashMap>
      • getProjectEndDate

        public java.util.Date getProjectEndDate()
      • setProjectEndDate

        public void setProjectEndDate(java.util.Date endDate)
      • isProjectReadOnly

        public boolean isProjectReadOnly()
      • setProjectReadOnly

        public void setProjectReadOnly(boolean projectReadOnly)
      • getAssetLocOverlapMap

        public java.util.HashMap getAssetLocOverlapMap()
      • setAssetLocNonWorkHourList

        public void setAssetLocNonWorkHourList(java.util.HashMap skdAssetLocNonWorkHourCals)
        Set calendar and non work hour information.
        Specified by:
        setAssetLocNonWorkHourList in interface IMXGanttModel
        Parameters:
        Hashmap - skdCals
      • getAssetLocNonWorkHourList

        public java.util.HashMap getAssetLocNonWorkHourList()
        Get calendar information
        Returns:
        HashMap
      • setAssetLocWorkHourList

        public void setAssetLocWorkHourList(java.util.HashMap skdAssetLocWorkHourCals)
        Set calendar and non work hour information.
        Specified by:
        setAssetLocWorkHourList in interface IMXGanttModel
        Parameters:
        Hashmap - skdCals
      • getAssetLocWorkHourList

        public java.util.HashMap getAssetLocWorkHourList()
        Get calendar information
        Returns:
        HashMap
      • setProjectType

        public void setProjectType(java.lang.String projectType)
        set project type
        Specified by:
        setProjectType in interface IMXGanttModel
        Parameters:
        projectType -
      • getProjectType

        public java.lang.String getProjectType()
        get project type
        Returns:
      • setShowMaintOperFlag

        public void setShowMaintOperFlag(boolean showMaintOper)
        set showMaintOper flag
        Specified by:
        setShowMaintOperFlag in interface IMXGanttModel
        Parameters:
        projectType -
      • getShowMaintOperFlag

        public boolean getShowMaintOperFlag()
        get showMaintOper flag
        Returns:
      • setProjectId

        public void setProjectId(java.lang.String projectId)
      • setProjectName

        public void setProjectName(java.lang.String projectName)
      • setProjectDescription

        public void setProjectDescription(java.lang.String projectDescription)
      • getUseWith

        public java.lang.String getUseWith()
      • setScenarioName

        public void setScenarioName(java.lang.String scenarioName)
      • isDefaultScenario

        public boolean isDefaultScenario()
      • setDefaultScenario

        public void setDefaultScenario(boolean isDefaultScenario)
      • setLocalizedScenarioFieldTitle

        public void setLocalizedScenarioFieldTitle(java.lang.String localizedScenarioFieldTitle)
      • setUseWith

        public void setUseWith(java.lang.String useWith)
        Specified by:
        setUseWith in interface IMXGanttModel
      • setAllowPastLoad

        public void setAllowPastLoad(boolean allowPastLoad)
      • setAlternateAvail

        public void setAlternateAvail(boolean useAlternateAvail)
      • setResourceDisplay

        public void setResourceDisplay(java.lang.String resourceDisplay)
      • setWeekday

        public void setWeekday(java.lang.String weekday)
      • setProperties

        public void setProperties(java.util.Properties viewerProperties)
      • getProperties

        public java.util.Properties getProperties()
      • setUserTimezone

        public void setUserTimezone(java.util.TimeZone timeZone)
      • setUserLocale

        public void setUserLocale(java.util.Locale locale)
      • getActualStartEnd

        public Range getActualStartEnd()
        Get the "actual" start/end of the project based simply looking at the project work. This should include when the real work starts and ends for the project.
        Specified by:
        getActualStartEnd in interface IMXGanttModel
        Parameters:
        model -
        Returns:
      • getProjectStartEnd

        public Range getProjectStartEnd()
        Description copied from interface: IMXGanttModel
        Return the Project's Start/End from SKDPROJECT. These are the absolute values as defined by the project. It will not include padding, etc.
        Specified by:
        getProjectStartEnd in interface IMXGanttModel
        Returns:
      • getLoadDateTime

        public java.util.Date getLoadDateTime()
      • setLoadDateTime

        public void setLoadDateTime(java.util.Date loadDateTime)
      • getCalendarStartEnd

        public DateRange getCalendarStartEnd()
        Description copied from interface: IMXGanttModel
        Returns the configured Calendar Start End dates. We not use the full calendar, but this is amount of known calendar that we have.
        Specified by:
        getCalendarStartEnd in interface IMXGanttModel
        Returns:
      • getCalculatedProjectMinMax

        public DateRange getCalculatedProjectMinMax()
        Description copied from interface: IMXGanttModel
        This is a calculated project min max. It will include at least the union of Actual start/end and project start/end, and will usually include a 2 week calendar padding on each end, IF we have calendar data.
        Specified by:
        getCalculatedProjectMinMax in interface IMXGanttModel
        Returns:
      • getDisplayRowCount

        public int getDisplayRowCount()
        Description copied from interface: IMXGanttModel
        Returns the rows in the Schedule are being displayed. In the case of server side filtered models, this value would changed to reflect the rows in the schedule.
        Specified by:
        getDisplayRowCount in interface IMXGanttModel
        Returns:
      • isPagingModel

        public boolean isPagingModel()
        Description copied from interface: IMXGanttModel
        Return true if the model is a paging model
        Specified by:
        isPagingModel in interface IMXGanttModel
        Returns:
      • getPages

        public int getPages()
        Description copied from interface: IMXGanttModel
        if a Paging Model, then return the number of pages, otherwise, return 1.
        Specified by:
        getPages in interface IMXGanttModel
        Returns:
      • getPageSize

        public int getPageSize()
        Description copied from interface: IMXGanttModel
        if a Paging Model, then return the number of rows in a page, other wise return total rows in the schedule
        Specified by:
        getPageSize in interface IMXGanttModel
        Returns:
      • setRestrictWorkToDates

        public void setRestrictWorkToDates(boolean isRestrictWorkToDates)
      • isRestrictWorkToDates

        public boolean isRestrictWorkToDates()
      • setEnabledRelatedAttributes

        public void setEnabledRelatedAttributes(boolean isEnabledRelatedAttributes)
      • isEnabledRelatedAttributes

        public boolean isEnabledRelatedAttributes()