001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
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    }