01: /*
02: * Copyright 2001-2006 C:1 Financial Services GmbH
03: *
04: * This software is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License Version 2.1, as published by the Free Software Foundation.
07: *
08: * This software is distributed in the hope that it will be useful,
09: * but WITHOUT ANY WARRANTY; without even the implied warranty of
10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11: * Lesser General Public License for more details.
12: *
13: * You should have received a copy of the GNU Lesser General Public
14: * License along with this library; if not, write to the Free Software
15: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
16: */
17:
18: package de.finix.contelligent.client.event;
19:
20: public class ContelligentLockEvent extends
21: AbstractTypedContelligentEvent {
22:
23: public final static int COMPONENT_LOCKED = 1;
24:
25: public final static int COMPONENT_UNLOCKED = 2;
26:
27: private String owner, principal, context;
28:
29: private long timestamp;
30:
31: private String wfId;
32:
33: private boolean shared;
34:
35: public ContelligentLockEvent(Object source, String target,
36: String owner, String principal, long timestamp,
37: String context, String wfId, boolean shared, int type) {
38: super (source, target, type);
39: this .owner = owner;
40: this .principal = principal;
41: this .timestamp = timestamp;
42: this .context = context;
43: this .wfId = wfId;
44: this .shared = shared;
45: if (wfId == null) {
46: wfId = "";
47: }
48: }
49:
50: public String getOwner() {
51: return owner;
52: }
53:
54: public String getPrincipal() {
55: return principal;
56: }
57:
58: public long getTimestamp() {
59: return timestamp;
60: }
61:
62: public String getContext() {
63: return context;
64: }
65:
66: public String getWfId() {
67: return wfId;
68: }
69:
70: public boolean isShared() {
71: return shared;
72: }
73:
74: public String toString() {
75: return (getType() == COMPONENT_LOCKED ? "Locked" : "Unlocked")
76: + "[target=" + getTarget() + ", owner=" + owner
77: + ", principal=" + principal + ", context=" + context
78: + ", wfId=" + wfId + ", shared=" + shared + "]";
79: }
80:
81: }
|