001    /**
002     * Copyright (c) 2000-2013 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.security.pacl.permission.PortalRuntimePermission;
018    
019    import java.util.Map;
020    
021    /**
022     * @author Brian Wing Shun Chan
023     * @author Raymond Aug??
024     */
025    public class WorkflowEngineManagerUtil {
026    
027            public static String getKey() {
028                    return getWorkflowEngineManager().getKey();
029            }
030    
031            public static String getName() {
032                    return getWorkflowEngineManager().getName();
033            }
034    
035            public static Map<String, Object> getOptionalAttributes() {
036                    return getWorkflowEngineManager().getOptionalAttributes();
037            }
038    
039            public static String getVersion() {
040                    return getWorkflowEngineManager().getVersion();
041            }
042    
043            public static WorkflowEngineManager getWorkflowEngineManager() {
044                    PortalRuntimePermission.checkGetBeanProperty(
045                            WorkflowEngineManagerUtil.class);
046    
047                    return _workflowEngineManager;
048            }
049    
050            public static boolean isDeployed() {
051                    return getWorkflowEngineManager().isDeployed();
052            }
053    
054            public void setWorkflowEngineManager(
055                    WorkflowEngineManager workflowEngineManager) {
056    
057                    PortalRuntimePermission.checkSetBeanProperty(getClass());
058    
059                    _workflowEngineManager = workflowEngineManager;
060            }
061    
062            private static WorkflowEngineManager _workflowEngineManager;
063    
064    }