com.sap.portal.pcm

Interface IAttributes

All Known Subinterfaces:
IApplicationPage, IAttributeSet, IiView, ILayout, IMutableAttributes, IPage, ISystem

public interface IAttributes

Simple set of attributes, with support for locale-specific text attributes.

See Also:
IAttributeSet

Field Summary
static String ADMINISTRATION
          A constant that represents a meta-attribute that controls visibility and editability of a property in the administration property editor (design-time).
static int ATTRIBUTE_NOT_FOUND
          A constant that indicates that a specific attribute is not defined for the object.
static String DIALOG
          A constant that represents a valid value for the PERSONALIZATION and ADMINISTRATION meta-attributes.
static String DIALOG_READ_ONLY
          A constant that represents a valid value for the PERSONALIZATION and ADMINISTRATION meta-attributes.
static String NONDIALOG
          A constant that represents a valid value for the PERSONALIZATION and ADMINISTRATION meta-attributes.
static String NONE
          A constant that represents a valid value for the PERSONALIZATION meta-attribute.
static String PERSONALIZATION
          A constant that represents a meta-attribute that controls visibility and editability of a property in the personalization property editor (runtime).
static int STRING_ATTRIBUTE
          A constant that represents a string-type attribute, meaning, a non-translatable attribute such as a folder location.
static int TEXT_ATTRIBUTE
          A constant that represents a text-type attribute, meaning, a translatable attribute such as name and description.
 
Method Summary
 String getAttribute(String attributeId)
          Gets the value of a string type attribute.
 String getAttribute(String attributeId, Locale locale)
          Gets the value of the specified text-type attribute according to the specified locale.
 Enumeration getAttributeIds()
          Gets the IDs of the data attributes of the object.
 int getAttributeType(String attributeId)
          Gets the type of the specified attribute, if it exists.
 Locale[] getAvailableAttributeLocales(String attributeId)
          Gets the locale objects defined for a text-type attribute.
 Locale[] getAvailableMetaAttributeLocales(String attributeId, String metaAttributeId)
          Gets the locale objects defined for a text-type meta-attribute.
 String getMetaAttribute(String attributeId, String metaAttributeId)
          Gets the value of a string-type meta attribute.
 String getMetaAttribute(String attributeId, String metaAttributeId, Locale locale)
          Gets the value of the specified text type meta-attribute according to the specified locale.
 Enumeration getMetaAttributeIds(String attributeId)
          Gets the IDs of the meta-attributes of the attribute.
 int getMetaAttributeType(String attributeId, String metaAttributeId)
          Gets the type of the specified meta-attribute, if it exists.
 

Field Detail

ATTRIBUTE_NOT_FOUND

static final int ATTRIBUTE_NOT_FOUND
A constant that indicates that a specific attribute is not defined for the object.

Used as a returned value for methods getAttributeType(java.lang.String) and getMetaAttributeType(java.lang.String, java.lang.String).

See Also:
Constant Field Values

STRING_ATTRIBUTE

static final int STRING_ATTRIBUTE
A constant that represents a string-type attribute, meaning, a non-translatable attribute such as a folder location.

Used as a returned value for methods getAttributeType(java.lang.String) and getMetaAttributeType(java.lang.String, java.lang.String).

See Also:
Constant Field Values

TEXT_ATTRIBUTE

static final int TEXT_ATTRIBUTE
A constant that represents a text-type attribute, meaning, a translatable attribute such as name and description.

When adding or obtaining a value of type text, a locale must be specified.

Used as a returned value for methods getAttributeType(java.lang.String) and getMetaAttributeType(java.lang.String, java.lang.String).

See Also:
Constant Field Values

ADMINISTRATION

static final String ADMINISTRATION
A constant that represents a meta-attribute that controls visibility and editability of a property in the administration property editor (design-time).

See Also:
Constant Field Values

PERSONALIZATION

static final String PERSONALIZATION
A constant that represents a meta-attribute that controls visibility and editability of a property in the personalization property editor (runtime).

See Also:
Constant Field Values

NONE

static final String NONE
A constant that represents a valid value for the PERSONALIZATION meta-attribute.

When PERSONALIZATION is set to this value, the property is not shown in the property editor and cannot be changed via the API.

See Also:
Constant Field Values

NONDIALOG

