001: /*
002: * This file is part of the WfMOpen project.
003: * Copyright (C) 2001-2004 Danet GmbH (www.danet.de), GS-AN.
004: * All rights reserved.
005: *
006: * This program is free software; you can redistribute it and/or modify
007: * it under the terms of the GNU General Public License as published by
008: * the Free Software Foundation; either version 2 of the License, or
009: * (at your option) any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
019: *
020: * $Id: SimpleApplicationInfo.java,v 1.5 2006/10/25 15:30:44 drmlipp Exp $
021: *
022: * $Log: SimpleApplicationInfo.java,v $
023: * Revision 1.5 2006/10/25 15:30:44 drmlipp
024: * Fixed typo.
025: *
026: * Revision 1.4 2006/09/29 12:32:09 drmlipp
027: * Consistently using WfMOpen as projct name now.
028: *
029: * Revision 1.3 2004/10/20 20:37:36 drmlipp
030: * Fixed initialization.
031: *
032: * Revision 1.2 2004/08/19 13:24:50 drmlipp
033: * Fixed AVK errors and (many) warnings.
034: *
035: * Revision 1.1.1.1 2004/08/18 15:17:39 drmlipp
036: * Update to 1.2
037: *
038: * Revision 1.3 2004/04/08 09:34:54 lipp
039: * Clarified documentation of package structure.
040: *
041: * Revision 1.2 2004/03/12 12:19:53 lipp
042: * Javadoc fixes.
043: *
044: * Revision 1.1 2004/02/19 17:55:55 lipp
045: * Initial version of waittool.
046: *
047: */
048: package de.danet.an.workflow.tools.util;
049:
050: import java.io.Serializable;
051:
052: import java.util.Date;
053:
054: import de.danet.an.workflow.api.ActivityUniqueKey;
055:
056: /**
057: * This class provides a container for the application instance
058: * information managed by the {@link SimpleApplicationDirectory
059: * <code>SimpleApplicationDirectory</code>}.
060: *
061: * @author <a href="mailto:lipp@danet.de">Michael Lipp</a>
062: * @version $Revision: 1.5 $
063: */
064:
065: public class SimpleApplicationInfo implements Serializable {
066:
067: private long instId;
068: private ActivityUniqueKey auk;
069: private Date assignedAt;
070: private String resourceKey;
071: private Object state;
072:
073: /**
074: * Creates an instance of <code>SimpleApplicationInfo</code>
075: * with all attributes initialized to the given values.
076: * @param instanceId the instance id
077: * @param auk the activity unique key
078: * @param assignedAt assignment timestamp
079: * @param resourceKey the assigned resource
080: * @param state the application state
081: */
082: SimpleApplicationInfo(long instanceId, ActivityUniqueKey auk,
083: Date assignedAt, String resourceKey, Object state) {
084: this .instId = instanceId;
085: this .auk = auk;
086: this .assignedAt = assignedAt;
087: this .resourceKey = resourceKey;
088: this .state = state;
089: }
090:
091: /**
092: * Return the application instance id.
093: * @return instance id
094: */
095: public long id() {
096: return instId;
097: }
098:
099: /**
100: * Return the activity unique key.
101: * @return activity's unique key
102: */
103: public ActivityUniqueKey activityUniqueKey() {
104: return auk;
105: }
106:
107: /**
108: * Return the assignment timestamp.
109: * @return assignment timestamp
110: */
111: public Date assignedAt() {
112: return assignedAt;
113: }
114:
115: /**
116: * Return the assigned resource.
117: * @return assigned resource key
118: */
119: public String resourceKey() {
120: return resourceKey;
121: }
122:
123: /**
124: * Return the application state.
125: * @return application state
126: */
127: public Object state() {
128: return state;
129: }
130: }
|