001: package de.webman.acl;
002:
003: import com.teamkonzept.lib.ConfigurationListener;
004: import com.teamkonzept.lib.TKException;
005: import com.teamkonzept.lib.TKVector;
006: import de.webman.acl.db.ObjectDBData;
007:
008: /**
009: * Common interface of factories for persistent objects.
010: *
011: * @version 1.0
012: * @since 1.0
013: * @author © 2001 Webman AG
014: */
015: public interface ObjectFactory extends ConfigurationListener {
016:
017: // $Header: /cvsroot/webman-cms/source/webman/de/webman/acl/ObjectFactory.java,v 1.1 2001/08/20 08:25:07 mischa Exp $
018:
019: // Constants
020:
021: /**
022: * Configuration property group.
023: */
024: String PROPERTY_GROUP_NAME = "Access Control Definition";
025:
026: /**
027: * Configuration property name.
028: */
029: String PROPERTY_CACHE_LOADED_OBJECTS = "cacheLoadedObjects";
030:
031: /**
032: * Configuration property name.
033: */
034: String PROPERTY_DEFER_ASSOCIATION_LOADING = "deferAssociationLoading";
035:
036: /**
037: * Configuration property name.
038: */
039: String PROPERTY_PRE_LOAD_OBJECTS = "preLoadObjects";
040:
041: /**
042: * Configuration property name.
043: */
044: String PROPERTY_VALID_LOGINS = "validLogins";
045:
046: /**
047: * Configuration property default value.
048: */
049: String DEFAULT_CACHE_LOADED_OBJECTS = "true";
050:
051: /**
052: * Configuration property default value.
053: */
054: String DEFAULT_DEFER_ASSOCIATION_LOADING = "true";
055:
056: /**
057: * Configuration property default value.
058: */
059: String DEFAULT_PRE_LOAD_OBJECTS = "false";
060:
061: /**
062: * Configuration property default value.
063: */
064: String DEFAULT_VALID_LOGINS = "[\\w-]{6,8}";
065:
066: // Method signatures
067:
068: /**
069: * Retrieves the specified object.
070: *
071: * @param id the specifiying ID of the object.
072: * @return the specified object.
073: * @exception com.teamkonzept.lib.TKException if an error occured during object retrieval.
074: */
075: WMObject getObject(Integer id) throws TKException;
076:
077: /**
078: * Retrieves all known objects.
079: *
080: * @return all known objects.
081: * @exception com.teamkonzept.lib.TKException if an error occured during object retrieval.
082: */
083: TKVector getObjects() throws TKException;
084:
085: /**
086: * Retrieves the specified objects.
087: *
088: * @param ids the specifiying IDs of the objects.
089: * @return the specified objects.
090: * @exception com.teamkonzept.lib.TKException if an error occured during object retrieval.
091: */
092: TKVector getObjects(TKVector ids) throws TKException;
093:
094: /**
095: * Retrieves all known object IDs.
096: *
097: * @return all known object IDs.
098: * @exception com.teamkonzept.lib.TKException if an error occured during object retrieval.
099: */
100: TKVector getObjectIDs() throws TKException;
101:
102: /**
103: * Retrieves the specified object IDs.
104: *
105: * @param data the specifiying data of the objects.
106: * @return the specified object IDs.
107: * @exception com.teamkonzept.lib.TKException if an error occured during object retrieval.
108: */
109: TKVector getObjectIDs(ObjectDBData data) throws TKException;
110:
111: /**
112: * Retrieves the associated object IDs.
113: *
114: * @param object the object.
115: * @return the associated object IDs.
116: * @exception com.teamkonzept.lib.TKException if an error occured during object retrieval.
117: */
118: TKVector getObjectAssociations(WMObject object) throws TKException;
119:
120: /**
121: * Creates the specified object.
122: *
123: * @param data the specifying object data.
124: * @return the specified object.
125: * @exception com.teamkonzept.lib.TKException if an error occured during object creation.
126: */
127: WMObject createObject(ObjectDBData data) throws TKException;
128:
129: /**
130: * Modifies the given object.
131: *
132: * @param object the object.
133: * @exception com.teamkonzept.lib.TKException if an error occured during object modification.
134: */
135: void modifyObject(WMObject object) throws TKException;
136:
137: /**
138: * Deletes the given object.
139: *
140: * @param object the object.
141: * @exception com.teamkonzept.lib.TKException if an error occured during object deletion.
142: */
143: void deleteObject(WMObject object) throws TKException;
144:
145: }
|