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 Process Instance Attribute Audit Data.
056: *
057: * @author Antony Lodge
058: */
059: public class WMAAssignProcessInstanceAttributeData extends WMAAuditBase {
060: private static final long serialVersionUID = -6108514019431468721L;
061:
062: private String _attributeName;
063: private int _attributeType;
064: private int _newAttributeLength;
065: private String _newAttributeValue;
066: private int _previousAttributeLength;
067: private String _previousAttributeValue;
068:
069: public WMAAssignProcessInstanceAttributeData() {
070: }
071:
072: public WMAAssignProcessInstanceAttributeData(
073: String processDefinitionId, String activityDefinitionId,
074: String initialProcessInstanceId,
075: String currentProcessInstanceId, String activityInstanceId,
076: int processState, WMAEventCode eventCode, String domainId,
077: String nodeId, String userId, String roleId,
078: Date timestamp, String attributeName, int attributeType,
079: int newAttributeLength, String newAttributeValue,
080: int previousAttributeLength, String previousAttributeValue) {
081:
082: super (processDefinitionId, activityDefinitionId,
083: initialProcessInstanceId, currentProcessInstanceId,
084: activityInstanceId, null, processState, eventCode,
085: domainId, nodeId, userId, roleId, timestamp);
086: _attributeName = attributeName;
087: _attributeType = attributeType;
088: _newAttributeLength = newAttributeLength;
089: _newAttributeValue = newAttributeValue;
090: _previousAttributeLength = previousAttributeLength;
091: _previousAttributeValue = previousAttributeValue;
092: }
093:
094: public WMAAssignProcessInstanceAttributeData(
095: String processDefinitionId, String activityDefinitionId,
096: String initialProcessInstanceId,
097: String currentProcessInstanceId, String activityInstanceId,
098: int processState, WMAEventCode eventCode, String domainId,
099: String nodeId, String userId, String roleId,
100: Date timestamp, byte accountCode, short extensionNumber,
101: byte extensionType, short extensionLength,
102: short extensionCodePage, Object extensionContent,
103: String attributeName, int attributeType,
104: int newAttributeLength, String newAttributeValue,
105: int previousAttributeLength, String previousAttributeValue) {
106:
107: super (processDefinitionId, activityDefinitionId,
108: initialProcessInstanceId, currentProcessInstanceId,
109: activityInstanceId, null, processState, eventCode,
110: domainId, nodeId, userId, roleId, timestamp,
111: accountCode, extensionNumber, extensionType,
112: extensionLength, extensionCodePage, extensionContent);
113: _attributeName = attributeName;
114: _attributeType = attributeType;
115: _newAttributeLength = newAttributeLength;
116: _newAttributeValue = newAttributeValue;
117: _previousAttributeLength = previousAttributeLength;
118: _previousAttributeValue = previousAttributeValue;
119: }
120:
121: /**
122: * @return The attribute name.
123: */
124: public String getAttributeName() {
125: return _attributeName;
126: }
127:
128: /**
129: * @param attributeName
130: */
131: public void setAttributeName(String attributeName) {
132: _attributeName = attributeName;
133: }
134:
135: /**
136: * @return The attribute type.
137: */
138: public int getAttributeType() {
139: return _attributeType;
140: }
141:
142: /**
143: * @param attributeType
144: */
145: public void setAttributeType(int attributeType) {
146: _attributeType = attributeType;
147: }
148:
149: /**
150: * @return The new attribute length.
151: */
152: public int getNewAttributeLength() {
153: return _newAttributeLength;
154: }
155:
156: /**
157: * @param newAttributeLength
158: */
159: public void setNewAttributeLength(int newAttributeLength) {
160: _newAttributeLength = newAttributeLength;
161: }
162:
163: /**
164: * @return The new attribute value.
165: */
166: public String getNewAttributeValue() {
167: return _newAttributeValue;
168: }
169:
170: /**
171: * @param newAttributeValue
172: */
173: public void setNewAttributeValue(String newAttributeValue) {
174: _newAttributeValue = newAttributeValue;
175: }
176:
177: /**
178: * @return The previous attribute length.
179: */
180: public int getPreviousAttributeLength() {
181: return _previousAttributeLength;
182: }
183:
184: /**
185: * @param previousAttributeLength
186: */
187: public void setPreviousAttributeLength(int previousAttributeLength) {
188: _previousAttributeLength = previousAttributeLength;
189: }
190:
191: /**
192: * @return The previous attribute value.
193: */
194: public String getPreviousAttributeValue() {
195: return _previousAttributeValue;
196: }
197:
198: /**
199: * @param previousAttributeValue
200: */
201: public void setPreviousAttributeValue(String previousAttributeValue) {
202: _previousAttributeValue = previousAttributeValue;
203: }
204:
205: public String toString() {
206: return "WMAAssignProcessInstanceAttributeData@"
207: + System.identityHashCode(this ) + '[' + " cwadPrefix="
208: + formatCwadPrefix() + ", attributeName='"
209: + _attributeName + '\'' + ", attributeType="
210: + _attributeType + ", newAttributeLength="
211: + _newAttributeLength + ", newAttributeValue='"
212: + _newAttributeValue + '\''
213: + ", previousAttributeLength="
214: + _previousAttributeLength
215: + ", previousAttributeValue='"
216: + _previousAttributeValue + '\'' + ", cwadSuffix="
217: + formatCwadSuffix() + ']';
218: }
219: }
|