001: /**
002: * LibreSource
003: * Copyright (C) 2004-2008 Artenum SARL / INRIA
004: * http://www.libresource.org - contact@artenum.com
005: *
006: * This file is part of the LibreSource software,
007: * which can be used and distributed under license conditions.
008: * The license conditions are provided in the LICENSE.TXT file
009: * at the root path of the packaging that enclose this file.
010: * More information can be found at
011: * - http://dev.libresource.org/home/license
012: *
013: * Initial authors :
014: *
015: * Guillaume Bort / INRIA
016: * Francois Charoy / Universite Nancy 2
017: * Julien Forest / Artenum
018: * Claude Godart / Universite Henry Poincare
019: * Florent Jouille / INRIA
020: * Sebastien Jourdain / INRIA / Artenum
021: * Yves Lerumeur / Artenum
022: * Pascal Molli / Universite Henry Poincare
023: * Gerald Oster / INRIA
024: * Mariarosa Penzi / Artenum
025: * Gerard Sookahet / Artenum
026: * Raphael Tani / INRIA
027: *
028: * Contributors :
029: *
030: * Stephane Bagnier / Artenum
031: * Amadou Dia / Artenum-IUP Blois
032: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
033: */package org.libresource.bugtracker.ejb;
034:
035: import org.libresource.LibresourceResourceBase;
036:
037: import org.libresource.bugtracker.util.BugTrackerResourceUtil;
038:
039: import javax.ejb.CreateException;
040:
041: /**
042: * A libresource BugTracker
043: *
044: * @libresource.resource name="BugTracker" service="LibresourceBugTracker"
045: */
046: public abstract class BugTrackerResourceBean extends
047: LibresourceResourceBase {
048: /**
049: * @ejb.create-method
050: */
051: public String ejbCreate(String name, String description,
052: String assignee) throws CreateException {
053: setId(BugTrackerResourceUtil.generateGUID(this ));
054: setName(name);
055: setDescription(description);
056: setAssignee(assignee);
057:
058: return null;
059: }
060:
061: // persistents fields
062:
063: /**
064: * @ejb.persistent-field
065: * @ejb.interface-method
066: * @ejb.value-object match="libresource"
067: * @ejb.transaction type="Supports"
068: */
069: public abstract String getId();
070:
071: /**
072: * @ejb.persistent-field
073: * @ejb.interface-method
074: * @ejb.transaction type="Mandatory"
075: */
076: public abstract void setId(String id);
077:
078: /**
079: * @ejb.interface-method
080: * @ejb.value-object match="libresource"
081: * @ejb.transaction type="Supports"
082: */
083: public String getShortResourceName() {
084: return getName();
085: }
086:
087: /**
088: * @ejb.persistent-field
089: * @ejb.interface-method
090: * @ejb.value-object match="libresource"
091: * @ejb.transaction type="Supports"
092: */
093: public abstract String getName();
094:
095: /**
096: * @ejb.persistent-field
097: * @ejb.interface-method
098: * @ejb.transaction type="Mandatory"
099: */
100: public abstract void setName(String name);
101:
102: /**
103: * @ejb.persistent-field
104: * @ejb.interface-method
105: * @ejb.value-object match="libresource"
106: * @ejb.transaction type="Supports"
107: */
108: public abstract String getDescription();
109:
110: /**
111: * @ejb.persistent-field
112: * @ejb.interface-method
113: * @ejb.transaction type="Mandatory"
114: */
115: public abstract void setDescription(String description);
116:
117: /**
118: * @ejb.persistent-field
119: * @ejb.interface-method
120: * @ejb.value-object match="libresource"
121: * @ejb.transaction type="Supports"
122: */
123: public abstract String getAssignee();
124:
125: /**
126: * @ejb.persistent-field
127: * @ejb.interface-method
128: * @ejb.transaction type="Mandatory"
129: */
130: public abstract void setAssignee(String assignee);
131: }
|