001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.kernel.workflow;
016    
017    import com.liferay.portal.kernel.util.OrderByComparator;
018    
019    import java.util.List;
020    
021    /**
022     * @author Micha Kiener
023     * @author Shuyang Zhou
024     * @author Brian Wing Shun Chan
025     */
026    public class WorkflowLogManagerUtil {
027    
028            public static int getWorkflowLogCountByWorkflowInstance(
029                            long companyId, long workflowInstanceId, List<Integer> logTypes)
030                    throws WorkflowException {
031    
032                    return _workflowLogManager.getWorkflowLogCountByWorkflowInstance(
033                            companyId, workflowInstanceId, logTypes);
034            }
035    
036            public static int getWorkflowLogCountByWorkflowTask(
037                            long companyId, long workflowTaskId, List<Integer> logTypes)
038                    throws WorkflowException {
039    
040                    return _workflowLogManager.getWorkflowLogCountByWorkflowTask(
041                            companyId, workflowTaskId, logTypes);
042            }
043    
044            public static WorkflowLogManager getWorkflowLogManager() {
045                    return _workflowLogManager;
046            }
047    
048            public static List<WorkflowLog> getWorkflowLogsByWorkflowInstance(
049                            long companyId, long workflowInstanceId, List<Integer> logTypes,
050                            int start, int end, OrderByComparator orderByComparator)
051                    throws WorkflowException {
052    
053                    return _workflowLogManager.getWorkflowLogsByWorkflowInstance(
054                            companyId, workflowInstanceId, logTypes,
055                            start, end, orderByComparator);
056            }
057    
058            public static List<WorkflowLog> getWorkflowLogsByWorkflowTask(
059                            long companyId, long workflowTaskId, List<Integer> logTypes,
060                            int start, int end, OrderByComparator orderByComparator)
061                    throws WorkflowException {
062    
063                    return _workflowLogManager.getWorkflowLogsByWorkflowTask(
064                            companyId, workflowTaskId, logTypes,
065                            start, end, orderByComparator);
066            }
067    
068            public void setWorkflowLogManager(WorkflowLogManager workflowLogManager) {
069                    _workflowLogManager = workflowLogManager;
070            }
071    
072            private static WorkflowLogManager _workflowLogManager;
073    
074    }