Show TOC

Configuring the Naming Conventions ServiceLocate this document in the navigation structure

Use

The naming convention feature is controlled by the NamingConventionsSrv portal service of the com.sap.portal.namingconventions application.

You can set the following service properties:

Property

Description

Activate namespaces

Activates the naming convention feature. When the feature is activated, administrators can no longer enter any string as the namespace in an object ID, but must select a namespace from a list.

Mode

Specifies whether the namespace is based on the PCD path of the object or on the user .

XML file (for user mode only)

Specifies the XML file that defines which users have access to which namespaces. The file path is relative to:

root\portalapps\com.sap.portal.namingconventions\xml

The default XML file is default.xml .

Handler ID

Specifies the name of the custom handler for determining the namespace naming convention.

The default handler is default .

You can base the namespace on:

  • The location of the object in the PCD.

    For example, if you create an object in the folder structure Start of the navigation path portal_content Next navigation step myFolder1 Next navigation step myFolder2 End of the navigation path, the namespace must be myFolder1.myFolder2 .

  • An object ID on the principal (user, group, or role) currently creating or changing the object. This option restricts administrators to selecting one of the predefined namespaces.

    For example, the namespace for a content administrator may be admin.content , whereas a super administrator can select either admin or admin.content .

    To use this option, you need to provide an XML file that defines a set of valid namespaces for each principal.

Procedure

Basing the Namespace on a PCD Location

In the NamingConventionsSrv service, set the following properties:

  • Activate namespaces : true

  • Mode : path

Basing the Namespace on a Principal:

  1. In the NamingConventionsSrv service, set the following properties:

    • Activate namespaces : true

    • Mode : user

    • XML File : The path of the XML file that contains the rules for namespaces

  2. Create an XML file that defines the rules for namespaces. The XML file contains the following tags:

    Tag

    Definition

    definitions

    The root element.

    namespace

    All principals (users, groups or roles) that are defined in the body of the tag are authorized to use this namespace.

    principal

    A user, group or role that is authorized to use the namespace.

    The following attributes are defined for this tag:

    • uniqueName (required): The name of a user (user ID), group (group ID) or role (PCD address).

    • typeID (required): The type of principal.

    • scope (optional): Indicates that the user, group or role is authorized to use the current namespace but no additional namespaces that are defined within subelements.

  3. Place the xml file in the location defined by the XML file property in the naming conventions service.

For more information about this option, and for an example of the XML file, see Basing the Namespace Convention on a Principal .