01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.bpmscript;
18:
19: import java.io.Serializable;
20: import java.sql.Timestamp;
21:
22: public class Process extends TimeStampedIdentity implements IProcess,
23: Serializable {
24:
25: private static final long serialVersionUID = -2560612295366614798L;
26:
27: private String source;
28: private String name;
29: private boolean primaryProcess;
30: private boolean pinned;
31:
32: public Process() {
33:
34: }
35:
36: // public Process(String name, ) {
37: // this.name = process.getName();
38: // this.namespace = process.getNamespace();
39: // this.primaryProcess = process.isPrimaryProcess();
40: // this.setCreationDate(process.getCreationDate());
41: // this.setLastModified(process.getLastModified());
42: // this.setId(process.getId());
43: // }
44:
45: public String getName() {
46: return name;
47: }
48:
49: public void setName(String name) {
50: this .name = name;
51: }
52:
53: public boolean isPrimaryProcess() {
54: return primaryProcess;
55: }
56:
57: public void setPrimaryProcess(boolean primaryProcess) {
58: this .primaryProcess = primaryProcess;
59: }
60:
61: public String getSource() {
62: return source;
63: }
64:
65: public void setSource(String source) {
66: this .source = source;
67: }
68:
69: public Process(String id, Timestamp lastModified,
70: Timestamp creationDate, String namespace, String name,
71: boolean primaryProcess, boolean pinned) {
72: super (id, lastModified, creationDate);
73: this .source = namespace;
74: this .name = name;
75: this .primaryProcess = primaryProcess;
76: this .pinned = pinned;
77: }
78:
79: public Process(IProcess process) {
80: this (process.getId(), process.getLastModified(), process
81: .getCreationDate(), process.getSource(), process
82: .getName(), process.isPrimaryProcess(), process
83: .isPinned());
84: }
85:
86: public boolean isPinned() {
87: return pinned;
88: }
89:
90: public void setPinned(boolean pinned) {
91: this.pinned = pinned;
92: }
93:
94: }
|