Show TOC

Personalization Persistence API (P13N)Locate this document in the navigation structure

Use

Personalization is the process of adapting an application or a user interface to user-specific needs.

You as an application developer can personalize standalone Web Dynpro Java applications, or applications integrated into the portal. For the second option, see Personalization .

Using the personalization persistence API, you get a Web Dynpro runtime interface that lets you determine whether personalization shall run in administrator mode only, or not. And you configure the personalization persistence by using URL parameters or application properties where a URL parameter always overrides an application property.

Parameters and Properties

Client-side URL parameters are available as following:

  • sap-wd-p13n-pers-dc

  • sap-wd-p13n-pers-class

Alternatively, use application properties which you define as described in Defining Application Properties for the application:

  • sap.wd.p13n.pers.dc

  • sap.wd.p13n.pers.class

If either the development component (DC) name or the class name is not specified, no custom-provided persistence is used at all.

Class Information

Class

Methods

Description

WDPersonalization Persistence

checkPersonalizationAllowed()

commit()

deletePersonalizationAttributes(

IWDPersonalizationAttributeId prefix

)

exit()

getHelper()

getSupportInformation()

init(IWDPersonalizationPersistenceParameters

parameters)

isAdminPersonalization()

onFinishedReading()

readPersonalizationAttributes(

IWDPersonalizationAttributeId prefix,

boolean readonly, Locale locale, boolean

resolveLocale)

writePersonalizationAttribute(

IWDPersonalizationAttribute attribute

)

Abstract base class for personalization persistence implementations.

To avoid name clashes, all methods must be prefixed by an underscore character ("_").

Interface Information

Interface

Methods

Description

IWDPersonalization Attribute

http://127.0.0.1:3179/help/topic/com.sap.netweaver.developerstudio.webdynpro.doc.user/api/wdr/com/sap/tc/webdynpro/services/p13n/api/IWDPersonalizationAttribute.htmlInformation published on non-SAP site

getId()

getLocale()

getValue()

isFinalized()

A finalized attribute cannot be changed anymore on the next level of personalization. Return of locale: If the attribute is locale dependent, otherwise null.

IWDPersonalization AttributeId

http://127.0.0.1:3179/help/topic/com.sap.netweaver.developerstudio.webdynpro.doc.user/api/wdr/com/sap/tc/webdynpro/services/p13n/api/IWDPersonalizationAttributeId.htmlInformation published on non-SAP site

getIdPart(int index)

getLocation()

isPrefixOf(

IWDPersonalizationAttributeId id

)

size()

Consists of a location that describes the base storage of the personalization data like "global for application, for example, or "local for specific UI fragment". Contains furthermore an ordered list of additional id parts, this list describes the path of the personalization data within a location.

IWDPersonalization PersistenceParameters

http://127.0.0.1:3179/help/topic/com.sap.netweaver.developerstudio.webdynpro.doc.user/api/wdr/com/sap/tc/webdynpro/services/p13n/api/IWDPersonalizationPersistenceParameters.htmlInformation published on non-SAP site

init()

exit()

readPersonalizationAttributes()

writePersonalizationAttribute()

deletePersonalizationAttributes()

commit()

onFinishedReading()

isAdminPersonalization()

checkPersonalizationAllowed()

getSupportInformation()

getHelper()

Interface for a callback object which is provided to the personalization persistence directly after initialization.

Provides all necessary information to the personalization persistence that might be important to find the personalization data, to decide whether the application runs in Administrator mode.

WDPersonalizationPersistence

getApplicationDeployableObject()

getApplicationName()

getParameterValue(String

parameter)

getParameterValues(String

parameter)

getSessionLocale()

getUser()

Constructor file which initializes the persistence. The default constructor needs to be provided without any parameters. All parameters which are necessary for the personalization persistence are provided with the init method.

WDPersonalization Persistence.IWDHelper

http://127.0.0.1:3179/help/topic/com.sap.netweaver.developerstudio.webdynpro.doc.user/api/wdr/com/sap/tc/webdynpro/services/p13n/api/WDPersonalizationPersistence.IWDHelper.htmlInformation published on non-SAP site

createAttributeInstance(

IWDPersonalizationAttributeId

id, String value, Locale

locale, boolean finalized)

createIdInstance(String

location, List<String>

idParts)

Provides methods for creating new personalization attributes and of new personalization attribute ids, both with the specified parameters.