1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.kernel.workflow;
16  
17  import com.liferay.portal.kernel.util.StringPool;
18  
19  import java.io.InputStream;
20  import java.io.Serializable;
21  
22  import java.util.Map;
23  
24  /**
25   * <a href="DefaultWorkflowDefinition.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Shuyang Zhou
28   * @author Brian Wing Shun Chan
29   */
30  public class DefaultWorkflowDefinition
31      implements Serializable, WorkflowDefinition {
32  
33      public InputStream getInputStream() {
34          return _inputStream;
35      }
36  
37      public String getName() {
38          return _name;
39      }
40  
41      public Map<String, Object> getOptionalAttributes() {
42          return _optionalAttributes;
43      }
44  
45      public String getTitle(){
46          if (_title == null) {
47              return StringPool.BLANK;
48          }
49          else {
50              return _title;
51          }
52      }
53  
54      public String getTitle(String languageId) {
55          return getTitle();
56      }
57  
58      public int getVersion() {
59          return _version;
60      }
61  
62      public boolean isActive() {
63          return _active;
64      }
65  
66      public void setActive(boolean active) {
67          _active = active;
68      }
69  
70      public void setInputStream(InputStream inputStream) {
71          _inputStream = inputStream;
72      }
73  
74      public void setName(String name) {
75          _name = name;
76      }
77  
78      public void setOptionalAttributes(Map<String, Object> optionalAttributes) {
79          _optionalAttributes = optionalAttributes;
80      }
81  
82      public void setTitle(String title) {
83          _title = title;
84      }
85  
86      public void setVersion(int version) {
87          _version = version;
88      }
89  
90      private boolean _active;
91      private InputStream _inputStream;
92      private String _name;
93      private Map<String, Object> _optionalAttributes;
94      private String _title;
95      private int _version;
96  
97  }