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. AnInstantiatingScope
can instantiate only those objects within its scope. For example, aDocument
object 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
Factory
methods for the specific object type.Factory
methods are more convenient and provide type safety. TheFactory
method results do not have to be cast and programming errors on the returned type may be caught at build time instead of runtime. TheFactory
methods also avoid the inconvenience (and potential for error) of specifying the type.
-
-
Method Summary
Methods Modifier and Type Method and Description IndependentObject
createObject(java.lang.String classIdent)
Creates a new object of the specified class.IndependentObject
createObject(java.lang.String classIdent, Id objectId)
Creates a new object based on the specified class and ID.IndependentObject
fetchObject(java.lang.String classIdent, Id objectId, PropertyFilter filter)
Retrieves an object of the requested type, given a class identifier and object ID.IndependentObject
fetchObject(java.lang.String classIdent, java.lang.String objectIdent, PropertyFilter filter)
Retrieves an object of the requested type, given class and object identifiers.IndependentObject
getObject(java.lang.String classIdent, Id objectId)
Retrieves an object of the requested type, given a class identifier and an object ID.IndependentObject
getObject(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 innull
for thefilter
parameter, this method returns values for all non-object properties and returns placeholders for all object-valued properties. For details, see the description of thefilter
parameter.- 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
- APropertyFilter
object 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 (PropertyEngineObject
properties with a state ofPropertyState.UNEVALUATED
orPropertyState.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 innull
for thefilter
parameter, this method returns values for all non-object properties and returns placeholders for all object-valued properties. For details, see the description of thefilter
parameter.- Parameters:
classIdent
- The class name of which this object will be an instance.objectId
- The ID (GUID) of the object to retrieve.filter
- APropertyFilter
object 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 (PropertyEngineObject
properties with a state ofPropertyState.UNEVALUATED
orPropertyState.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.
-
-