com.ibm.tivoli.maximo.skd.service

Class SKDAppService

    • Field Detail

      • OBJECTNAME_SKDACTIVITY

        public static final java.lang.String OBJECTNAME_SKDACTIVITY
        See Also:
        Constant Field Values
      • OBJECTNAME_SKDRESOURCE

        public static final java.lang.String OBJECTNAME_SKDRESOURCE
        See Also:
        Constant Field Values
      • OBJECTNAME_SKDRESERVATION

        public static final java.lang.String OBJECTNAME_SKDRESERVATION
        See Also:
        Constant Field Values
      • OBJECTNAME_SKDCONSTRAINT

        public static final java.lang.String OBJECTNAME_SKDCONSTRAINT
        See Also:
        Constant Field Values
      • SCHEDULER_SQLLOGGER

        public static final java.lang.String SCHEDULER_SQLLOGGER
        See Also:
        Constant Field Values
      • APPLINK_OBJECTNAME

        public static final java.lang.String APPLINK_OBJECTNAME
        See Also:
        Constant Field Values
      • TRAVEL_TIME_MATRIX_API_SUCCESS_TABLE_UPDATED

        public final int TRAVEL_TIME_MATRIX_API_SUCCESS_TABLE_UPDATED
        See Also:
        Constant Field Values
      • TRAVEL_TIME_MATRIX_API_NO_TABLE_UPDATE_NEEDED

        public final int TRAVEL_TIME_MATRIX_API_NO_TABLE_UPDATE_NEEDED
        See Also:
        Constant Field Values
      • TRAVEL_TIME_MATRIX_API_ERROR_NO_RECORDS_SAVED

        public final int TRAVEL_TIME_MATRIX_API_ERROR_NO_RECORDS_SAVED
        See Also:
        Constant Field Values
      • TRAVEL_TIME_MATRIX_API_ERROR_INVALID_ARGUMENTS

        public final int TRAVEL_TIME_MATRIX_API_ERROR_INVALID_ARGUMENTS
        See Also:
        Constant Field Values
      • TRAVEL_TIME_MATRIX_API_WARNING_SOME_RECORDS_NOT_SAVED

        public final int TRAVEL_TIME_MATRIX_API_WARNING_SOME_RECORDS_NOT_SAVED
        See Also:
        Constant Field Values
      • SKDACTIONINFOMAP_SEPARATOR

        public static final java.lang.String SKDACTIONINFOMAP_SEPARATOR
        Key separator "\u00ef\u00bf\u00bd"
        See Also:
        Constant Field Values
    • Constructor Detail

      • SKDAppService

        public SKDAppService(MXServer mxServer)
                      throws java.rmi.RemoteException
        Constructor for SKDAppService
        Parameters:
        mxServer -
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • destroy

        public void destroy()
        Description copied from interface: Service
        Release system resources. The object should release all system resources. This will be called only once and is called to prepare the object for finalization.
        Specified by:
        destroy in interface Service
        Overrides:
        destroy in class AppService
        See Also:
        Service
      • getSKDAppServiceBean

        public SKDAppServiceBeanRemote getSKDAppServiceBean(UserInfo userInfo)
                                                     throws MXException,
                                                            java.rmi.RemoteException
        Returns a new instance of the SKDAppServiceBean
        Specified by:
        getSKDAppServiceBean in interface SKDAppServiceRemote
        Parameters:
        userInfo - user information
        Returns:
        SKDAppServiceBeanRemote SKD App service bean remote reference, if the bean is successfully created, otherwise throws exception.
        Throws:
        MXException
        java.rmi.RemoteException
      • populateProjectData

        public void populateProjectData(UserInfo userInfo,
                                        java.lang.String projectId)
                                 throws MXException,
                                        java.rmi.RemoteException
        Populates skd tables with project information
        Specified by:
        populateProjectData in interface SKDAppServiceRemote
        Parameters:
        userInfo - user information
        project - unique id
        Throws:
        MXException
        java.rmi.RemoteException
      • refreshSelectedActivities

        public java.util.List refreshSelectedActivities(IMXGanttModel model,
                                                        UserInfo userInfo,
                                                        MboRemote projectMbo,
                                                        java.util.List selectedActivities,
                                                        boolean preserveSkdData)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Populates skd tables with project information
        Specified by:
        refreshSelectedActivities in interface SKDAppServiceRemote
        Parameters:
        userInfo - user information
        projectMbo - project mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getProjectKey

        protected java.lang.String getProjectKey(UserInfo info,
                                                 java.lang.String projectId)
      • runtTask

        public java.util.concurrent.Future runtTask(java.util.concurrent.Callable task)
        Run a task on the Scheduler Thread Pool, and return the result as a Future
        Parameters:
        task -
        Returns:
      • loadScheduleMax

        public java.util.concurrent.Future loadScheduleMax(java.lang.String projectId,
                                                           IProjectManagerCallback helper)
        Load a Scheduler Max project by it's Scheduler Project ID
        Parameters:
        projectId -
        helper -
        cache -
        Returns:
      • loadScheduleGWA

        public java.util.concurrent.Future loadScheduleGWA(java.lang.String projectId,
                                                           IProjectManagerCallback helper)
        Load a Scheduler Max project by it's Scheduler Project ID
        Parameters:
        projectId -
        helper -
        cache -
        Returns:
      • loadScheduleGR

        public java.util.concurrent.Future loadScheduleGR(java.lang.String projectId,
                                                          IProjectManagerCallback helper)
        Load a Scheduler Max project by it's Scheduler Project ID
        Parameters:
        projectId -
        helper -
        cache -
        Returns:
      • getFutureModel

        public java.util.concurrent.Future getFutureModel(UserInfo userInfo,
                                                          java.lang.String projectId)
      • getFutureModel

        public java.util.concurrent.Future getFutureModel(UserInfo userInfo,
                                                          java.lang.String projectId,
                                                          SKDAppServiceCache appCache)
      • removeFutureModel

        public void removeFutureModel(UserInfo info,
                                      java.lang.String projectId)
      • removeFutureModelIgnoreSessionID

        public void removeFutureModelIgnoreSessionID(UserInfo info,
                                                     java.lang.String projectId)
      • getProjectKeyIgnoreSessionId

        protected java.lang.String getProjectKeyIgnoreSessionId(java.util.Map cachedModels,
                                                                UserInfo info,
                                                                java.lang.String projectId)
      • removeCachedModel

        public void removeCachedModel(UserInfo info)
      • getModel

        public ilog.views.gantt.IlvGanttModel getModel(UserInfo userInfo,
                                                       java.lang.String projectId)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Get Gantt model for a project
        Specified by:
        getModel in interface SKDAppServiceRemote
        Parameters:
        userInfo - user information,project unique id
        project - id
        Returns:
        IlvGanttModel
        Throws:
        MXException
        java.rmi.RemoteException
      • getModel

        public ilog.views.gantt.IlvGanttModel getModel(UserInfo userInfo,
                                                       MboRemote project,
                                                       UserInfo createdByUserInfo,
                                                       boolean getModelForCreatedUser)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Get Gantt model for a project
        Parameters:
        userInfo - user information,project unique id
        project - id
        Returns:
        IlvGanttModel
        Throws:
        MXException
        java.rmi.RemoteException
      • getActivitiesModel

        public MXGanttModel getActivitiesModel(UserInfo userInfo,
                                               java.lang.String projectId)
                                        throws java.rmi.RemoteException,
                                               MXException,
                                               java.sql.SQLException
        Throws:
        java.rmi.RemoteException
        MXException
        java.sql.SQLException
      • getModel

        protected ilog.views.gantt.IlvGanttModel getModel(UserInfo userInfo,
                                                          MboRemote project,
                                                          UserInfo createdByUserInfo,
                                                          boolean getModelForCreatedUser,
                                                          SKDAppServiceCache appCache)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Get Gantt model for a project
        Parameters:
        userInfo - - User info
        project - - project mbo
        createdByUserInfo - - created by userinfo
        boolean - - is model data is for created by user
        Returns:
        IlvGanttModel
        Throws:
        MXException
        java.rmi.RemoteException
      • getModelForActivities

        protected ilog.views.gantt.IlvGanttModel getModelForActivities(UserInfo userInfo,
                                                                       MboRemote project,
                                                                       UserInfo createdByUserInfo,
                                                                       boolean getModelForCreatedUser)
                                                                throws MXException,
                                                                       java.rmi.RemoteException
        Load the activities.
        Parameters:
        userInfo -
        project -
        createdByUserInfo -
        getModelForCreatedUser -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • duplicateProjectData

        public void duplicateProjectData(UserInfo userInfo,
                                         java.lang.String orgProjectId,
                                         MboRemote duplicateProjectMbo)
                                  throws MXException,
                                         java.rmi.RemoteException
        Duplicates the project data i.e the same state as of now
        Specified by:
        duplicateProjectData in interface SKDAppServiceRemote
        Parameters:
        userInfo -
        projectId -
        duplicateProjectMbo - - Duplicated project Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • duplicateObjectData

        public void duplicateObjectData(UserInfo userInfo,
                                        java.lang.String orgProjectId,
                                        MboRemote duplicateProjectMbo)
                                 throws MXException,
                                        java.rmi.RemoteException
        Duplicate data related to the data source.
        Parameters:
        userInfo -
        orgProjectId -
        duplicateProjectMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • duplicateSKDAlternateAvail

        public void duplicateSKDAlternateAvail(UserInfo userInfo,
                                               java.lang.String originalProjectID,
                                               MboRemote duplicateProjectMbo)
                                        throws MXException,
                                               java.rmi.RemoteException
        Duplicates scheduler alternate availability info.
        Specified by:
        duplicateSKDAlternateAvail in interface SKDAppServiceRemote
        Parameters:
        userInfo -
        projectName -
        duplicateProjectId -
        Throws:
        MXException
        java.rmi.RemoteException
      • duplicateSKDData

        public void duplicateSKDData(UserInfo userInfo,
                                     java.lang.String orgProjectId,
                                     MboRemote duplicateProjectMbo)
                              throws MXException,
                                     java.rmi.RemoteException
        Duplicate scheduler intermediate tables.
        Parameters:
        userInfo -
        projectId -
        duplicateProjectId -
        Throws:
        MXException
        java.rmi.RemoteException
      • getNewMXGanttModelInstance

        protected MXGanttModel getNewMXGanttModelInstance()
        Returns a new instance of a MXGanttModel.
        Returns:
        MXGanttModel
      • identifyAndSaveAdditionalModifiedActivities

        protected void identifyAndSaveAdditionalModifiedActivities(UserInfo userInfo,
                                                                   MXGanttModel model,
                                                                   MboRemote project)
                                                            throws MXException,
                                                                   java.rmi.RemoteException
        Save modified properties for a project
        Parameters:
        userInfo -
        model -
        project -
        Throws:
        MXException
        java.rmi.RemoteException
      • copyMboValueInfo

        protected void copyMboValueInfo(UserInfo userInfo,
                                        java.lang.String objectName,
                                        java.lang.String attributeName,
                                        MXGanttPropertyInfo mxgInfo)
                                 throws MXException,
                                        java.rmi.RemoteException
        Get MboValueInfoStatic for an attribute.
        Parameters:
        userInfo -
        maximoDD -
        mlDD -
        objectName -
        attributeName -
        Throws:
        MXException
        java.rmi.RemoteException
      • getSKDDataGroupTitle

        public java.util.HashMap getSKDDataGroupTitle(UserInfo userInfo,
                                                      java.lang.String projectId,
                                                      java.lang.String skdObjectName)
                                               throws MXException,
                                                      java.rmi.RemoteException
        Returns the group name and title for skdobjectname.
        Parameters:
        userInfo -
        project - id
        skdObjectName -
        Returns:
        HashMap
        Throws:
        MXException
        java.rmi.RemoteException
      • populateSKDPropValue

        public void populateSKDPropValue(ilog.views.gantt.property.IlvUserPropertyHolder propValue,
                                         java.lang.String propertyName,
                                         int maxtype,
                                         MboRemote mbo,
                                         java.lang.String attributeName)
                                  throws MXException,
                                         java.rmi.RemoteException
        Populate property values
        Parameters:
        propValue -
        propertyName -
        maxtype -
        mbo -
        attributeName -
        Throws:
        MXException
        java.rmi.RemoteException
      • getNewMXActivityFactoryInstance

        public MXActivityFactory getNewMXActivityFactoryInstance()
        Returns a new factory class for creating objects of type MXActivity
        Returns:
      • saveInitializedActivityChanges

        protected void saveInitializedActivityChanges(UserInfo userInfo,
                                                      MboRemote project,
                                                      java.util.ArrayList modifiedActivities)
                                               throws MXException,
                                                      java.rmi.RemoteException
        Save the Activity changes to the database.
        Parameters:
        userInfo -
        project -
        ArrayList -
        Throws:
        MXException
        java.rmi.RemoteException
      • setProjectPropertiesToActivity

        protected void setProjectPropertiesToActivity(MXActivity activity,
                                                      MboRemote project)
                                               throws java.rmi.RemoteException,
                                                      MXException
        Set project properties to the activity
        Parameters:
        activity -
        project -
        Throws:
        java.rmi.RemoteException
        MXException
      • setAuthourizeApplinkAppList

        protected void setAuthourizeApplinkAppList(java.lang.Object obj,
                                                   UserInfo userInfo,
                                                   java.util.HashMap appDescMap,
                                                   java.util.HashMap authAppList)
                                            throws MXException
        Find the applications that are authorized from the list of applink apps, and set to the property.
        Parameters:
        obj -
        userInfo -
        appDescMap -
        Throws:
        MXException
      • identifyAdditionalModifiedActivities

        protected void identifyAdditionalModifiedActivities(MXGanttModel model,
                                                            MXActivity parentActivity,
                                                            java.util.ArrayList modifiedActivities)
        Identify additional activities that are modified
        Parameters:
        model -
        parentActivity -
        modifiedActivities -
      • removeUnauthorizedActivities

        protected void removeUnauthorizedActivities(MXGanttModel model,
                                                    MXActivity parentActivity)
        Remote unauthorized activities from model.
        Parameters:
        model -
        parentActivity -
      • removeDummyActivitiesIfNoChild

        protected void removeDummyActivitiesIfNoChild(MXGanttModel model,
                                                      MXActivity parentActivity)
      • removeChildDummyActivitiesIfNoChild

        protected void removeChildDummyActivitiesIfNoChild(MXGanttModel model)
        Remove all child dummy activities if there is no children
        Parameters:
        model -
      • populateActivityNode

        protected void populateActivityNode(java.util.HashMap unjoinedNodes,
                                            java.lang.Object rootObject,
                                            java.util.HashMap dataGroupActivityMap,
                                            MXGanttModel model)
        Populate activity nodes
        Parameters:
        unjoinedNodes -
        rootObject -
        model -
      • populateActivityNode

        protected void populateActivityNode(MXHierarchyNode node,
                                            java.lang.Object parentObject,
                                            MXGanttModel model)
        Populate activity nodes
        Parameters:
        node -
        parentObject -
        model -
      • addToUnjoinedNodes

        protected void addToUnjoinedNodes(java.util.HashMap unjoinedNodes,
                                          java.lang.String id,
                                          java.lang.String parentId,
                                          java.lang.Object nodeValue)
        Add activities to unjoin nodes
        Parameters:
        unjoinedNodes -
        id -
        parentId -
        nodeValue -
      • removeUnnecessaryNodes

        protected void removeUnnecessaryNodes(java.util.HashMap unjoinedNodes)
        Remove nodes that are not needed.
        Parameters:
        unjoinedNodes -
      • getNewMXResourceFactory

        protected MXResourceFactory getNewMXResourceFactory()
        Returns a new instance of a factory for creating objects of type MXResource
        Returns:
      • initializeResources

        protected java.util.ArrayList initializeResources(UserInfo userInfo,
                                                          MboRemote project,
                                                          SKDAppService.ResourceData resourceData)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Initialize resourcedata for a project.
        Parameters:
        userInfo -
        project -
        resourceData -
        Returns:
        ArrayList
        Throws:
        MXException
        java.rmi.RemoteException
      • saveInitializedResourceChanges

        protected void saveInitializedResourceChanges(UserInfo userInfo,
                                                      MboRemote project,
                                                      java.util.ArrayList modifiedResources)
                                               throws MXException,
                                                      java.rmi.RemoteException
        Save initialized resource data to database.
        Parameters:
        userInfo -
        project -
        modifiedResources -
        Throws:
        MXException
        java.rmi.RemoteException
      • removeUnauthorizedResources

        protected void removeUnauthorizedResources(MXGanttModel model,
                                                   MXResource parentResource)
        Remove unauthorized resources from model.
        Parameters:
        model -
        parentResource -
      • removeUnauthorizedReservations

        protected void removeUnauthorizedReservations(MXGanttModel model)
        Remove unauthorized reservations from model.
        Parameters:
        model -
      • scanConstraints

        protected void scanConstraints(UserInfo userInfo,
                                       MXGanttModel model,
                                       MboRemote project,
                                       com.ibm.tivoli.maximo.skd.service.SKDAppService.ConstraintData constraintData,
                                       java.util.HashMap appDescMap)
                                throws MXException,
                                       java.rmi.RemoteException
        Scan constraints for an user.
        Parameters:
        userInfo -
        model -
        project -
        constraintData -
        Throws:
        MXException
        java.rmi.RemoteException
      • removeUnauthorizedConstraints

        protected void removeUnauthorizedConstraints(MXGanttModel model)
        Remove unauthorized constraints from model.
        Parameters:
        model -
      • populateResourceNode

        protected void populateResourceNode(java.util.HashMap unjoinedNodes,
                                            java.lang.Object rootObject,
                                            java.util.HashMap dataGroupResourceMap,
                                            MboRemote project,
                                            MXGanttModel model)
                                     throws MXException,
                                            java.rmi.RemoteException
        Populate resource node
        Parameters:
        unjoinedNodes -
        rootObject -
        model -
        Throws:
        MXException
        java.rmi.RemoteException
      • populateResourceNode

        protected void populateResourceNode(MXHierarchyNode node,
                                            java.lang.Object parentObject,
                                            MXGanttModel model)
        Populate resource node.
        Parameters:
        node -
        parentObject -
        model -
      • populateCostResourceNode

        protected void populateCostResourceNode(java.util.HashMap unjoinedNodes,
                                                java.lang.Object rootObject,
                                                java.util.HashMap dataGroupResourceMap,
                                                MboRemote project,
                                                MXGanttModel model)
                                         throws MXException,
                                                java.rmi.RemoteException
        Populate cost resource node
        Parameters:
        unjoinedNodes -
        rootObject -
        model -
        Throws:
        MXException
        java.rmi.RemoteException
      • createReservationDataFromDB

        protected SKDAppService.ReservationData createReservationDataFromDB(UserInfo userInfo,
                                                                            MXGanttModel model,
                                                                            MboRemote project,
                                                                            java.util.HashMap activityMap,
                                                                            java.util.HashMap resourceMap)
                                                                     throws MXException,
                                                                            java.rmi.RemoteException
        Loads reservations from database for a project
        Parameters:
        userInfo -
        model -
        project -
        activityMap -
        resourceMap -
        Returns:
        ReservationData
        Throws:
        MXException
        java.rmi.RemoteException
      • getNewMXReservationFactoryInstance

        public MXReservationFactory getNewMXReservationFactoryInstance()
        Returns a new instance of a factory for creating objects of type MXReservation.
        Returns:
      • initializeReservations

        protected java.util.ArrayList initializeReservations(UserInfo userInfo,
                                                             MboRemote project,
                                                             SKDAppService.ReservationData reservationData)
                                                      throws MXException,
                                                             java.rmi.RemoteException
        Initializes reservation for a project.
        Parameters:
        userInfo -
        project -
        reservationData -
        Returns:
        ArrayList
        Throws:
        MXException
        java.rmi.RemoteException
      • saveInitializedReservationChanges

        public void saveInitializedReservationChanges(UserInfo userInfo,
                                                      MboRemote project,
                                                      java.util.ArrayList modifiedReservations)
                                               throws MXException,
                                                      java.rmi.RemoteException
        Save initialized reservations for a project.
        Parameters:
        userInfo -
        project -
        modifiedReservations -
        Throws:
        MXException
        java.rmi.RemoteException
      • createConstraintDataFromDB

        protected com.ibm.tivoli.maximo.skd.service.SKDAppService.ConstraintData createConstraintDataFromDB(UserInfo userInfo,
                                                                                                            MXGanttModel model,
                                                                                                            MboRemote project,
                                                                                                            java.util.HashMap activityMap)
                                                                                                     throws MXException,
                                                                                                            java.rmi.RemoteException
        Loads constraint from database for a project.
        Parameters:
        userInfo -
        model -
        project -
        activityMap -
        Returns:
        ConstraintData
        Throws:
        MXException
        java.rmi.RemoteException
      • getNewMXConstraintFactoryInstance

        protected MXConstraintFactory getNewMXConstraintFactoryInstance()
        Returns a new instance of a factory for creating objects of type MXConstraint.
        Returns:
      • initializeConstraints

        protected java.util.ArrayList initializeConstraints(UserInfo userInfo,
                                                            MboRemote project,
                                                            com.ibm.tivoli.maximo.skd.service.SKDAppService.ConstraintData constraintData)
                                                     throws MXException,
                                                            java.rmi.RemoteException
        Initialize constraints for a project.
        Parameters:
        userInfo -
        project -
        constraintData -
        Returns:
        ArrayList
        Throws:
        MXException
        java.rmi.RemoteException
      • saveInitializedConstraintChanges

        protected void saveInitializedConstraintChanges(UserInfo userInfo,
                                                        MboRemote project,
                                                        java.util.ArrayList modifiedConstraints)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Save initialized constraints for a project.
        Parameters:
        userInfo -
        project -
        modifiedConstraints -
        Throws:
        MXException
        java.rmi.RemoteException
      • loadConstraints

        protected com.ibm.tivoli.maximo.skd.service.SKDAppService.ConstraintData loadConstraints(UserInfo userInfo,
                                                                                                 MXGanttModel model,
                                                                                                 MboRemote project,
                                                                                                 SKDAppService.ActivityData activityData)
                                                                                          throws MXException,
                                                                                                 java.rmi.RemoteException
        Load constraints for a project to the model.
        Parameters:
        userInfo -
        model -
        project -
        activityData -
        Returns:
        ConstraintData
        Throws:
        MXException
        java.rmi.RemoteException
      • getAllQueryList

        protected java.util.HashMap getAllQueryList(MboSetRemote querySet)
                                             throws MXException,
                                                    java.rmi.RemoteException
        Get queries for an object
        Parameters:
        querySet -
        Returns:
        HashMap>
        Throws:
        MXException
        java.rmi.RemoteException
      • getQueryList

        protected java.util.ArrayList getQueryList(MboSetRemote querySet)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Get the list of queries for query set.
        Parameters:
        querySet -
        Returns:
        ArrayList
        Throws:
        MXException
        java.rmi.RemoteException
      • getDataManagerInstance

        protected java.lang.Object getDataManagerInstance(SKDObjectManagerInfo skdObject)
                                                   throws MXException
        Get the skd object class for a skd object
        Parameters:
        skdObject -
        Returns:
        skd object class
        Throws:
        MXException
      • createDataManagerContext

        protected DataManagerContext createDataManagerContext(UserInfo userInfo,
                                                              MboRemote project,
                                                              java.lang.String objectName)
                                                       throws MXException,
                                                              java.rmi.RemoteException
        Create Data Manager for a project
        Parameters:
        userInfo -
        projectId -
        objectName -
        Returns:
        DataManagerContext
        Throws:
        MXException
        java.rmi.RemoteException
      • getSqlLogger

        public MXLogger getSqlLogger()
        Get the logger
        Returns:
        MXLogger
      • getMapLogger

        public MXLogger getMapLogger()
      • notExistInProjActobjlist

        protected boolean notExistInProjActobjlist(UserInfo userInfo,
                                                   MboRemote projectMbo,
                                                   java.lang.String objName)
                                            throws MXException,
                                                   java.rmi.RemoteException
        object exist in project activity objectlist
        Parameters:
        userInfo -
        projectMbo -
        objName -
        Returns:
        true if notexist
        Throws:
        MXException
        java.rmi.RemoteException
      • notExistInProjResobjlist

        protected boolean notExistInProjResobjlist(UserInfo userInfo,
                                                   MboRemote projectMbo,
                                                   java.lang.String objName)
                                            throws MXException,
                                                   java.rmi.RemoteException
        object exist in project activity objectlist
        Parameters:
        userInfo -
        projectMbo -
        objName -
        Returns:
        true if notexist
        Throws:
        MXException
        java.rmi.RemoteException
      • notExistInProjRevobjlist

        protected boolean notExistInProjRevobjlist(UserInfo userInfo,
                                                   MboRemote projectMbo,
                                                   java.lang.String objName)
                                            throws MXException,
                                                   java.rmi.RemoteException
        object exist in project activity objectlist
        Parameters:
        userInfo -
        projectMbo -
        objName -
        Returns:
        true if notexist
        Throws:
        MXException
        java.rmi.RemoteException
      • populateActivities

        protected void populateActivities(UserInfo userInfo,
                                          MboRemote projectMbo,
                                          int populateInt)
                                   throws MXException,
                                          java.rmi.RemoteException
        Populate activities for a project.
        Parameters:
        userInfo -
        projectMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • populateActivityPropertyDetails

        protected void populateActivityPropertyDetails(UserInfo userInfo,
                                                       MboRemote projectMbo)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Populates activity properties for a project
        Parameters:
        userInfo -
        projectMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • cleanResourceUse

        protected void cleanResourceUse(UserInfo userInfo,
                                        MboRemote projectMbo)
                                 throws java.lang.Exception
        Clean up skdresourceuse table.
        Parameters:
        userInfo -
        projectMbo -
        Throws:
        java.lang.Exception
      • populateResourceUse

        public static void populateResourceUse(java.sql.Connection conn,
                                               UserInfo userInfo,
                                               java.lang.String projectId,
                                               MXLogger sqlLogger)
                                        throws java.lang.Exception
        Deprecated. Populate skdsourceuse table Don't call this method,use the new method populateResourceUse(Connection conn,UserInfo userInfo, String projectId,MXLogger sqlLogger,String refObjName) else resources will not be deleted properly.
        Parameters:
        conn -
        userInfo -
        projectId -
        sqlLogger -
        Throws:
        java.lang.Exception
      • populateResourceUse

        public static void populateResourceUse(java.sql.Connection conn,
                                               UserInfo userInfo,
                                               java.lang.String projectId,
                                               MXLogger sqlLogger,
                                               java.lang.String refObjName)
                                        throws java.lang.Exception
        Populate skdresourceuse for the specific reference object
        Parameters:
        conn -
        userInfo -
        projectId -
        sqlLogger -
        refObjName -
        Throws:
        java.lang.Exception
      • populateResources

        protected void populateResources(UserInfo userInfo,
                                         MboRemote projectMbo,
                                         int populateInt)
                                  throws MXException,
                                         java.rmi.RemoteException
        Populates resources for a project
        Parameters:
        userInfo -
        projectMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • populateResourcePropertyDetails

        protected void populateResourcePropertyDetails(UserInfo userInfo,
                                                       MboRemote projectMbo)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Populates resouce properties for a project
        Parameters:
        userInfo -
        projectMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • populateReservationPropertyDetails

        protected void populateReservationPropertyDetails(UserInfo userInfo,
                                                          MboRemote projectMbo)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Populates reservation properties for a project
        Parameters:
        userInfo -
        projectMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • populateConstraintPropertyDetails

        protected void populateConstraintPropertyDetails(UserInfo userInfo,
                                                         MboRemote projectMbo)
                                                  throws MXException,
                                                         java.rmi.RemoteException
        Populates constraint properties for a project
        Parameters:
        userInfo -
        projectMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • populateReservations

        protected void populateReservations(UserInfo userInfo,
                                            MboRemote projectMbo,
                                            int populateInt)
                                     throws MXException,
                                            java.rmi.RemoteException
        Populates reservations for a project
        Parameters:
        userInfo -
        projectMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • populateConstraints

        protected void populateConstraints(UserInfo userInfo,
                                           MboRemote projectMbo,
                                           int populateInt)
                                    throws MXException,
                                           java.rmi.RemoteException
        Populates constraints for a project
        Parameters:
        userInfo -
        projectMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • commitScenario

        public void commitScenario(UserInfo userInfo,
                                   java.lang.String ScenarioProjectid)
                            throws MXException,
                                   java.rmi.RemoteException
        qiuping-scheduler752 Applies the senario result to the real data.
        Specified by:
        commitScenario in interface SKDAppServiceRemote
        Parameters:
        userInfo -
        projectId -
        Throws:
        MXException
        java.rmi.RemoteException
      • commitScenario

        public void commitScenario(UserInfo userInfo,
                                   java.lang.String ScenarioProjectid,
                                   java.lang.String ids)
                            throws MXException,
                                   java.rmi.RemoteException
        qiuping-scheduler752 Applies the senario result to the real data.
        Specified by:
        commitScenario in interface SKDAppServiceRemote
        Parameters:
        userInfo -
        ids -
        projectId -
        Throws:
        MXException
        java.rmi.RemoteException
      • commitModifiedModelChanges

        public void commitModifiedModelChanges(UserInfo userInfo,
                                               java.lang.String projectId)
                                        throws MXException,
                                               java.rmi.RemoteException
        Applies the changes made to the model data to the real data.
        Specified by:
        commitModifiedModelChanges in interface SKDAppServiceRemote
        Parameters:
        userInfo -
        projectId -
        Throws:
        MXException
        java.rmi.RemoteException
      • commitModifiedModelChanges

        public void commitModifiedModelChanges(UserInfo userInfo,
                                               java.lang.String projectId,
                                               boolean commitConstraintsOnly)
                                        throws MXException,
                                               java.rmi.RemoteException
        Applies the changes made to the model data to the real data.
        Specified by:
        commitModifiedModelChanges in interface SKDAppServiceRemote
        Parameters:
        userInfo -
        projectId -
        commitConstraintsOnly - - Flag used to indicate that the commit action will only persist constraint changes.
        Throws:
        MXException
        java.rmi.RemoteException
      • commitModifiedModelChanges

        public void commitModifiedModelChanges(UserInfo userInfo,
                                               java.lang.String projectId,
                                               java.lang.String ids,
                                               java.lang.String objectName)
                                        throws MXException,
                                               java.rmi.RemoteException
        Applies the changes made to the model data to the real data.
        Specified by:
        commitModifiedModelChanges in interface SKDAppServiceRemote
        Parameters:
        userInfo -
        projectId -
        Throws:
        MXException
        java.rmi.RemoteException
      • commitModifiedModelChanges

        public void commitModifiedModelChanges(UserInfo userInfo,
                                               java.lang.String projectId,
                                               java.lang.String ids,
                                               java.lang.String objectName,
                                               boolean commitConstraintsOnly)
                                        throws MXException,
                                               java.rmi.RemoteException
        Applies the changes made to the model data to the real data.
        Specified by:
        commitModifiedModelChanges in interface SKDAppServiceRemote
        Parameters:
        userInfo -
        projectId -
        commitConstraintsOnly - - Flag used to indicate that the commit action will only persist constraint changes.
        Throws:
        MXException
        java.rmi.RemoteException
      • applyScenarioChanges

        protected void applyScenarioChanges(UserInfo userInfo,
                                            java.sql.Connection connection,
                                            MboRemote project,
                                            MboSetRemote activitySet,
                                            java.lang.String ids,
                                            MXTransaction txn)
                                     throws MXException,
                                            java.rmi.RemoteException
        qiuping-scheduler752 Apply scenario changes for the project
        Parameters:
        userInfo -
        connection -
        project -
        activitySet -
        txn -
        Throws:
        MXException
        java.rmi.RemoteException
      • applyActivityChanges

        protected void applyActivityChanges(UserInfo userInfo,
                                            java.sql.Connection connection,
                                            MboRemote project,
                                            MboSetRemote activitySet,
                                            MXTransaction txn)
                                     throws MXException,
                                            java.rmi.RemoteException
        Apply activity changes for the project
        Parameters:
        userInfo -
        connection -
        project -
        activitySet -
        txn -
        Throws:
        MXException
        java.rmi.RemoteException
      • applyActivityChanges

        protected void applyActivityChanges(UserInfo userInfo,
                                            java.sql.Connection connection,
                                            MboRemote project,
                                            MboSetRemote activitySet,
                                            java.lang.String ids,
                                            MXTransaction txn)
                                     throws MXException,
                                            java.rmi.RemoteException
        Apply activity changes for the project
        Parameters:
        userInfo -
        connection -
        project -
        activitySet -
        txn -
        Throws:
        MXException
        java.rmi.RemoteException
      • applyConstraintChanges

        protected void applyConstraintChanges(UserInfo userInfo,
                                              java.sql.Connection connection,
                                              MboRemote project,
                                              MboSetRemote constraintSett,
                                              MXTransaction txn)
                                       throws MXException,
                                              java.rmi.RemoteException
        Apply constraint changes for the project
        Parameters:
        userInfo -
        connection -
        project -
        constraintSett -
        txn -
        Throws:
        MXException
        java.rmi.RemoteException
      • applyConstraintChanges

        protected void applyConstraintChanges(UserInfo userInfo,
                                              java.sql.Connection connection,
                                              MboRemote project,
                                              MboSetRemote constraintSett,
                                              java.lang.String ids,
                                              MXTransaction txn)
                                       throws MXException,
                                              java.rmi.RemoteException
        Apply constraint changes for the project
        Parameters:
        userInfo -
        connection -
        project -
        constraintSett -
        txn -
        Throws:
        MXException
        java.rmi.RemoteException
      • loadSystemPropMap

        public java.util.HashMap loadSystemPropMap(UserInfo ui)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Load system properties need to be passed to applet
        Parameters:
        ui -
        Returns:
        HashMap
        Throws:
        MXException
        java.rmi.RemoteException
      • getPropertyTitle

        public java.util.HashMap getPropertyTitle(UserInfo userInfo,
                                                  java.lang.String skdObjectName)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Returns the Property name and title for skdobjectname.
        Parameters:
        userInfo -
        skdObjectName -
        Throws:
        MXException
        java.rmi.RemoteException
      • getActionTitle

        public java.util.HashMap getActionTitle(UserInfo userInfo,
                                                java.util.HashMap actionInfo,
                                                java.lang.String useWith)
                                         throws MXException,
                                                java.rmi.RemoteException
        Returns the Action title for an userinfo
        Parameters:
        userInfo -
        HashMap - HashMap>
        useWith - String appname
        Returns:
        HashMap> action info hashmap
        Throws:
        MXException
        java.rmi.RemoteException
      • getActionTitle

        public java.util.HashMap getActionTitle(UserInfo userInfo,
                                                java.util.HashMap actionInfo)
                                         throws MXException,
                                                java.rmi.RemoteException
        Returns the Action title for an userinfo
        Parameters:
        userInfo -
        HashMap - HashMap>
        Returns:
        HashMap> action info hashmap
        Throws:
        MXException
        java.rmi.RemoteException
      • getAuthAppDescMap

        public java.util.HashMap getAuthAppDescMap(UserInfo userInfo,
                                                   java.util.List appList,
                                                   java.util.HashMap appDescMap)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Get the authorized application and its description.
        Parameters:
        userInfo -
        appList -
        appDescMap -
        Returns:
        HashMap
        Throws:
        MXException
        java.rmi.RemoteException
      • getAppDescForApp

        public java.lang.String getAppDescForApp(java.lang.String appName,
                                                 UserInfo userInfo)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Return the description from maxapps table
        Parameters:
        appName -
        Returns:
        description
        Throws:
        java.lang.Exception
        MXException
        java.rmi.RemoteException
      • getOriginalAppForApp

        public java.lang.String getOriginalAppForApp(java.lang.String appName,
                                                     UserInfo userInfo)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Return the originalapp from maxapps table
        Parameters:
        appName -
        Returns:
        originalApp
        Throws:
        java.lang.Exception
        MXException
        java.rmi.RemoteException
      • getSKDUIInfo

        public ISKDUIInfo getSKDUIInfo(UserInfo userInfo)
                                throws MXException,
                                       java.rmi.RemoteException
        Returns ISKDUIInfo information. The ISKDUIInfo contains user locale data as well as the resource view information and anything related to the client.
        Specified by:
        getSKDUIInfo in interface SKDAppServiceRemote
        Returns:
        ISKDUIInfo
        Throws:
        MXException
        java.rmi.RemoteException
      • getSKDUIInfo

        public ISKDUIInfo getSKDUIInfo(UserInfo userInfo,
                                       java.lang.String appName)
                                throws MXException,
                                       java.rmi.RemoteException
        Returns ISKDUIInfo information. The ISKDUIInfo contains user locale data as well as the resource view information and anything related to the client.
        Specified by:
        getSKDUIInfo in interface SKDAppServiceRemote
        Returns:
        ISKDUIInfo
        Throws:
        MXException
        java.rmi.RemoteException
      • getSKDUIInfo

        public ISKDUIInfo getSKDUIInfo(UserInfo userInfo,
                                       java.lang.String appName,
                                       java.lang.String projectId)
                                throws MXException,
                                       java.rmi.RemoteException
        Returns ISKDUIInfo information. The ISKDUIInfo contains user locale data as well as the resource view information and anything related to the client.
        Specified by:
        getSKDUIInfo in interface SKDAppServiceRemote
        Returns:
        ISKDUIInfo
        Throws:
        MXException
        java.rmi.RemoteException
      • getSKDDataGroupInfo

        protected java.util.Set getSKDDataGroupInfo(UserInfo userInfo)
                                             throws MXException,
                                                    java.rmi.RemoteException
        Returns the Applet Extension Info configured.
        Parameters:
        userInfo -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getResourceViewInfoSet

        protected java.util.Set getResourceViewInfoSet(UserInfo userInfo,
                                                       java.lang.String appName)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getResourceViewInfoSet

        protected java.util.Set getResourceViewInfoSet(UserInfo userInfo)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Returns the Resource View Info list configured.
        Parameters:
        userInfo -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getResourceViewInfoSet

        protected java.util.Set getResourceViewInfoSet(UserInfo userInfo,
                                                       java.lang.String appName,
                                                       java.lang.String projectId)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • isWorkorderSchedule

        public boolean isWorkorderSchedule(UserInfo userInfo,
                                           java.lang.String skdProjectId)
                                    throws MXException,
                                           java.rmi.RemoteException
        Return true if it is workorder schedule.
        Parameters:
        userInfo -
        skdProjectId -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getAppletExtensionInfoSet

        protected java.util.Set getAppletExtensionInfoSet(UserInfo userInfo)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Returns the Applet Extension Info configured.
        Parameters:
        userInfo -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getDisplayDateTimePattern

        public java.lang.String getDisplayDateTimePattern(UserInfo userInfo)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Get the display datetime pattern for the user.
        Parameters:
        userInfo -
        Returns:
        display datetime pattern
        Throws:
        java.lang.Exception
        MXException
        java.rmi.RemoteException
      • getSKDMaxMessages

        public java.util.HashMap getSKDMaxMessages(UserInfo userInfo)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Get the messages for an user.
        Parameters:
        userInfo -
        Returns:
        hashmap
        Throws:
        MXException
        java.rmi.RemoteException
      • getWorkingHours

        public java.util.HashMap getWorkingHours(MboRemote project,
                                                 boolean trimByProject)
                                          throws SchedulerException,
                                                 java.rmi.RemoteException
        Read workperiod records and get working hours for a day for calendar and shift.
        Parameters:
        project -
        trimByProject - - Defines if SKDProject start and end dates should be used to filter the working hours
        Returns:
        Throws:
        SchedulerException
        java.rmi.RemoteException
      • getProjectDatesAdjustedForCalendar

        public DateRange getProjectDatesAdjustedForCalendar(MboRemote project,
                                                            DateRange calDates,
                                                            boolean trimByProject)
                                                     throws java.rmi.RemoteException,
                                                            MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • getWorkingHours

        public java.util.HashMap getWorkingHours(MboRemote project,
                                                 Range range)
                                          throws SchedulerException,
                                                 java.rmi.RemoteException
        Read workperiod records and get working hours for a day for calendar and shift.
        Parameters:
        project -
        trimByProject - - Defines if SKDProject start and end dates should be used to filter the working hours
        Returns:
        Throws:
        SchedulerException
        java.rmi.RemoteException
      • getCalendarMbo

        public MboRemote getCalendarMbo(MboRemote project)
                                 throws MXException,
                                        java.rmi.RemoteException
        Returns the calendar for a project
        Parameters:
        project -
        Returns:
        Calendar mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getDataGroupInfoSet

        public java.util.TreeSet getDataGroupInfoSet(UserInfo userInfo,
                                                     java.lang.String projectId,
                                                     java.lang.String skdObjectName)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Returns the data group info list for the given project.
        Parameters:
        userInfo -
        projectId -
        skdObjectName -
        Throws:
        MXException
        java.rmi.RemoteException
      • asyncCommitNeeded

        public boolean asyncCommitNeeded(MboRemote projectMbo)
                                  throws MXException,
                                         java.rmi.RemoteException
        Check if commit will be done by async or not.
        Specified by:
        asyncCommitNeeded in interface SKDAppServiceRemote
        Parameters:
        project - mbo return true if async commit else false
        Returns:
        true if asynchronous commit is needed else false
        Throws:
        MXException
        java.rmi.RemoteException
      • logDebugStatementForTime

        public static void logDebugStatementForTime(MXLogger sqlLogger,
                                                    UserInfo userInfo,
                                                    java.sql.Connection connection,
                                                    java.lang.String projectId,
                                                    long timeTaken,
                                                    java.lang.String query)
        Log the sql statement that takes more time than the timelimit
        Parameters:
        sqlLogger -
        userInfo -
        connection -
        projectId - - project id
        timeTaken - - time taken to execute the query
        query - - query string
      • logDebugStatementForInfo

        public static void logDebugStatementForInfo(MXLogger sqlLogger,
                                                    java.lang.String msgId,
                                                    java.lang.Object[] params)
        Log the debug information for sql operation.
        Parameters:
        sqlLogger -
        msgId - - message id
        params - - message parameter
      • performSkdAction

        public java.lang.Object performSkdAction(java.lang.String projectId,
                                                 UserInfo ui,
                                                 java.lang.String actionId,
                                                 java.lang.Object actionObject,
                                                 boolean saveBeforeAction,
                                                 SKDAppServiceBeanRemote serviceBean)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Perform action by calling action class
        Specified by:
        performSkdAction in interface SKDAppServiceRemote
        Parameters:
        projectId - - Project id
        - - userinfo
        actionid - - Unique id of action in skdaction
        actionObject - - object on which action will act
        saveBeforeAction - - flag to indicate if model need to be saved before action or not.
        Throws:
        MXException
        java.rmi.RemoteException
      • createSKDActionContext

        protected SKDDefaultActionContext createSKDActionContext(UserInfo userInfo,
                                                                 java.lang.String projectId,
                                                                 java.lang.String objectName,
                                                                 java.lang.String skdObjectName,
                                                                 java.lang.String actionName)
                                                          throws MXException,
                                                                 java.rmi.RemoteException
        Create skdaction context for a project
        Parameters:
        userInfo -
        projectId - - Project id
        objectName - - Name of the object for which action is defined
        skdObjectName - - Scheduler object name like SKDACTIVITY
        actionName - - Name of the action
        Returns:
        SKDDefaultActionContext
        Throws:
        MXException
        java.rmi.RemoteException
      • deleteSKDData

        public void deleteSKDData(UserInfo userInfo,
                                  MboRemote projectMbo)
                           throws MXException,
                                  java.rmi.RemoteException
        deleted Scheduler intermediate table data for the project
        Parameters:
        userInfo -
        projectMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • deleteObjectData

        public void deleteObjectData(UserInfo userInfo,
                                     MboRemote projectMbo)
                              throws MXException,
                                     java.rmi.RemoteException
        Delete data source related data for the project
        Parameters:
        userInfo -
        projectMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • getAsyncCount

        public int getAsyncCount(MboRemote projectMbo,
                                 MboSetRemote activitySet)
                          throws MXException,
                                 java.rmi.RemoteException
        Duplicate data related to the data source.
        Parameters:
        userInfo -
        orgProjectId -
        duplicateProjectMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • isEAMSchedulerLicensePresent

        public static boolean isEAMSchedulerLicensePresent()
                                                    throws MXException,
                                                           java.rmi.RemoteException
        Returns true, if the EAM scheduler license is present, otherwise false. NOTE: The Scheduler component is shared by EAM and CCMDB teams and the Scheduler is shipped with CCMDB for free, and we do not want EAM customer that purchases the CCMDB to get scheduler for free to use for EAM objects like WORKORDER and PM. So, we introduced a new license key, so that EAM customers can purchase the EAM specific Scheduler features.
        Returns:
        boolean true, if the EAM scheduler license is present, otherwise false.
        Throws:
        MXException
        java.rmi.RemoteException
      • isScheduler7510LicensePresent

        public static boolean isScheduler7510LicensePresent()
                                                     throws MXException,
                                                            java.rmi.RemoteException
        Returns true, if the Scheduler 7.5.1.0 license is present, otherwise false.
        Returns:
        boolean true, if the Scheduler 7.5.1.0 license is present, otherwise false.
        Throws:
        MXException
        java.rmi.RemoteException
      • isScheduler7520LicensePresent

        public static boolean isScheduler7520LicensePresent()
                                                     throws MXException,
                                                            java.rmi.RemoteException
        Returns true, if the Scheduler 7.5.2.0 license is present, otherwise false.
        Returns:
        boolean true, if the Scheduler 7.5.2.0 license is present, otherwise false.
        Throws:
        MXException
        java.rmi.RemoteException
      • isSchedulerAviationLicensePresent

        public static boolean isSchedulerAviationLicensePresent()
                                                         throws MXException,
                                                                java.rmi.RemoteException
        Returns true, if the Scheduler Aviation license is present, otherwise false.
        Returns:
        boolean true, if the Scheduler Aviation license is present, otherwise false.
        Throws:
        MXException
        java.rmi.RemoteException
      • isLicensePresent

        public static boolean isLicensePresent(java.lang.String lic)
                                        throws MXException,
                                               java.rmi.RemoteException
        returns true if the license is present
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getAvailabilities

        public ISKDAvailability getAvailabilities(UserInfo ui,
                                                  java.lang.String[] availParam)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Get availabilities data for a workorder or PM
        Specified by:
        getAvailabilities in interface SKDAppServiceRemote
        Parameters:
        userinfo -
        parameters - from UI
        Returns:
        ISKDAvailability
        Throws:
        MXException, - RemoteException
        MXException
        java.rmi.RemoteException
      • getParentActivity

        public MboRemote getParentActivity(MboRemote project,
                                           java.lang.String parentid)
                                    throws MXException,
                                           java.rmi.RemoteException
        qiuping 7520 get parent activity SKDACtivityMbo of activity
        Parameters:
        project -
        Throws:
        MXException
        java.rmi.RemoteException
      • getTaskSACodeList

        public java.util.HashMap getTaskSACodeList(MboRemote projectMbo)
                                            throws MXException,
                                                   java.rmi.RemoteException
        get Task SACode List for project
        Parameters:
        project -
        Returns:
        SACoseList and onTheFlyWOIDList
        Throws:
        MXException
        java.rmi.RemoteException
      • getResourceSACodeList

        public java.util.HashMap getResourceSACodeList(MboRemote projectMbo)
                                                throws MXException,
                                                       java.rmi.RemoteException
        get Resource SACode start and end List for project
        Parameters:
        project -
        Returns:
        resourceSACodeList
        Throws:
        MXException
        java.rmi.RemoteException
      • getCrewResourceSACodeList

        public java.util.HashMap getCrewResourceSACodeList(java.util.HashMap laborResourceSACodeList,
                                                           MboRemote projectMbo)
                                                    throws MXException,
                                                           java.rmi.RemoteException
        get Crew Resource SACode List for project
        Parameters:
        project -
        Returns:
        resourceSACodeList
        Throws:
        MXException
        java.rmi.RemoteException
      • updateTravelTimeMatrixFor

        public int updateTravelTimeMatrixFor(java.lang.String orgId,
                                             java.util.Map taskSACodeMap,
                                             java.util.Map onTheFlyWOIDMap,
                                             java.util.Map resourceStartSACodeMap,
                                             java.util.Map resourceEndSACodeMap,
                                             UserInfo userInfo)
                                      throws java.io.IOException,
                                             java.lang.Exception
        Description copied from interface: SKDAppServiceRemote
        API to update the SKDORIGINDESTMATRIX table with travel times retrieved from the map provider. The table is updated with all possible combinations of origins and destinations, but combinations where the origin is the same as the destination. Records for which an origin/destination pair already exists will not be updated, only new records can be added, and they are added if at least either the origin or the destination is new in the pair.
        Specified by:
        updateTravelTimeMatrixFor in interface SKDAppServiceRemote
        taskSACodeMap - service address codes and lat/lng points for tasks (used as both origins and destinations)
        onTheFlyWOIDMap - work order IDs and lat/lng points for "on the fly" work orders (used as both origins and destinations)
        resourceStartSACodeMap - service address codes and lat/lng points of resource start locations (used as origins only)
        resourceEndSACodeMap - service address codes and lat/lng points of resource end locations (used as destinations only)
        Returns:
        int 1 means that the table has been updated; 0 means that there was no need to update the table; -1 means map provider error; -2 means invalid inputs
        Throws:
        java.io.IOException
        MXException
        java.lang.Exception
      • secondsToDuration

        public static java.lang.Double secondsToDuration(long seconds)
      • dynamicScheduling

        public int dynamicScheduling(UserInfo userInfo,
                                     long skdprojectid,
                                     java.lang.String emQuery,
                                     boolean autoassign)
                              throws MXException,
                                     java.rmi.RemoteException
        dynamic scheduling for emergency work
        Specified by:
        dynamicScheduling in interface SKDAppServiceRemote
        Parameters:
        skdProjectId - skdproject unique id
        emWhere - skdproject unique id
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        com.ibm.tivoli.maximo.skd.service.SKDAppService#dynamicScheduling()
      • deleteSuggestResourceListtoEMWO

        public void deleteSuggestResourceListtoEMWO(long skdprojectid,
                                                    UserInfo userInfo,
                                                    java.lang.String assignmentids)
                                             throws MXException,
                                                    java.rmi.RemoteException
        delete suggest resource list for project before run dynamic scheduling
        Parameters:
        -
        Throws:
        MXException
        java.rmi.RemoteException
      • saveSuggestResourceListtoEMWO

        public void saveSuggestResourceListtoEMWO(java.util.List resoureSet,
                                                  MboRemote wo,
                                                  MboRemote reqtoassign,
                                                  java.util.HashMap woandtraveltime,
                                                  long skdprojectid,
                                                  UserInfo userInfo)
                                           throws MXException,
                                                  java.rmi.RemoteException
        save suggest resource list for assignment requirement
        Parameters:
        -
        Throws:
        MXException
        java.rmi.RemoteException
      • assignLaborCrewtoEMWO

        public void assignLaborCrewtoEMWO(MboRemote wo,
                                          MboRemote reqtoassign,
                                          java.lang.String assigncrew,
                                          java.lang.String assignlaborcode,
                                          java.util.Date currentTime)
                                   throws MXException,
                                          java.rmi.RemoteException
        Assign labor or crew to assignment requirement
        Parameters:
        -
        Throws:
        MXException
        java.rmi.RemoteException
      • autoAssignLaborCrewtoEMWO

        public boolean autoAssignLaborCrewtoEMWO(ResourceFinder resFinder,
                                                 java.util.List resources,
                                                 java.lang.String resourcetype,
                                                 MboRemote wo,
                                                 MboRemote req,
                                                 boolean assignedlist,
                                                 java.util.Date currentTime,
                                                 java.util.HashMap AssignedEMResource)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Auto Assign labor or crew to assignment requirement
        Parameters:
        -
        Throws:
        MXException
        java.rmi.RemoteException
      • assignLaborCrewFromSuggestSet

        public void assignLaborCrewFromSuggestSet(MboSetRemote emWOAvailResSet,
                                                  UserInfo userInfo,
                                                  java.util.Date currentTime)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Assign labor or crew from suggest set
        Specified by:
        assignLaborCrewFromSuggestSet in interface SKDAppServiceRemote
        Parameters:
        -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        com.ibm.tivoli.maximo.skd.service.SKDAppService#assignLaborCrewFromSuggestSet()
      • removeAssignedEMResource

        public java.util.List removeAssignedEMResource(java.util.List resoureSet,
                                                       java.lang.String resourcetype,
                                                       java.util.HashMap AssignedEMResource)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Auto Assign labor or crew to assignment requirement
        Parameters:
        -
        Throws:
        MXException
        java.rmi.RemoteException
      • getALLSKDViewerProperties

        public java.util.Properties getALLSKDViewerProperties()
                                                       throws java.io.IOException
        Returns ALL the properties, which includes those from skdviewer.properties, and those from the System Properties
        Returns:
        Throws:
        java.io.IOException
        java.rmi.RemoteException
      • getSKDViewerProperties

        public java.util.Properties getSKDViewerProperties()
                                                    throws java.rmi.RemoteException
        Returns the overridden properties for the Scheduler Applet from the MAXPROP cache
        Specified by:
        getSKDViewerProperties in interface SKDAppServiceRemote
        Returns:
        Throws:
        java.rmi.RemoteException
      • getSKDViewerPropertiesForPrefix

        protected java.util.Properties getSKDViewerPropertiesForPrefix(java.lang.String prefix,
                                                                       java.util.Properties mxProperties)
      • saveState

        public void saveState(SKDState lastSavedState)
                       throws java.rmi.RemoteException,
                              MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • loadTemplate

        public java.lang.String loadTemplate(java.lang.String templateName,
                                             MboRemote projectMbo,
                                             SKDTemplateResolver alternateResolver)
                                      throws java.rmi.RemoteException,
                                             MXException
        Loads the given template from the database, and optionally, upgrades the template in the database if the template is upgradeable and the digest values are different for the current and newly resolved template
        Specified by:
        loadTemplate in interface SKDAppServiceRemote
        Parameters:
        templateName - template name
        projectMbo - main scheduler project mbo
        alternateResolver - resolve to use when no template is found
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • getAssetMntOpMap

        public java.util.HashMap getAssetMntOpMap(MboRemote project,
                                                  java.util.Date startDate,
                                                  java.util.Date endDate,
                                                  java.lang.String objectName,
                                                  java.util.HashMap shiftCalMap)
                                           throws SchedulerException
        Get the Asset Maintenance and Operational Calendar.
        Parameters:
        project -
        startDate -
        endDate -
        objectName -
        shiftCalMap -
        Returns:
        Throws:
        SchedulerException
      • getAssetMntOpMapPM

        public java.util.HashMap getAssetMntOpMapPM(MboRemote project,
                                                    java.util.Date startDate,
                                                    java.util.Date endDate,
                                                    java.lang.String objectName,
                                                    java.util.HashMap shiftCalMap)
                                             throws SchedulerException
        Get the Asset Maintenance and Operational Calendar.
        Parameters:
        project -
        startDate -
        endDate -
        objectName -
        shiftCalMap -
        Returns:
        Throws:
        SchedulerException
      • getLocationMntOpMap

        public java.util.HashMap getLocationMntOpMap(MboRemote project,
                                                     java.util.Date startDate,
                                                     java.util.Date endDate,
                                                     java.lang.String objectName,
                                                     java.util.HashMap shiftCalMap)
                                              throws SchedulerException
        get location calendar map
        Parameters:
        project -
        startDate -
        endDate -
        objectName -
        shiftCalMap -
        Returns:
        Throws:
        SchedulerException
      • getLocationMntOpMapPM

        public java.util.HashMap getLocationMntOpMapPM(MboRemote project,
                                                       java.util.Date startDate,
                                                       java.util.Date endDate,
                                                       java.lang.String objectName,
                                                       java.util.HashMap shiftCalMap)
                                                throws SchedulerException
        get location calendar map
        Parameters:
        project -
        startDate -
        endDate -
        objectName -
        shiftCalMap -
        Returns:
        Throws:
        SchedulerException
      • getOverlappingMntOpSchedule

        public java.util.HashMap getOverlappingMntOpSchedule(java.util.HashMap assetLocMntCalMap,
                                                             java.util.HashMap assetLocOpCalMap)
        Get overlap schedule
      • clearState

        public void clearState(SKDState lastSavedState)
                        throws java.rmi.RemoteException,
                               MXException
        Clear all state for the given project and user of the passed in state
        Parameters:
        lastSavedState -
        Throws:
        java.rmi.RemoteException
        MXException
      • clearState

        public void clearState(java.lang.String skdProjectId,
                               UserInfo info)
                        throws java.rmi.RemoteException,
                               MXException
        Clear all state for the given project and user of the passed in state
        Parameters:
        lastSavedState -
        Throws:
        java.rmi.RemoteException
        MXException
      • commitMaxSchedule

        public void commitMaxSchedule(UserInfo userInfo,
                                      java.lang.String projectid,
                                      boolean commitConstraintsOnly)
                               throws MXException,
                                      java.rmi.RemoteException
        Commit modified Max schedule model changes to the database
        Specified by:
        commitMaxSchedule in interface SKDAppServiceRemote
        Parameters:
        userInfo -
        projectId -
        Throws:
        MXException
        java.rmi.RemoteException
      • commitMaxSchedule

        public void commitMaxSchedule(UserInfo userInfo,
                                      java.lang.String projectid,
                                      java.lang.String ids,
                                      boolean commitConstraintsOnly)
                               throws MXException,
                                      java.rmi.RemoteException
        Commit modified Max schedule model changes to the database
        Specified by:
        commitMaxSchedule in interface SKDAppServiceRemote
        Parameters:
        userInfo -
        projectId -
        ids -
        Throws:
        MXException
        java.rmi.RemoteException
      • reloadWorkOrders

        public java.util.Map reloadWorkOrders(java.lang.String projectID,
                                              UserInfo userInfo)
                                       throws java.rmi.RemoteException,
                                              MXException
        Refresh Project Work Orders.
        Specified by:
        reloadWorkOrders in interface SKDAppServiceRemote
        Parameters:
        projectID -
        userInfo -
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • clearPopulateDataObjectsWhere

        public void clearPopulateDataObjectsWhere()
                                           throws java.rmi.RemoteException,
                                                  MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • createKPIDataCache

        public java.util.HashMap createKPIDataCache(MboSetRemote skdScenRunKPISet,
                                                    MboRemote resource,
                                                    java.util.Date startDate,
                                                    java.util.Date endDate)
                                             throws java.rmi.RemoteException,
                                                    MXException
        Method to create a cache to store and serve data to the Scheduling Dashboard Resource Load data grid. This data will be be used to used to populate the non-persistent mbo SKDResourceViewDay which will serve as the data source for the data grid. The data used is based on the Optimization run created KPIs. The data fro the latest Optimization run for the schedule will be used. The data grid will have no data if Optimization has not been run for the schedule.
        Parameters:
        skdScenRunKPISet -
        resource -
        startDate -
        endDate -
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException