⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmstaskservice.java

📁 cms是开源的框架
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    /**
     * Reads all given tasks from a user for a project.<p>
     *
     * The <code>tasktype</code> parameter will filter the tasks.
     * The possible values for this parameter are:<br>
     * <ul>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_ALL}</code>: Reads all tasks</il>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_OPEN}</code>: Reads all open tasks</il>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_DONE}</code>: Reads all finished tasks</il>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_NEW}</code>: Reads all new tasks</il>
     * </ul>
     *
     * @param projectId the id of the project in which the tasks are defined
     * @param ownerName the owner of the task
     * @param taskType the type of task you want to read
     * @param orderBy specifies how to order the tasks
     * @param sort sorting of the tasks
     * 
     * @return a list of given <code>{@link CmsTask}</code> objects for a user for a project
     * 
     * @throws CmsException if operation was not successful
     */
    public List readGivenTasks(int projectId, String ownerName, int taskType, String orderBy, String sort)
    throws CmsException {

        return m_securityManager.readGivenTasks(m_context, projectId, ownerName, taskType, orderBy, sort);
    }

    /**
     * Reads the group (role) of a task.<p>
     *
     * @param task the task to read the group (role) from
     * 
     * @return the group (role) of the task
     * 
     * @throws CmsException if something goes wrong
     */
    public CmsGroup readGroup(CmsTask task) throws CmsException {

        return m_securityManager.readGroup(m_context, task);
    }

    /**
     * Reads the original agent of a task.<p>
     *
     * @param task the task to read the original agent from
     * 
     * @return the original agent of the task
     * 
     * @throws CmsException if something goes wrong
     */
    public CmsUser readOriginalAgent(CmsTask task) throws CmsException {

        return m_securityManager.readOriginalAgent(m_context, task);
    }

    /**
     * Reads the owner (initiator) of a task.<p>
     *
     * @param task the task to read the owner from
     * 
     * @return the owner of the task
     * 
     * @throws CmsException if something goes wrong
     */
    public CmsUser readOwner(CmsTask task) throws CmsException {

        return m_securityManager.readOwner(m_context, task);
    }

    /**
     * Reads the owner of a task log.<p>
     *
     * @param log the task log
     * 
     * @return the owner of the task log
     * 
     * @throws CmsException if something goes wrong
     */
    public CmsUser readOwner(CmsTaskLog log) throws CmsException {

        return m_securityManager.readOwner(m_context, log);
    }

    /**
     * Reads a project of a given task.<p>
     *
     * @param task the task for which the project will be read
     * 
     * @return the project of the task
     * 
     * @throws CmsException if operation was not successful
     */
    public CmsProject readProject(CmsTask task) throws CmsException {

        return m_securityManager.readProject(m_context, task);
    }

    /**
     * Reads all task log entries for a project.
     *
     * @param projectId the id of the project for which the tasklog will be read
     * 
     * @return a list of <code>{@link CmsTaskLog}</code> objects
     * 
     * @throws CmsException if operation was not successful
     */
    public List readProjectLogs(int projectId) throws CmsException {

        return m_securityManager.readProjectLogs(m_context, projectId);
    }

    /**
     * Reads the task with the given id.<p>
     *
     * @param id the id of the task to be read
     * 
     * @return the task with the given id
     *
     * @throws CmsException if operation was not successful
     */
    public CmsTask readTask(int id) throws CmsException {

        return m_securityManager.readTask(m_context, id);
    }

    /**
     * Reads log entries for a task.<p>
     *
     * @param taskid the task for which the tasklog will be read
     * 
     * @return a list of <code>{@link CmsTaskLog}</code> objects
     * 
     * @throws CmsException if operation was not successful
     */
    public List readTaskLogs(int taskid) throws CmsException {

        return m_securityManager.readTaskLogs(m_context, taskid);
    }

    /**
     * Reads all tasks for a project.<p>
     *
     * The <code>tasktype</code> parameter will filter the tasks.
     * The possible values are:<br>
     * <ul>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_ALL}</code>: Reads all tasks</il>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_OPEN}</code>: Reads all open tasks</il>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_DONE}</code>: Reads all finished tasks</il>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_NEW}</code>: Reads all new tasks</il>
     * </ul><p>
     *
     * @param projectId the id of the project in which the tasks are defined. Can be null to select all tasks
     * @param tasktype the type of task you want to read
     * @param orderBy specifies how to order the tasks
     * @param sort sort order: C_SORT_ASC, C_SORT_DESC, or null
     * 
     * @return a list of <code>{@link CmsTask}</code> objects for the project
     * 
     * @throws CmsException if operation was not successful
     */
    public List readTasksForProject(int projectId, int tasktype, String orderBy, String sort) throws CmsException {

        return (m_securityManager.readTasksForProject(m_context, projectId, tasktype, orderBy, sort));
    }

    /**
     * Reads all tasks for a role in a project.<p>
     *
     * The <code>tasktype</code> parameter will filter the tasks.
     * The possible values for this parameter are:<br>
     * <ul>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_ALL}</code>: Reads all tasks</il>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_OPEN}</code>: Reads all open tasks</il>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_DONE}</code>: Reads all finished tasks</il>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_NEW}</code>: Reads all new tasks</il>
     * </ul><p>
     *
     * @param projectId the id of the Project in which the tasks are defined
     * @param roleName the role who has to process the task
     * @param tasktype the type of task you want to read
     * @param orderBy specifies how to order the tasks
     * @param sort sort order C_SORT_ASC, C_SORT_DESC, or null
     * 
     * @return list of <code>{@link CmsTask}</code> objects for the role
     * 
     * @throws CmsException if operation was not successful
     */
    public List readTasksForRole(int projectId, String roleName, int tasktype, String orderBy, String sort)
    throws CmsException {

        return m_securityManager.readTasksForRole(m_context, projectId, roleName, tasktype, orderBy, sort);
    }

    /**
     * Reads all tasks for a user in a project.<p>
     *
     * The <code>tasktype</code> parameter will filter the tasks.
     * The possible values for this parameter are:<br>
     * <ul>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_ALL}</code>: Reads all tasks</il>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_OPEN}</code>: Reads all open tasks</il>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_DONE}</code>: Reads all finished tasks</il>
     * <il><code>{@link org.opencms.workflow.CmsTaskService#TASKS_NEW}</code>: Reads all new tasks</il>
     * </ul>
     *
     * @param projectId the id of the Project in which the tasks are defined
     * @param userName the user who has to process the task
     * @param tasktype the type of task you want to read
     * @param orderBy specifies how to order the tasks
     * @param sort sort order C_SORT_ASC, C_SORT_DESC, or null
     * 
     * @return a list of <code>{@link CmsTask}</code> objects for the user 
     * 
     * @throws CmsException if operation was not successful
     */
    public List readTasksForUser(int projectId, String userName, int tasktype, String orderBy, String sort)
    throws CmsException {

        return m_securityManager.readTasksForUser(m_context, projectId, userName, tasktype, orderBy, sort);
    }

    /**
     * Sets a new name for a task.<p>
     *
     * @param taskId the id of the task
     * @param name the new name of the task
     * 
     * @throws CmsException if something goes wrong
     */
    public void setName(int taskId, String name) throws CmsException {

        m_securityManager.setName(m_context, taskId, name);
    }

    /**
     * Sets the priority of a task.<p>
     *
     * @param taskId the id of the task
     * @param priority the new priority value
     * 
     * @throws CmsException if something goes wrong
     */
    public void setPriority(int taskId, int priority) throws CmsException {

        m_securityManager.setPriority(m_context, taskId, priority);
    }

    /**
     * Sets a parameter for a task.<p>
     *
     * @param taskid the id of the task
     * @param parname the name of the parameter
     * @param parvalue the value of the parameter
     * 
     * @throws CmsException if something goes wrong
     */
    public void setTaskPar(int taskid, String parname, String parvalue) throws CmsException {

        m_securityManager.setTaskPar(m_context, taskid, parname, parvalue);
    }

    /**
     * Sets the timeout of a task.<p>
     *
     * @param taskId the id of the task
     * @param timeout the new timeout value
     * 
     * @throws CmsException if something goes wrong
     */
    public void setTimeout(int taskId, long timeout) throws CmsException {

        m_securityManager.setTimeout(m_context, taskId, timeout);
    }

    /**
     * Writes a new user tasklog for a task.<p>
     *
     * @param taskid the Id of the task
     * @param comment the description for the log
     *
     * @throws CmsException if operation was not successful
     */
    public void writeTaskLog(int taskid, String comment) throws CmsException {

        m_securityManager.writeTaskLog(m_context, taskid, comment);
    }

    /**
     * Writes a new user tasklog for a task.<p>
     *
     * @param taskId the id of the task
     * @param comment the description for the log
     * @param taskType the type of the tasklog, user task types must be greater than 100
     * 
     * @throws CmsException if something goes wrong
     */
    public void writeTaskLog(int taskId, String comment, int taskType) throws CmsException {

        m_securityManager.writeTaskLog(m_context, taskId, comment, taskType);
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -