close

Filter

loading table of contents...

Unified API Developer Manual / Version 2301

Table Of Contents

5.2 UUIDs

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 also available for ContentObjects on the Master Live Server and Replication Live Servers, if they have been created by publication or replication with release 2210.1 or newer. Contents that have initially been created on a Live Server with release before 2210.1 only have UUIDs on that Live Server, if UUIDs have been synchronized as described in Section 3.13.2.4, “Content UUID Migration and Transfer in Content Server Manual.

UUIDs are stable and universally unique identifiers as defined in RFC 4122 and are represented as java.lang.UUID. UUIDs are a good choice for referencing content in an external system or store, like in a database or file. 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.

UUIDs are generated by the Content Management Server and automatically assigned to newly created content items. If needed, method uuid(UUID) of the ContentBuilder interface can be used to create content with a predefined UUID. This API can be used in custom code, for example to copy content from one server to another and preserve UUIDs. Note however, that it is not possible to change the UUID of existing content.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.