01: /*
02: * $Id: AbstractActivity.java 881 2007-02-12 07:54:31Z hengels $
03: * (c) Copyright 2004 con:cern development team.
04: *
05: * This file is part of con:cern (http://concern.sf.net).
06: *
07: * con:cern is free software; you can redistribute it and/or modify
08: * it under the terms of the GNU Lesser General Public License
09: * as published by the Free Software Foundation; either version 2.1
10: * of the License, or (at your option) any later version.
11: *
12: * Please see COPYING for the complete licence.
13: */
14: package org.concern.controller;
15:
16: public abstract class AbstractActivity<S> extends AbstractNode
17: implements Activity<S> {
18: protected AbstractActivity() {
19: }
20:
21: protected AbstractActivity(String name) {
22: environment.put("activity.name", name);
23: }
24:
25: public final String getName() {
26: return (String) environment.get("activity.name");
27: }
28:
29: public void setController(Controller controller) {
30: super .setController(controller);
31: }
32:
33: public void escalate(S subject) throws ActivityExecutionException {
34: }
35:
36: public final String getPrecondition() {
37: return (String) environment.get("activity.precondition");
38: }
39:
40: public final String getPostcondition() {
41: return (String) environment.get("activity.postcondition");
42: }
43:
44: public final boolean isReentrant() {
45: return ((Boolean) environment.get("activity.reentrant"))
46: .booleanValue();
47: }
48:
49: public final String getActor() {
50: return (String) environment.get("activity.actor");
51: }
52: }
|