com.filenet.api.core
Interface InstantiatingScope
-
- All Superinterfaces:
- Scope
- All Known Subinterfaces:
- Domain, ObjectStore
public interface InstantiatingScope extends Scope
Provides a generic means for instantiating independent objects within a scope. AnInstantiatingScopecan instantiate only those objects within its scope. For example, aDocumentobject is within the scope of anObjectStore, but is not within the scope of aDomain. This interface provides methods for creating or retrieving objects when you do not have type-specific knowledge of the objects to be instantiated. You can create or retrieve objects by supplying just a class name and (for retrieval) an object identifier or path.Note: To create or retrieve known object types, use the static
Factorymethods for the specific object type.Factorymethods are more convenient and provide type safety. TheFactorymethod results do not have to be cast and programming errors on the returned type may be caught at build time instead of runtime. TheFactorymethods also avoid the inconvenience (and potential for error) of specifying the type.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description IndependentObjectcreateObject(java.lang.String classIdent)Creates a new object of the specified class.IndependentObjectcreateObject(java.lang.String classIdent, Id objectId)Creates a new object based on the specified class and ID.IndependentObjectfetchObject(java.lang.String classIdent, Id objectId, PropertyFilter filter)Retrieves an object of the requested type, given a class identifier and object ID.IndependentObjectfetchObject(java.lang.String classIdent, java.lang.String objectIdent, PropertyFilter filter)Retrieves an object of the requested type, given class and object identifiers.IndependentObjectgetObject(java.lang.String classIdent, Id objectId)Retrieves an object of the requested type, given a class identifier and an object ID.IndependentObjectgetObject(java.lang.String classIdent, java.lang.String objectIdent)Retrieves an object of the requested type, given class and object identifiers.
-
-
-
Method Detail
-
getObject
IndependentObject getObject(java.lang.String classIdent, java.lang.String objectIdent)
Retrieves an object of the requested type, given class and object identifiers. This method does not verify the existence of the requested object on the server; it simply returns a local reference without making a round-trip to the server. The local reference is not affiliated with an object of this class type until you perform a function on the object (for example, fetch a property value) that causes a round-trip to the Content Engine server.- Parameters:
classIdent- The class name of which this object will be an instance.objectIdent- The ID, path, or name of the object to retrieve.- Returns:
- An object of the type requested.
-
getObject
IndependentObject getObject(java.lang.String classIdent, Id objectId)
Retrieves an object of the requested type, given a class identifier and an object ID. This method does not verify the existence of the requested object on the server; it simply returns a local reference without making a round-trip to the server. The local reference is not affiliated with an object of this class type until you perform a function on the object (for example, fetch a property value) that causes a round-trip to the Content Engine server.- Parameters:
classIdent- The class name of which this object will be an instance.objectId- The ID (GUID) of the object to retrieve.- Returns:
- An object of the type requested.
-
fetchObject
IndependentObject fetchObject(java.lang.String classIdent, java.lang.String objectIdent, PropertyFilter filter)
Retrieves an object of the requested type, given class and object identifiers. This method always makes a round-trip to the server. You can optionally include a filter to control which properties to return with the object. If you pass innullfor thefilterparameter, this method returns values for all non-object properties and returns placeholders for all object-valued properties. For details, see the description of thefilterparameter.- Parameters:
classIdent- The class name of which this object will be an instance.objectIdent- The ID, path, or name of the object to retrieve.filter- APropertyFilterobject that represents information for controlling which property values (and with what level of detail and recursion) to return. Ifnull, this method returns values for all non-object properties and returns placeholders for all object-valued properties (PropertyEngineObjectproperties with a state ofPropertyState.UNEVALUATEDorPropertyState.REFERENCE); any subsequent attempts to access an object-valued property will cause an automatic round-trip to the server to fetch its value.- Returns:
- An object of the type requested.
-
fetchObject
IndependentObject fetchObject(java.lang.String classIdent, Id objectId, PropertyFilter filter)
Retrieves an object of the requested type, given a class identifier and object ID. This method always makes a round-trip to the server. You can optionally include a filter to control which properties to return with the object. If you pass innullfor thefilterparameter, this method returns values for all non-object properties and returns placeholders for all object-valued properties. For details, see the description of thefilterparameter.- Parameters:
classIdent- The class name of which this object will be an instance.objectId- The ID (GUID) of the object to retrieve.filter- APropertyFilterobject that represents information for controlling which property values (and with what level of detail and recursion) to return. Ifnull, this method returns values for all non-object properties and returns placeholders for all object-valued properties (PropertyEngineObjectproperties with a state ofPropertyState.UNEVALUATEDorPropertyState.REFERENCE); any subsequent attempts to access an object-valued property will cause an automatic round-trip to the server to fetch its value.- Returns:
- An object of the type requested.
-
createObject
IndependentObject createObject(java.lang.String classIdent)
Creates a new object of the specified class.- Parameters:
classIdent- The class name of which this object will be an instance.- Returns:
- An object reference of the requested type.
-
createObject
IndependentObject createObject(java.lang.String classIdent, Id objectId)
Creates a new object based on the specified class and ID.- Parameters:
classIdent- The class name of which this object will be an instance.objectId- The ID (GUID) to assign to the new object.- Returns:
- An object reference of the requested type.
-
-