📄 ipersonalizationcontext.java
字号:
package com.esri.solutions.jitk.common.personalization;
import java.util.Map;
import com.esri.adf.web.data.WebContext;
import com.esri.solutions.jitk.personalization.PersonalizationException;
import com.esri.solutions.jitk.personalization.data.IPersonalizationData;
/**
* Represents an interface to the Personalization framework from the
* Java Web ADF. This interface provides access to the Personalization
* Data as well as storing attributes for Personalization-related data for use
* within the Web ADF. The attributes will not outlive the scope of this
* object.
*/
public interface IPersonalizationContext {
/**
* Retrieves the {@link IPersonalizationData} object for this Context.
* The {@link IPersonalizationData} object provides access to all of
* the Personalization Data for the User.
*
* @return {@link IPersonalizationData} object. <code>null</code> will
* never be returned.
*
* @throws PersonalizationException Thrown if there is a problem
* getting and returning the
* {@link IPersonalizationData} object.
*/
public IPersonalizationData getData () throws PersonalizationException;
/**
* Sets a personalization attribute within this personalization context.
* The attribute will not outlive the scope of this object.
*
* @param key Name of the attribute, cannot be <code>null</code>.
* @param value Value of the attribute, can be <code>null</code>.
*/
public void setAttribute (String key, Object value);
/**
* Sets multiple personalization attributes within this personalization
* context. The attributes will not outlive the scope of this
* object.
*
* @param attrs Contains multiple attributes and their values, cannot
* be <code>null</code>.
*/
public void setAttributes (Map<? extends String, ? extends Object> attrs);
/**
* Returns the personalization attribute value given its name.
*
* @param key Name of the attribute, cannot be <code>null</code>.
* @return
*/
public Object getAttribute (String key);
/**
* Returns all of the personalization attributes and their values.
*
* @return Personalization attributes and values. <code>null</code> will
* never be returned.
*/
public Map<String, Object> getAttributes ();
/**
* Returns a reference to the {@link WebContext} object that is associated
* with this Personalization Context.
*
* @return Reference to {@link WebContext}.
*/
public WebContext getWebContext ();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -