001: /*--
002:
003: Copyright (C) 2002 Anthony Eden.
004: All rights reserved.
005:
006: Redistribution and use in source and binary forms, with or without
007: modification, are permitted provided that the following conditions
008: are met:
009:
010: 1. Redistributions of source code must retain the above copyright
011: notice, this list of conditions, and the following disclaimer.
012:
013: 2. Redistributions in binary form must reproduce the above copyright
014: notice, this list of conditions, and the disclaimer that follows
015: these conditions in the documentation and/or other materials
016: provided with the distribution.
017:
018: 3. The names "OBE" and "Open Business Engine" must not be used to
019: endorse or promote products derived from this software without prior
020: written permission. For written permission, please contact
021: me@anthonyeden.com.
022:
023: 4. Products derived from this software may not be called "OBE" or
024: "Open Business Engine", nor may "OBE" or "Open Business Engine"
025: appear in their name, without prior written permission from
026: Anthony Eden (me@anthonyeden.com).
027:
028: In addition, I request (but do not require) that you include in the
029: end-user documentation provided with the redistribution and/or in the
030: software itself an acknowledgement equivalent to the following:
031: "This product includes software developed by
032: Anthony Eden (http://www.anthonyeden.com/)."
033:
034: THIS SOFTWARE IS PROVIdED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
035: WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
036: OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
037: DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
038: INDIRECT, INCIdENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
039: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
040: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
041: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
042: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
043: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
044: POSSIBILITY OF SUCH DAMAGE.
045:
046: For more information on OBE, please see <http://obe.sourceforge.net/>.
047:
048: */
049:
050: package org.wfmc.audit;
051:
052: import java.util.Date;
053:
054: /**
055: * Assign/Reassign WorkItem Audit Data
056: *
057: * @author Antony Lodge
058: */
059: public class WMAAssignWorkItemData extends WMAChangeWorkItemStateData {
060: private static final long serialVersionUID = 6630195259692364092L;
061:
062: private String _targetDomainId;
063: private String _targetNodeId;
064: private String _targetUserId;
065: private String _targetRoleId;
066:
067: public WMAAssignWorkItemData() {
068: }
069:
070: public WMAAssignWorkItemData(String processDefinitionId,
071: String activityDefinitionId,
072: String initialProcessInstanceId,
073: String currentProcessInstanceId, String activityInstanceId,
074: int processState, WMAEventCode eventCode, String domainId,
075: String nodeId, String userId, String roleId,
076: Date timestamp, String workItemId, int workItemState,
077: String targetDomainId, String targetNodeId,
078: String targetUserId, String targetRoleId) {
079:
080: super (processDefinitionId, activityDefinitionId,
081: initialProcessInstanceId, currentProcessInstanceId,
082: activityInstanceId, workItemId, processState,
083: eventCode, domainId, nodeId, userId, roleId, timestamp,
084: workItemState, workItemState);
085: _targetDomainId = targetDomainId;
086: _targetNodeId = targetNodeId;
087: _targetUserId = targetUserId;
088: _targetRoleId = targetRoleId;
089: }
090:
091: public WMAAssignWorkItemData(String processDefinitionId,
092: String activityDefinitionId,
093: String initialProcessInstanceId,
094: String currentProcessInstanceId, String activityInstanceId,
095: String workItemId, int processState,
096: WMAEventCode eventCode, String domainId, String nodeId,
097: String userId, String roleId, Date timestamp,
098: byte accountCode, short extensionNumber,
099: byte extensionType, short extensionLength,
100: short extensionCodePage, Object extensionContent,
101: int workItemState, String targetDomainId,
102: String targetNodeId, String targetUserId,
103: String targetRoleId) {
104:
105: super (processDefinitionId, activityDefinitionId,
106: initialProcessInstanceId, currentProcessInstanceId,
107: activityInstanceId, workItemId, processState,
108: eventCode, domainId, nodeId, userId, roleId, timestamp,
109: accountCode, extensionNumber, extensionType,
110: extensionLength, extensionCodePage, extensionContent,
111: workItemState, workItemState);
112: _targetDomainId = targetDomainId;
113: _targetNodeId = targetNodeId;
114: _targetUserId = targetUserId;
115: _targetRoleId = targetRoleId;
116: }
117:
118: /**
119: * @return Domain Id for user being assigned work item
120: */
121: public String getTargetDomainId() {
122: return _targetDomainId;
123: }
124:
125: /**
126: * @param targetDomainId Domain Id for user being assigned work item
127: */
128: public void setTargetDomainId(String targetDomainId) {
129: _targetDomainId = targetDomainId;
130: }
131:
132: /**
133: * @return Node Id for user being assigned work item
134: */
135: public String getTargetNodeId() {
136: return _targetNodeId;
137: }
138:
139: /**
140: * @param targetNodeId Node Id for user being assigned work item
141: */
142: public void setTargetNodeId(String targetNodeId) {
143: _targetNodeId = targetNodeId;
144: }
145:
146: /**
147: * @return User Id for user being assigned work item
148: */
149: public String getTargetUserId() {
150: return _targetUserId;
151: }
152:
153: /**
154: * @param targetUserId User Id for user being assigned work item
155: */
156: public void setTargetUserId(String targetUserId) {
157: _targetUserId = targetUserId;
158: }
159:
160: /**
161: * @return Role Id for user being assigned work item
162: */
163: public String getTargetRoleId() {
164: return _targetRoleId;
165: }
166:
167: /**
168: * @param targetRoleId Role Id for user being assigned work item
169: */
170: public void setTargetRoleId(String targetRoleId) {
171: _targetRoleId = targetRoleId;
172: }
173:
174: public String toString() {
175: return "WMAAssignWorkItemData@" + System.identityHashCode(this )
176: + '[' + " cwadPrefix=" + formatCwadPrefix()
177: + ", activityInstanceId=" + getActivityInstanceId()
178: + ", workItemId=" + getWorkItemId()
179: + ", workItemState='" + getWorkItemState() + '\''
180: + ", targetDomainId=" + _targetDomainId
181: + ", targetNodeId=" + _targetNodeId + ", targetUserId="
182: + _targetUserId + ", targetRoleId=" + _targetRoleId
183: + ", cwadSuffix=" + formatCwadSuffix() + ']';
184: }
185: }
|