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.metasite.ejb;
034:
035: import org.libresource.LibresourceResourceBase;
036:
037: import org.libresource.metasite.util.ProjectProxyResourceUtil;
038:
039: import javax.ejb.CreateException;
040:
041: /**
042: * @libresource.resource name="ProjectProxy" service="MetaSite"
043: */
044: public abstract class ProjectProxyResourceBean extends
045: LibresourceResourceBase {
046: /**
047: * @ejb.create-method
048: */
049: public String ejbCreate(String uri, String name,
050: String description, String summary) throws CreateException {
051: setId(ProjectProxyResourceUtil.generateGUID(this ));
052: setProjectUri(uri);
053: setName(name);
054: setDescription(description);
055: setSummary(summary);
056:
057: return null;
058: }
059:
060: // persistents fields
061:
062: /**
063: * @ejb.persistent-field
064: * @ejb.interface-method
065: * @ejb.value-object match="libresource"
066: * @ejb.transaction type="Supports"
067: */
068: public abstract String getId();
069:
070: /**
071: * @ejb.persistent-field
072: * @ejb.interface-method
073: * @ejb.transaction type="Mandatory"
074: */
075: public abstract void setId(String id);
076:
077: /**
078: * @ejb.interface-method
079: * @ejb.value-object match="libresource"
080: * @ejb.transaction type="Supports"
081: */
082: public String getShortResourceName() {
083: return getName();
084: }
085:
086: /**
087: * @ejb.persistent-field
088: * @ejb.interface-method
089: * @ejb.value-object match="libresource"
090: * @ejb.transaction type="Supports"
091: */
092: public abstract String getProjectUri();
093:
094: /**
095: * @ejb.persistent-field
096: * @ejb.interface-method
097: * @ejb.transaction type="Mandatory"
098: */
099: public abstract void setProjectUri(String uri);
100:
101: /**
102: * @ejb.persistent-field
103: * @ejb.interface-method
104: * @ejb.value-object match="libresource"
105: * @ejb.transaction type="Supports"
106: */
107: public abstract String getName();
108:
109: /**
110: * @ejb.persistent-field
111: * @ejb.interface-method
112: * @ejb.transaction type="Mandatory"
113: */
114: public abstract void setName(String name);
115:
116: /**
117: * @ejb.persistent-field
118: * @ejb.interface-method
119: * @ejb.value-object match="libresource"
120: * @ejb.transaction type="Supports"
121: */
122: public abstract String getDescription();
123:
124: /**
125: * @ejb.persistent-field
126: * @ejb.interface-method
127: * @ejb.transaction type="Mandatory"
128: */
129: public abstract void setDescription(String description);
130:
131: /**
132: * @ejb.persistent-field
133: * @ejb.interface-method
134: * @ejb.value-object match="libresource"
135: * @ejb.transaction type="Supports"
136: */
137: public abstract String getSummary();
138:
139: /**
140: * @ejb.persistent-field
141: * @ejb.interface-method
142: * @ejb.transaction type="Mandatory"
143: */
144: public abstract void setSummary(String summary);
145: }
|