com.sap.caf.eu.gp.context.api

Interface IGPUserContext


public interface IGPUserContext

The user context holds context information about a certain user and also provides a possibility for applications to store internal personalization parameters.


Method Summary
 Locale getLocale()
          Returns the current local of the user.
 String getParameterValue(String application, String parameterName)
          Return parameter value in cache or on database.
 IUser getSAPUser()
           
 String getUniqueId()
          Returns the unique id of the user
 String removeParameterValue(String application, String parameterName)
          Remove parameter value from cache.
 void setParameterValue(String application, String parameterName, String parameterValue)
          Add parameter value to cache.
 

Method Detail

getLocale

public Locale getLocale()
Returns the current local of the user.

The locale is derived in the following order (first available entry is returned:


getUniqueId

public String getUniqueId()
Returns the unique id of the user


getParameterValue

public String getParameterValue(String application,
                                String parameterName)
                         throws GPEngineException,
                                GPInvocationException
Return parameter value in cache or on database.

If parameter value is not in cache already it is added.

Parameters:
application - application key
parameterName - name of the configuration parameter
Returns:
value of the configuration parameter (may be null)
Throws:
GPEngineException
GPInvocationException

setParameterValue

public void setParameterValue(String application,
                              String parameterName,
                              String parameterValue)
                       throws GPEngineException,
                              GPInvocationException
Add parameter value to cache.

Parameters:
application - application key
parameterName - name of the configuration parameter
parameterValue - value of the configuration parameter
Returns:
value of the configuration parameter (may be null)
Throws:
GPEngineException
GPInvocationException

removeParameterValue

public String removeParameterValue(String application,
                                   String parameterName)
                            throws GPEngineException,
                                   GPInvocationException
Remove parameter value from cache.

Parameters:
application - application key
parameterName - name of the configuration parameter
Returns:
value of the configuration parameter (may be null)
Throws:
GPEngineException
GPInvocationException

getSAPUser

public IUser getSAPUser()


Copyright 2006 SAP AG Complete Copyright Notice