Fundamentally, a document can be thought of as two things:
- The document that the user creates. This document (for example,
a word-processing file, graphic, spreadsheet, or HTML file) is stored
either in the object store's content store or stored externally (for
example, a web page that is referenced by its URL address). In either
case, it becomes known as the Document object's content
element.
- The object that describes the user's document. This object, which
the Content Engine uses to identify
and find that particular version of the user's document, is called
a Document object.
A Document object represents a single version of a document that
is stored in a Content Engine object
store.
Document Object
Characteristics
Document objects include the following
characteristics:
- A document can have zero or more annotations that are associated
with it. See Annotations.
- Operations on a document can be audited. See Auditing.
- A document can be classified automatically when the document is
checked in. See Document Classification.
- You can modify the properties of, create a subclass from, and
add property definitions to a document class definition. See Classes.
- A collection of documents (files) can be assembled to form a single
complete document. See Compound
Documents.
- A document can be filed in a folder, and can participate in dynamic
and static referential containment relationships. See Containment.
- A document can have zero or more content elements that are associated
with it. See Document
Content.
- A document can have zero or more thumbnails that are associated
with it. See Thumbnails.
- A document can subscribe to server-side events that are triggered
when an action (such as deleting or checking in the document) occurs.
See Event Concepts and Subscriptions.
- As with most other Content Engine objects,
you instantiate a document by using a Factory class. See Instantiating Objects.
- An administrator can define discrete stages through which a document passes
(lifecycles), and assign these custom lifecycles to individual documents
or document classes. See Lifecycle
Policies.
- A document can participate in cooperative locking to prevent concurrent
updates to an object by two or more Content Engine API-based applications.
Cooperating applications can lock the Document object, test for locks,
and decide which action to take based on the document's lock state.
See Cooperative Locking.
- Documents have properties that expose and allow manipulation of
their state. See Properties.
- A document can be published. The process of publishing allows
a document to be optionally transformed to another format and made
available to a different audience. See Publishing.
- A document can be searched for and retrieved from an ad hoc query
or from a stored search. The search can be based on document properties,
content, or both. See Queries.
- A document is independently securable. Its initial security comes
from its class. A document can optionally inherit security from a
security parent, have a security policy that is assigned to it, or
both. See Object Security, Security Inheritance, and Security Policies.
- A storage area can be explicitly assigned to a document. You can
also use a storage policy to control storage area assignment. See Document Storage.
- A document can be versioned. See Versioning.
- A document can be the target for a workflow subscription, which
means that the document can have a workflow that is attached to it
that can be either manually started or automatically started when
a subscription event (such as a check-out of the document) occurs.
See Workflow Subscriptions.
Document Content
A
document's content data is represented by a ContentElement object. A document can have zero,
one, or more content elements. The content data that is represented
by the content element can be local to an object store or external
to it and, therefore, outside the control of the Content Engine server. Local content elements
are represented by a ContentTransfer object, while external ones are
represented by a ContentReference object.
Each content element
has an ElementSequenceNumber property that contains a server-generated,
unique, and unchanging identity for the content element. In other
words, even though a content element's relative position within the
list of content elements for a document version might change, its
ElementSequenceNumber would not. For a particular document version,
element sequence numbers are not reused.
Document Storage
An
object store consists of one or more physical locations that are called
storage areas for storing both metadata and content. When you create
a document, you can explicitly assign a storage area to the document.
You can also use a storage policy to control storage area assignment.
A storage policy is user-specified criteria that can be applied to
a document for determining a candidate pool of storage areas.
If
you change the document class of a document object, the storage location
of the existing content of the document object is unchanged. The default
storage area and storage policy, which define where new content is
stored, of the document object’s new class affect only new instances
of the document class. To move content to a different storage location
after a document class change, use the Document.moveContent method.
For a code sample, see Moving
a Document’s Content in the Working with Documents section.
Document Federated Ownership
Federated
content is document content that is stored on another system (for
example,FileNet® Image Services) that
can be accessed from a FileNet P8 object
store, and vice versa. The intent of federation is to provide uniform
access to all content and thereby remove the need for migrating data.
By default, a federated system restricts access to content independently
of where the content might be stored. For example, an Image Services system imposes restrictions
on accessing a document based on Image Services security, regardless
of whether the content for the document resides in a FileNet P8 object store or within
the Image Services system. You
can override this default behavior for specific documents by using
the takeFederatedOwnership method and cause document
content to become read-only when accessed from systems other than FileNet P8 (including content that
is stored on those systems). Such content can be deleted only when
accessed from a FileNet P8 object
store.