You are here


Provides access to and definition of namespace URIs and Prefixes.
Information NamespaceService
Support Status Full Support
Architecture Information Platform Architecture

The NamespaceService has constants defined for the major namespaces used by internal Alfresco content models, including the prefixes for those.

Alfresco Community Edition namespaces start with

The top-level namespace sub-divisions are:

  • model - identify a data model
  • view - identify a view of content held in the repository
  • ws - identify a Web Service definition
  • test - identify a test definition

Each namespace typically ends with its version number.


Note: This list will expand / change between now and the next release.

Namespace Common Prefix Description alf General Namespace d Data Dictionary model sys Repository system model cm Content Domain model app Application model bpm Business Process Model st Site Model fm Forum Model usr User model (in repository.jar) view Import / Export View act Action service model rule Rule service model auth Authentication Web Service rep Repository Web Service content Content Web Service author Authoring Web Service cls Classification Web Service cml Content Manipulation Language cm Web Service Content Domain Model wf Workflow Model (link is to the simple workflow model, not generally extended)
Deployment - App Server It is not likely that you will deploy Java extensions directly into a Tomcat application server as classes and Spring context files. Use an SDK build project instead.
Deployment All-in-One SDK project.
  • Java source code: aio/platform-jar/src/main/java/{domain specific package path}
  • Spring beans: aio/platform-jar/src/main/resources/alfresco/module/platform-jar/context/service-context.xml
Java API Java API Documentation
Java example

It's common to use the NamespaceService to get to prefixes for content models, such as in this example:

String companyHomePath = serviceRegistry.getNodeService().getPath(companyHome)

This code would result in companyHomePath being set to /app:company_home.

Another example usage is the following code that uses the NamespaceService when a QName is created:

String name = "aName";
QName aQName = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, QName.createValidLocalName(name));

This code would result in aQName being set to {}aName.

More Information

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.