Class Factory.Document
- java.lang.Object
-
- com.filenet.api.core.Factory.Document
-
- Enclosing class:
- Factory
public static class Factory.Document extends java.lang.Object
-
-
Method Summary
Methods Modifier and Type Method and Description static Document
createInstance(ObjectStore os, java.lang.String classId)
Creates a new instance of the subclassableDocument
class to be persisted in the specified object store.static Document
createInstance(ObjectStore os, java.lang.String classId, Id id)
Creates a new instance of the subclassableDocument
class to be persisted in the specified object store.static Document
createInstance(ObjectStore os, java.lang.String classId, Id id, Id versionSeriesId, ReservationType reservationType)
Creates a new instance of the subclassableDocument
class, to be persisted in the specified object store.static Document
fetchInstance(ObjectStore os, Id objectId, PropertyFilter filter)
Retrieves an object of theDocument
class by the specified object ID from the specified object store.static Document
fetchInstance(ObjectStore os, java.lang.String path, PropertyFilter filter)
Retrieves an object of theDocument
class as specified by a path and an object store.static Document
getInstance(ObjectStore os, java.lang.String className, Id objectId)
Constructs an instance of the subclassableDocument
class from the specified object store.static Document
getInstance(ObjectStore os, java.lang.String className, java.lang.String path)
Retrieves the instance of the subclassableDocument
class as specified by a path and an object store.
-
-
-
Method Detail
-
getInstance
public static Document getInstance(ObjectStore os, java.lang.String className, java.lang.String path)
Retrieves the instance of the subclassableDocument
class as specified by a path and an object store. 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:
os
- TheObjectStore
object in which this class instance is located.className
- The type of class of the object to retrieve, which can be specified as the class name constant or the symbolic name for the class.path
- The path of the object to retrieve.- Returns:
- An object of the requested type.
-
fetchInstance
public static Document fetchInstance(ObjectStore os, java.lang.String path, PropertyFilter filter)
Retrieves an object of theDocument
class as specified by a path and an object store. 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 more information, see the description of thefilter
parameter.- Parameters:
os
- TheObjectStore
object in which this class instance is located.path
- The path 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 requested type.
-
createInstance
public static Document createInstance(ObjectStore os, java.lang.String classId, Id id, Id versionSeriesId, ReservationType reservationType)
Creates a new instance of the subclassableDocument
class, to be persisted in the specified object store. Once you create an object, it does not yet exist in an object store. To persist the created object to the object store, you must explicitly call thesave
method, or commit the object via a batch operation. Both approaches cause a round-trip to the server.The
classId
parameter is the identifier for the type of class to be instantiated. The identifier can be specified as the class name constant or the symbolic name for the class. It can also benull
, in which case an object of the base class type is returned. Specifying an ID (GUID) for this instance via the id parameter is optional; if one is not specified, an ID for the new object is automatically generated. When this object is created, an associatedVersionSeries
object is also created to hold the document versions of this object. Optionally specifying an ID (GUID) via theversionSeriesId
parameter will assign an ID to the newly createdVersionSeries
object; if one is not specified, an ID for the newVersionSeries
object is automatically generated. ThereservationType
parameter specifies aReservationType
constant to indicate the type of reservation for the new object (collaborative or exclusive) or whether the reservation type is the same as the default object store setting. A collaborative reservation is a reservation that any user with the appropriate permissions can check in, modify, or delete. An exclusive reservation is a reservation that only the user who creates the reservation can check in, modify, or delete.- Parameters:
os
- TheObjectStore
object in which this class instance is located.classId
- The identifier for the type of class to be instantiated.id
- An optional ID to assign to the new object.versionSeriesId
- An optional ID to assign to the newVersionSeries
object.reservationType
- The type of reservation for the new object.- Returns:
- An object reference to a new instance of this class.
-
getInstance
public static Document getInstance(ObjectStore os, java.lang.String className, Id objectId)
Constructs an instance of the subclassableDocument
class from the specified object store. 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:
os
- The object store for this instance.className
- The name of the class.objectId
- The ID (GUID) of this class instance. Specifying an ID for this instance is optional; if one is not specified, an ID for the new object is automatically generated.- Returns:
- A reference to an object of the requested type.
-
fetchInstance
public static Document fetchInstance(ObjectStore os, Id objectId, PropertyFilter filter)
Retrieves an object of theDocument
class by the specified object ID from the specified object store. 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:
os
- TheObjectStore
object in which this class instance is located.objectId
- The ID (GUID) of the class instance 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 requested type.
-
createInstance
public static Document createInstance(ObjectStore os, java.lang.String classId)
Creates a new instance of the subclassableDocument
class to be persisted in the specified object store. The presence of aclassId
parameter on acreateInstance
method indicates that the type of class being created is subclassable. The created object does not yet exist in an object store. To persist the created object to the object store, you must explicitly call thesave
method, or commit the object via a batch operation. Both approaches cause a round-trip to the server.One form of this method takes object store and class ID arguments, and another form takes object store, class ID, and object ID (GUID) arguments. Specifying an ID for this instance is optional; if one is not specified, an ID for the new object is automatically generated.
The
classId
parameter is the identifier for the type of class to be created. The identifier can be specified as the class name constant or the symbolic name for the class. It can also benull
, in which case an object of the base class type is returned.- Returns:
- An object reference to a new instance of this class.
- See Also:
ClassNames
,ClassDescription.get_SymbolicName
-
createInstance
public static Document createInstance(ObjectStore os, java.lang.String classId, Id id)
Creates a new instance of the subclassableDocument
class to be persisted in the specified object store. The presence of aclassId
parameter on acreateInstance
method indicates that the type of class being created is subclassable. The created object does not yet exist in an object store. To persist the created object to the object store, you must explicitly call thesave
method, or commit the object via a batch operation. Both approaches cause a round-trip to the server.One form of this method takes object store and class ID arguments, and another form takes object store, class ID, and object ID (GUID) arguments. Specifying an ID for this instance is optional; if one is not specified, an ID for the new object is automatically generated.
The
classId
parameter is the identifier for the type of class to be created. The identifier can be specified as the class name constant or the symbolic name for the class. It can also benull
, in which case an object of the base class type is returned.- Returns:
- An object reference to a new instance of this class.
- See Also:
ClassNames
,ClassDescription.get_SymbolicName
-
-