Unified API Developer Manual / Version 2107
Table Of Contents
In addition to the simple string identifiers described in Section 4.6, “Identifiers and Equality”,
every ContentObject on the Content Management Server has a UUID
since version 2004.1. UUIDs are stable and universally unique identifiers as defined in RFC 4122 and are
represented as java.lang.UUID
. They are not meant as replacement of simple string IDs,
and should not be used where a simple ID is sufficient. UUIDs make sense in certain scenarios where uniqueness
across multiple repositories is important, or when content objects may be transferred to another repository and
should keep their identity. For details see:
Section 3.13.2.17, “Serverimport/Serverexport” in Content Server Manual.
Similar to string IDs, the API provides a getUuid()
method in class
ContentObject
to retrieve a UUID, and methods to look up a Content
or Version
for a given UUID. A Content
with a given UUID can be
retrieved from the ContentRepository with method getContent(UUID)
.
A Version
with a given UUID can be retrieved from its containing
Content
with method getVersion(UUID)
. It is important to note,
that a UUID does not encode information about the location of the ContentObject
.
By itself, it cannot be used to identify the repository or even the containing Content
of a Version
.
Note, that as of version 2004.1, UUIDs are only available on the Content Management Server. If a connection is made to a live server, or to a server of a previous release, then all methods that would return a UUID will return null instead.