KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > directory > ldapstudio > apacheds > configuration > model > ServerConfiguration


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  *
19  */

20 package org.apache.directory.ldapstudio.apacheds.configuration.model;
21
22
23 import java.util.ArrayList JavaDoc;
24 import java.util.List JavaDoc;
25
26
27 /**
28  * This class represents a Server Configuration.
29  *
30  * @author <a HREF="mailto:dev@directory.apache.org">Apache Directory Project</a>
31  * @version $Rev$, $Date$
32  */

33 public class ServerConfiguration
34 {
35     /** The path of the Server Configuration file */
36     private String JavaDoc path;
37
38     /** The port */
39     private int port;
40
41     /** The principal */
42     private String JavaDoc principal;
43
44     /** The password */
45     private String JavaDoc password;
46
47     /** The flag for Allow Anonymous Access */
48     private boolean allowAnonymousAccess;
49
50     /** The Max Time Limit */
51     private int maxTimeLimit;
52
53     /** the Max Size Limit */
54     private int maxSizeLimit;
55
56     /** The Synchonization Period */
57     private long synchronizationPeriod;
58
59     /** The Maximum number of Threads */
60     private int maxThreads;
61
62     /** The flag for Enable Access Control */
63     private boolean enableAccessControl;
64
65     /** The flag for Enable Kerberos */
66     private boolean enableKerberos;
67
68     /** The flag for Enable NTP */
69     private boolean enableNTP;
70
71     /** The flag for Enable Change Password */
72     private boolean enableChangePassword;
73
74     /** The flag for Denormalize Operational Attributes */
75     private boolean denormalizeOpAttr;
76
77     /** The Binary Attributes */
78     private List JavaDoc<String JavaDoc> binaryAttributes;
79
80     /** The Partitions */
81     private List JavaDoc<Partition> partitions;
82
83     /** The Interceptors */
84     private List JavaDoc<Interceptor> interceptors;
85
86     /** The Extended Operations */
87     private List JavaDoc<ExtendedOperation> extendedOperations;
88
89
90     /**
91      * Creates a new instance of ServerConfiguration.
92      */

93     public ServerConfiguration()
94     {
95         partitions = new ArrayList JavaDoc<Partition>();
96         interceptors = new ArrayList JavaDoc<Interceptor>();
97         extendedOperations = new ArrayList JavaDoc<ExtendedOperation>();
98         binaryAttributes = new ArrayList JavaDoc<String JavaDoc>();
99     }
100
101
102     /**
103      * Gets the Allow Anonymous flag.
104      *
105      * @return
106      * true if the server configuration allows Anonymous Access
107      */

108     public boolean isAllowAnonymousAccess()
109     {
110         return allowAnonymousAccess;
111     }
112
113
114     /**
115      * Sets the Allow Anonymous flag.
116      *
117      * @param allowAnonymousAccess
118      * the new value
119      */

120     public void setAllowAnonymousAccess( boolean allowAnonymousAccess )
121     {
122         this.allowAnonymousAccess = allowAnonymousAccess;
123     }
124
125
126     /**
127      * Gets the Enable Access Control flag.
128      *
129      * @return
130      * true if Access Control is enabled
131      */

132     public boolean isEnableAccessControl()
133     {
134         return enableAccessControl;
135     }
136
137
138     /**
139      * Sets the Enable Access Control flag.
140      *
141      * @param enableAccessControl
142      * the new value
143      */

144     public void setEnableAccessControl( boolean enableAccessControl )
145     {
146         this.enableAccessControl = enableAccessControl;
147     }
148
149
150     /**
151      * Gets the Enable Change Password flag.
152      *
153      * @return
154      * true if Change Password is enabled
155      */

156     public boolean isEnableChangePassword()
157     {
158         return enableChangePassword;
159     }
160
161
162     /**
163      * Sets the Enable Change Password flag.
164      *
165      * @param enableChangePassword
166      * the new value
167      */

168     public void setEnableChangePassword( boolean enableChangePassword )
169     {
170         this.enableChangePassword = enableChangePassword;
171     }
172
173
174     /**
175      * Gets the Enable Kerberos flag.
176      *
177      * @return
178      * true if Kerberos is enabled
179      */

180     public boolean isEnableKerberos()
181     {
182         return enableKerberos;
183     }
184
185
186     /**
187      * Sets the Enable Kerberos flag.
188      *
189      * @param enableKerberos
190      * the new value
191      */

192     public void setEnableKerberos( boolean enableKerberos )
193     {
194         this.enableKerberos = enableKerberos;
195     }
196
197
198     /**
199      * Gets the Enable NTP flag.
200      *
201      * @return
202      * true if NTP is enabled
203      */

204     public boolean isEnableNTP()
205     {
206         return enableNTP;
207     }
208
209
210     /**
211      * Sets the Enable NTP flag.
212      *
213      * @param enableNTP
214      * the new value
215      */

216     public void setEnableNTP( boolean enableNTP )
217     {
218         this.enableNTP = enableNTP;
219     }
220
221
222     /**
223      * Gets the Extended Operations List.
224      *
225      * @return
226      * the Extended Operations List
227      */

228     public List JavaDoc<ExtendedOperation> getExtendedOperations()
229     {
230         return extendedOperations;
231     }
232
233
234     /**
235      * Sets the Extended Operations List.
236      *
237      * @param extendedOperations
238      * the new value
239      */

240     public void setExtendedOperations( List JavaDoc<ExtendedOperation> extendedOperations )
241     {
242         this.extendedOperations = extendedOperations;
243     }
244
245
246     /**
247      * Adds ab Extended Operation.
248      *
249      * @param extendedOperation
250      * the Extended Operation to add
251      * @return
252      * true (as per the general contract of the Collection.add method).
253      */

254     public boolean addExtendedOperation( ExtendedOperation extendedOperation )
255     {
256         return extendedOperations.add( extendedOperation );
257     }
258
259
260     /**
261      * Removes an Extended Operation.
262      *
263      * @param extendedOperation
264      * the Extended Operation to remove
265      * @return
266      * true if this list contained the specified element.
267      */

268     public boolean removeExtendedOperation( ExtendedOperation extendedOperation )
269     {
270         return extendedOperations.remove( extendedOperation );
271     }
272
273
274     /**
275      * Removes all ExtendedOperations.
276      */

277     public void clearExtendedOperations()
278     {
279         extendedOperations.clear();
280     }
281
282
283     /**
284      * Gets the Interceptors List.
285      *
286      * @return
287      * the Interceptors List
288      */

289     public List JavaDoc<Interceptor> getInterceptors()
290     {
291         return interceptors;
292     }
293
294
295     /**
296      * Sets the Interceptors List.
297      *
298      * @param interceptors
299      * the new value
300      */

301     public void setInterceptors( List JavaDoc<Interceptor> interceptors )
302     {
303         this.interceptors = interceptors;
304     }
305
306
307     /**
308      * Adds an Interceptor.
309      *
310      * @param interceptor
311      * the Interceptor to add
312      * @return
313      * true (as per the general contract of the Collection.add method).
314      */

315     public boolean addInterceptor( Interceptor interceptor )
316     {
317         return interceptors.add( interceptor );
318     }
319
320
321     /**
322      * Removes an Interceptor.
323      *
324      * @param interceptor
325      * the Interceptor to remove
326      * @return
327      * true if this list contained the specified element.
328      */

329     public boolean removeInterceptor( Interceptor interceptor )
330     {
331         return interceptors.remove( interceptor );
332     }
333
334
335     /**
336      * Removes all interceptors.
337      */

338     public void clearInterceptors()
339     {
340         interceptors.clear();
341     }
342
343
344     /**
345      * Gets the Maximum Size Limit.
346      *
347      * @return
348      * the Maximum Size Limit
349      */

350     public int getMaxSizeLimit()
351     {
352         return maxSizeLimit;
353     }
354
355
356     /**
357      * Sets the Maximum Size Limit.
358      *
359      * @param maxSizeLimit
360      * the new value
361      */

362     public void setMaxSizeLimit( int maxSizeLimit )
363     {
364         this.maxSizeLimit = maxSizeLimit;
365     }
366
367
368     /**
369      * Gets the Maximum number of Threads.
370      *
371      * @return
372      * the Maximum number of Threads
373      */

374     public int getMaxThreads()
375     {
376         return maxThreads;
377     }
378
379
380     /**
381      * Sets the Maximum number of Threads
382      *
383      * @param maxThreads
384      * the new value
385      */

386     public void setMaxThreads( int maxThreads )
387     {
388         this.maxThreads = maxThreads;
389     }
390
391
392     /**
393      * Gets the Maximum Time Limit.
394      *
395      * @return
396      * the Maximum Time Limit
397      */

398     public int getMaxTimeLimit()
399     {
400         return maxTimeLimit;
401     }
402
403
404     /**
405      * Sets the Maximum Time Limit.
406      *
407      * @param maxTimeLimit
408      * the new value
409      */

410     public void setMaxTimeLimit( int maxTimeLimit )
411     {
412         this.maxTimeLimit = maxTimeLimit;
413     }
414
415
416     /**
417      * Gets the Partitions List.
418      *
419      * @return
420      * the Partitions List
421      */

422     public List JavaDoc<Partition> getPartitions()
423     {
424         return partitions;
425     }
426
427
428     /**
429      * Sets the Partitions List.
430      *
431      * @param partitions
432      * the new value
433      */

434     public void setPartitions( List JavaDoc<Partition> partitions )
435     {
436         this.partitions = partitions;
437     }
438
439
440     /**
441      * Adds a Partition.
442      *
443      * @param partition
444      * the Partition to add
445      * @return
446      * true (as per the general contract of the Collection.add method).
447      */

448     public boolean addPartition( Partition partition )
449     {
450         return partitions.add( partition );
451     }
452
453
454     /**
455      * Removes a Partition.
456      *
457      * @param partition
458      * the partition to remove
459      * @return
460      * true if this list contained the specified element.
461      */

462     public boolean removePartition( Partition partition )
463     {
464         return partitions.remove( partition );
465     }
466
467
468     /**
469      * Removes all partitions.
470      */

471     public void clearPartitions()
472     {
473         partitions.clear();
474     }
475
476
477     /**
478      * Gets the password.
479      *
480      * @return
481      * the password
482      */

483     public String JavaDoc getPassword()
484     {
485         return password;
486     }
487
488
489     /**
490      * Sets the password.
491      *
492      * @param password
493      * the new password
494      */

495     public void setPassword( String JavaDoc password )
496     {
497         this.password = password;
498     }
499
500
501     /**
502      * Gets the Path of the file corresponding to the ServerConfiguration.
503      *
504      * @return
505      * the Path of the corresponding file
506      */

507     public String JavaDoc getPath()
508     {
509         return path;
510     }
511
512
513     /**
514      * Sets the Path of the file corresponding to the ServerConfiguration.
515      *
516      * @param path
517      * the new value
518      */

519     public void setPath( String JavaDoc path )
520     {
521         this.path = path;
522     }
523
524
525     /**
526      * Gets the Port.
527      *
528      * @return
529      * the Port
530      */

531     public int getPort()
532     {
533         return port;
534     }
535
536
537     /**
538      * Sets the Port
539      *
540      * @param port
541      * the new value
542      */

543     public void setPort( int port )
544     {
545         this.port = port;
546     }
547
548
549     /**
550      * Gets the Principal
551      *
552      * @return
553      * the Principal
554      */

555     public String JavaDoc getPrincipal()
556     {
557         return principal;
558     }
559
560
561     /**
562      * Sets the Principal
563      *
564      * @param principal
565      * the new value
566      */

567     public void setPrincipal( String JavaDoc principal )
568     {
569         this.principal = principal;
570     }
571
572
573     /**
574      * Gets the Synchronization Period.
575      *
576      * @return
577      * the Synchronization Period
578      */

579     public long getSynchronizationPeriod()
580     {
581         return synchronizationPeriod;
582     }
583
584
585     /**
586      * Sets the Synchonization Period.
587      *
588      * @param synchronizationPeriod
589      * the new value
590      */

591     public void setSynchronizationPeriod( long synchronizationPeriod )
592     {
593         this.synchronizationPeriod = synchronizationPeriod;
594     }
595
596
597     /**
598      * Gets the Denormalize Operational Attributes flag.
599      *
600      * @return
601      * the Denormalize Operational Attributes flag
602      */

603     public boolean isDenormalizeOpAttr()
604     {
605         return denormalizeOpAttr;
606     }
607
608
609     /**
610      * Sets the Denormalize Operational Attributes flag.
611      *
612      * @param denormalizeOpAttr
613      * the new Denormalize Operational Attributes flag
614      */

615     public void setDenormalizeOpAttr( boolean denormalizeOpAttr )
616     {
617         this.denormalizeOpAttr = denormalizeOpAttr;
618     }
619
620
621     /**
622      * Gets the Binary Attributes List.
623      *
624      * @return
625      * the Binary Attributes List
626      */

627     public List JavaDoc<String JavaDoc> getBinaryAttributes()
628     {
629         return binaryAttributes;
630     }
631
632
633     /**
634      * Sets the Binary Attributes List.
635      *
636      * @param binaryAttributes
637      * the new value
638      */

639     public void setBinaryAttributes( List JavaDoc<String JavaDoc> binaryAttributes )
640     {
641         this.binaryAttributes = binaryAttributes;
642     }
643
644
645     /**
646      * Adds a Binary Attribute.
647      *
648      * @param binaryAttribute
649      * the Partition to add
650      * @return
651      * true (as per the general contract of the Collection.add method).
652      */

653     public boolean addBinaryAttribute( String JavaDoc binaryAttribute )
654     {
655         return binaryAttributes.add( binaryAttribute );
656     }
657
658
659     /**
660      * Removes a Binary Attribute.
661      *
662      * @param binaryAttribute
663      * the Binary Attribute to remove
664      * @return
665      * true if this list contained the specified element.
666      */

667     public boolean removeBinaryAttribute( String JavaDoc binaryAttribute )
668     {
669         return binaryAttributes.remove( binaryAttribute );
670     }
671
672
673     /**
674      * Removes all Binary Attributes.
675      */

676     public void clearBinaryAttributes()
677     {
678         binaryAttributes.clear();
679     }
680 }
681
Popular Tags