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.membership.ejb;
034:
035: import org.libresource.Libresource;
036: import org.libresource.LibresourceResourceBase;
037:
038: import org.libresource.kernel.interfaces.KernelService;
039:
040: import org.libresource.membership.util.LDAPGroupResourceUtil;
041:
042: import java.net.URI;
043:
044: import java.util.Collection;
045: import java.util.Vector;
046:
047: import javax.ejb.CreateException;
048:
049: /**
050: * LibreSource
051: *
052: * @author <a href="mailto:jourdain@artenum.com">Sebastien Jourdain</a> - <a
053: * href="http://www.artenum.com">Artenum</a>
054: *
055: * An LDAP Group of the Membership service
056: *
057: * @libresource.resource name="LDAPGroup" service="Membership"
058: *
059: */
060: public abstract class LDAPGroupResourceBean extends
061: LibresourceResourceBase {
062: /**
063: * @ejb.create-method
064: */
065: public String ejbCreate(String name, String description)
066: throws CreateException {
067: setId(LDAPGroupResourceUtil.generateGUID(this ));
068: setName(name);
069: setDescription(description);
070:
071: return null;
072: }
073:
074: // persistents fields
075:
076: /**
077: * @ejb.persistent-field
078: * @ejb.interface-method
079: * @ejb.value-object match="libresource"
080: * @ejb.transaction type="Supports"
081: */
082: public abstract String getId();
083:
084: /**
085: * @ejb.persistent-field
086: * @ejb.interface-method
087: * @ejb.transaction type="Mandatory"
088: */
089: public abstract void setId(String id);
090:
091: /**
092: * @ejb.interface-method
093: * @ejb.value-object match="libresource"
094: * @ejb.transaction type="Supports"
095: */
096: public String getShortResourceName() {
097: return getName();
098: }
099:
100: /**
101: * @ejb.persistent-field
102: * @ejb.interface-method
103: * @ejb.value-object match="libresource"
104: * @ejb.transaction type="Supports"
105: */
106: public abstract String getName();
107:
108: /**
109: * @ejb.persistent-field
110: * @ejb.interface-method
111: * @ejb.transaction type="Mandatory"
112: */
113: public abstract void setName(String name);
114:
115: /**
116: * @ejb.persistent-field
117: * @ejb.interface-method
118: * @ejb.value-object match="libresource"
119: * @ejb.transaction type="Supports"
120: */
121: public abstract String getDescription();
122:
123: /**
124: * @ejb.persistent-field
125: * @ejb.interface-method
126: * @ejb.transaction type="Mandatory"
127: */
128: public abstract void setDescription(String description);
129:
130: /**
131: * @ejb.persistent-field
132: * @ejb.interface-method
133: * @ejb.value-object match="libresource"
134: * @ejb.transaction type="Supports"
135: */
136: public abstract String getLDAPServerURL();
137:
138: /**
139: * @ejb.persistent-field
140: * @ejb.interface-method
141: * @ejb.transaction type="Mandatory"
142: */
143: public abstract void setLDAPServerURL(String ldapServerURL);
144:
145: /**
146: * @ejb.persistent-field
147: * @ejb.interface-method
148: * @ejb.value-object match="libresource"
149: * @ejb.transaction type="Supports"
150: */
151: public abstract String getLDAPGroupDefinition();
152:
153: /**
154: * @ejb.persistent-field
155: * @ejb.interface-method
156: * @ejb.transaction type="Mandatory"
157: */
158: public abstract void setLDAPGroupDefinition(String query);
159:
160: /**
161: * @ejb.persistent-field
162: * @ejb.interface-method
163: * @ejb.value-object match="libresource"
164: * @ejb.transaction type="Supports"
165: */
166: public abstract String getField();
167:
168: /**
169: * @ejb.persistent-field
170: * @ejb.interface-method
171: * @ejb.transaction type="Mandatory"
172: */
173: public abstract void setField(String field);
174:
175: /**
176: * @ejb.persistent-field
177: * @ejb.interface-method
178: * @ejb.value-object match="libresource"
179: * @ejb.transaction type="Supports"
180: */
181: public abstract String getUserID();
182:
183: /**
184: * @ejb.persistent-field
185: * @ejb.interface-method
186: * @ejb.transaction type="Mandatory"
187: */
188: public abstract void setUserID(String userId);
189:
190: /**
191: * @ejb.persistent-field
192: * @ejb.interface-method
193: * @ejb.value-object match="libresource"
194: * @ejb.transaction type="Supports"
195: */
196: public abstract String getDNBind();
197:
198: /**
199: * @ejb.persistent-field
200: * @ejb.interface-method
201: * @ejb.transaction type="Mandatory"
202: */
203: public abstract void setDNBind(String dnBind);
204:
205: /**
206: * @ejb.persistent-field
207: * @ejb.interface-method
208: * @ejb.value-object match="libresource"
209: * @ejb.transaction type="Supports"
210: */
211: public abstract String getPasswordBind();
212:
213: /**
214: * @ejb.persistent-field
215: * @ejb.interface-method
216: * @ejb.transaction type="Mandatory"
217: */
218: public abstract void setPasswordBind(String passwordBind);
219:
220: /**
221: * @ejb.persistent-field
222: * @ejb.interface-method
223: * @ejb.value-object match="libresource"
224: * @ejb.transaction type="Supports"
225: */
226: public abstract boolean getConnectionSecured();
227:
228: /**
229: * @ejb.persistent-field
230: * @ejb.interface-method
231: * @ejb.transaction type="Mandatory"
232: */
233: public abstract void setConnectionSecured(boolean useSSL);
234: }
|