001    /**
002     * Copyright (c) 2000-2012 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.StringPool;
018    
019    import java.io.InputStream;
020    import java.io.Serializable;
021    
022    import java.util.Map;
023    
024    /**
025     * @author Shuyang Zhou
026     * @author Brian Wing Shun Chan
027     * @author Eduardo Lundgren
028     */
029    public class DefaultWorkflowDefinition
030            implements Serializable, WorkflowDefinition {
031    
032            public String getContent() {
033                    return _content;
034            }
035    
036            public InputStream getInputStream() {
037                    return _inputStream;
038            }
039    
040            public String getName() {
041                    return _name;
042            }
043    
044            public Map<String, Object> getOptionalAttributes() {
045                    return _optionalAttributes;
046            }
047    
048            public String getTitle() {
049                    if (_title == null) {
050                            return StringPool.BLANK;
051                    }
052                    else {
053                            return _title;
054                    }
055            }
056    
057            public String getTitle(String languageId) {
058                    return getTitle();
059            }
060    
061            public int getVersion() {
062                    return _version;
063            }
064    
065            public boolean isActive() {
066                    return _active;
067            }
068    
069            public void setActive(boolean active) {
070                    _active = active;
071            }
072    
073            public void setContent(String content) {
074                    _content = content;
075            }
076    
077            public void setInputStream(InputStream inputStream) {
078                    _inputStream = inputStream;
079            }
080    
081            public void setName(String name) {
082                    _name = name;
083            }
084    
085            public void setOptionalAttributes(Map<String, Object> optionalAttributes) {
086                    _optionalAttributes = optionalAttributes;
087            }
088    
089            public void setTitle(String title) {
090                    _title = title;
091            }
092    
093            public void setVersion(int version) {
094                    _version = version;
095            }
096    
097            private boolean _active;
098            private String _content;
099            private InputStream _inputStream;
100            private String _name;
101            private Map<String, Object> _optionalAttributes;
102            private String _title;
103            private int _version;
104    
105    }