KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > webman > acl > ObjectFactory


1 package de.webman.acl;
2
3 import com.teamkonzept.lib.ConfigurationListener;
4 import com.teamkonzept.lib.TKException;
5 import com.teamkonzept.lib.TKVector;
6 import de.webman.acl.db.ObjectDBData;
7
8 /**
9  * Common interface of factories for persistent objects.
10  *
11  * @version 1.0
12  * @since 1.0
13  * @author © 2001 Webman AG
14  */

15 public interface ObjectFactory
16     extends ConfigurationListener
17 {
18
19     // $Header: /cvsroot/webman-cms/source/webman/de/webman/acl/ObjectFactory.java,v 1.1 2001/08/20 08:25:07 mischa Exp $
20

21     // Constants
22

23     /**
24      * Configuration property group.
25      */

26     String JavaDoc PROPERTY_GROUP_NAME = "Access Control Definition";
27
28     /**
29      * Configuration property name.
30      */

31     String JavaDoc PROPERTY_CACHE_LOADED_OBJECTS = "cacheLoadedObjects";
32
33     /**
34      * Configuration property name.
35      */

36     String JavaDoc PROPERTY_DEFER_ASSOCIATION_LOADING = "deferAssociationLoading";
37
38     /**
39      * Configuration property name.
40      */

41     String JavaDoc PROPERTY_PRE_LOAD_OBJECTS = "preLoadObjects";
42
43     /**
44      * Configuration property name.
45      */

46     String JavaDoc PROPERTY_VALID_LOGINS = "validLogins";
47
48     /**
49      * Configuration property default value.
50      */

51     String JavaDoc DEFAULT_CACHE_LOADED_OBJECTS = "true";
52
53     /**
54      * Configuration property default value.
55      */

56     String JavaDoc DEFAULT_DEFER_ASSOCIATION_LOADING = "true";
57
58     /**
59      * Configuration property default value.
60      */

61     String JavaDoc DEFAULT_PRE_LOAD_OBJECTS = "false";
62
63     /**
64      * Configuration property default value.
65      */

66     String JavaDoc DEFAULT_VALID_LOGINS = "[\\w-]{6,8}";
67
68
69     // Method signatures
70

71     /**
72      * Retrieves the specified object.
73      *
74      * @param id the specifiying ID of the object.
75      * @return the specified object.
76      * @exception com.teamkonzept.lib.TKException if an error occured during object retrieval.
77      */

78     WMObject getObject (Integer JavaDoc id)
79         throws TKException;
80
81     /**
82      * Retrieves all known objects.
83      *
84      * @return all known objects.
85      * @exception com.teamkonzept.lib.TKException if an error occured during object retrieval.
86      */

87     TKVector getObjects ()
88         throws TKException;
89
90     /**
91      * Retrieves the specified objects.
92      *
93      * @param ids the specifiying IDs of the objects.
94      * @return the specified objects.
95      * @exception com.teamkonzept.lib.TKException if an error occured during object retrieval.
96      */

97     TKVector getObjects (TKVector ids)
98         throws TKException;
99
100     /**
101      * Retrieves all known object IDs.
102      *
103      * @return all known object IDs.
104      * @exception com.teamkonzept.lib.TKException if an error occured during object retrieval.
105      */

106     TKVector getObjectIDs ()
107         throws TKException;
108
109     /**
110      * Retrieves the specified object IDs.
111      *
112      * @param data the specifiying data of the objects.
113      * @return the specified object IDs.
114      * @exception com.teamkonzept.lib.TKException if an error occured during object retrieval.
115      */

116     TKVector getObjectIDs (ObjectDBData data)
117         throws TKException;
118
119     /**
120      * Retrieves the associated object IDs.
121      *
122      * @param object the object.
123      * @return the associated object IDs.
124      * @exception com.teamkonzept.lib.TKException if an error occured during object retrieval.
125      */

126     TKVector getObjectAssociations (WMObject object)
127         throws TKException;
128
129     /**
130      * Creates the specified object.
131      *
132      * @param data the specifying object data.
133      * @return the specified object.
134      * @exception com.teamkonzept.lib.TKException if an error occured during object creation.
135      */

136     WMObject createObject (ObjectDBData data)
137         throws TKException;
138
139     /**
140      * Modifies the given object.
141      *
142      * @param object the object.
143      * @exception com.teamkonzept.lib.TKException if an error occured during object modification.
144      */

145     void modifyObject (WMObject object)
146         throws TKException;
147
148     /**
149      * Deletes the given object.
150      *
151      * @param object the object.
152      * @exception com.teamkonzept.lib.TKException if an error occured during object deletion.
153      */

154     void deleteObject (WMObject object)
155         throws TKException;
156
157 }
158
Popular Tags