static final String NONDIALOG
A constant that represents a valid value for the PERSONALIZATION and ADMINISTRATION meta-attributes.

When PERSONALIZATION or ADMINISTRATION is set to this value, the property is not shown in the property editor.

See Also:
Constant Field Values

DIALOG_READ_ONLY

static final String DIALOG_READ_ONLY
A constant that represents a valid value for the PERSONALIZATION and ADMINISTRATION meta-attributes.

When PERSONALIZATION or ADMINISTRATION is set to this value, the property is shown as read-only in the property editor.

See Also:
Constant Field Values

DIALOG

static final String DIALOG
A constant that represents a valid value for the PERSONALIZATION and ADMINISTRATION meta-attributes.

When PERSONALIZATION or ADMINISTRATION is set to this value, the property is shown and editable in the property editor.

See Also:
Constant Field Values
Method Detail

getAttributeIds

Enumeration getAttributeIds()
Gets the IDs of the data attributes of the object.

The meta-attributes are not listed in the returned enumeration.

Returns:
an enumeration of String objects for all data attributes of the object

getAttributeType

int getAttributeType(String attributeId)
Gets the type of the specified attribute, if it exists. Either STRING_ATTRIBUTE or TEXT_ATTRIBUTE.

A text attribute is an attribute that holds translatable values like name and description.

A string attribute is an attribute that holds non-translatable values, like folder location.

Parameters:
attributeId - the ID of the attribute
Returns:
the type of the specified attribute, if it exists; ATTRIBUTE_NOT_FOUND otherwise

getAttribute

String getAttribute(String attributeId)
Gets the value of a string type attribute.

Parameters:
attributeId - the ID of the attribute
Returns:
the value of the attribute; null if the attribute does not exist or is of type text

getAttribute

String getAttribute(String attributeId,
                    Locale locale)
Gets the value of the specified text-type attribute according to the specified locale.

The fallback rules of the locale depend on the persistency provider.

Parameters:
attributeId - the ID of the attribute
locale - the preferred locale
Returns:
the best fitting value for the preferred locale

getMetaAttributeIds

Enumeration getMetaAttributeIds(String attributeId)
Gets the IDs of the meta-attributes of the attribute.

Parameters:
attributeId - the ID of an attribute
Returns:
the meta-attributes for the specified attribute
See Also:
getAttributeIds()

getMetaAttributeType

int getMetaAttributeType(String attributeId,
                         String metaAttributeId)
Gets the type of the specified meta-attribute, if it exists. Either STRING_ATTRIBUTE or TEXT_ATTRIBUTE.

Parameters:
attributeId - the ID of an attribute
metaAttributeId - the ID of the meta-attribute
Returns:
the type of the meta-attribute, if it exists; ATTRIBUTE_NOT_FOUND otherwise

getMetaAttribute

String getMetaAttribute(String attributeId,
                        String metaAttributeId)
Gets the value of a string-type meta attribute.

Parameters:
attributeId - the ID of an attribute
metaAttributeId - the ID of the meta-attribute
Returns:
the value of the meta-attribute; null if the attribute does not exist or is of type text
See Also:
getAttribute(java.lang.String)

getMetaAttribute

String getMetaAttribute(String attributeId,
                        String metaAttributeId,
                        Locale locale)
Gets the value of the specified text type meta-attribute according to the specified locale.

The fallback rules of the locale depend on the persistency provider.

Parameters:
attributeId - the ID of an attribute
metaAttributeId - the ID of the meta-attribute
locale - the preferred locale
Returns:
the value of the meta attribute; null if the attribute does not exist or is of type text
See Also:
getAttribute(java.lang.String)

getAvailableAttributeLocales

Locale[] getAvailableAttributeLocales(String attributeId)
Gets the locale objects defined for a text-type attribute.

Parameters:
attributeId - the ID of the attribute
Returns:
an array of Locale objects for which a value is defined for the specified attribute

getAvailableMetaAttributeLocales

Locale[] getAvailableMetaAttributeLocales(String attributeId,
                                          String metaAttributeId)
Gets the locale objects defined for a text-type meta-attribute.

Parameters:
attributeId - the ID of an attribute
metaAttributeId - the ID of the meta-attribute
Returns:
an array of Locale objects for which a value is defined for the specified meta-attribute
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] tc/epbc/pcm/admin/public/api api EP-PIN
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2011 SAP AG Complete Copyright Notice