Alfred API Concepts

Alfred API is composed of two logical layers.

  • The base layer is a Java API built on top of the Alfresco.
  • A REST API is built on top of the Java abstraction layer, exposing a stable HTTP API.

Instead of mirroring the Alfresco API one-to-one, Alfred API groups frequently used operations together in a single method call. This allows you to focus on business concerns instead of focusing on fetching all required data from Alfresco.

For example, the NodeService.getMetadata() method returns an object with all metadata about a node: its type, aspects and properties in a single function call. It groups together the information that would otherwise have to be obtained by combining requests for type, aspects and properties separately.

Data objects

Alfred API has data objects that mirror the Alfresco concepts of QName, NodeRef, StoreRef, Path, ContentData and ContentInputStream. These data objects are used to communicate with the Alfred Java API without being dependent on Alfresco data types.

Conversion between Alfresco and Alfred API data objects is the responsibility of the AlfredApiToAlfrescoConversion service. It is also possible to construct an Alfred API data object by passing its string representation to the constructor.