org.eclipse.stardust.engine.core.preferences
Class Preferences

java.lang.Object
  extended by org.eclipse.stardust.engine.core.preferences.Preferences
All Implemented Interfaces:
Serializable

public class Preferences
extends Object
implements Serializable

A runtime object holding a map of preferences in form of a Map. This map of preferences is identified by a moduleId, preferencesId and a PreferencesScope where depending on the PreferencesScope partitionId, realmId and userId are also used.

See Also:
Serialized Form

Constructor Summary
Preferences(PreferenceScope scope, String moduleId, String preferencesId, Map<String,Serializable> preferences)
           
 
Method Summary
 String getModuleId()
          The moduleId used as a first identifier for the preferences.
 String getPartitionId()
           
 org.eclipse.stardust.engine.core.preferences.PreferenceCacheHint getPreferenceCacheHint()
          Holds information for cache synchronization.
 Map<String,Serializable> getPreferences()
          Retrieves the map of preferences.
 String getPreferencesId()
          The preferencesId is used as second identifier for the preferences.
 String getRealmId()
          Returns the realmId if valid for the PreferencesScope.
 PreferenceScope getScope()
          The scope the preferences are stored in.
 String getUserId()
          Returns the userId if valid for the PreferencesScope.
 void setModuleId(String moduleId)
          The moduleId used as a first identifier for the preferences.
 void setPartitionId(String partitionId)
          This value cannot be changed from client-side, it is only set on server-side.
 void setPreferenceCacheHint(org.eclipse.stardust.engine.core.preferences.PreferenceCacheHint preferenceCacheHint)
          Internally used.
 void setPreferences(Map<String,Serializable> preferences)
          Sets the map of preferences.
 void setPreferencesId(String preferencesId)
          The preferencesId is used as second identifier for the preferences.
 void setRealmId(String realmId)
          Sets the realmId.
 void setScope(PreferenceScope scope)
          The scope the preferences are stored in.
 void setUserId(String userId)
          Sets the userId.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Preferences

public Preferences(PreferenceScope scope,
                   String moduleId,
                   String preferencesId,
                   Map<String,Serializable> preferences)
Method Detail

getPreferences

public Map<String,Serializable> getPreferences()
Retrieves the map of preferences.

Returns:
The map of preferences.

setPreferences

public void setPreferences(Map<String,Serializable> preferences)
Sets the map of preferences.

Parameters:
preferences - The map of preferences.

getModuleId

public String getModuleId()
The moduleId used as a first identifier for the preferences.

Returns:
The moduleId.

setModuleId

public void setModuleId(String moduleId)
The moduleId used as a first identifier for the preferences. May not be null.

Parameters:
moduleId - The moduleId.

getPreferencesId

public String getPreferencesId()
The preferencesId is used as second identifier for the preferences.

Returns:
The preferencesId.

setPreferencesId

public void setPreferencesId(String preferencesId)
The preferencesId is used as second identifier for the preferences. May not be null.

Parameters:
preferencesId - The preferencesId.

getScope

public PreferenceScope getScope()
The scope the preferences are stored in.

Returns:
The PreferencesScope.

setScope

public void setScope(PreferenceScope scope)
The scope the preferences are stored in.

Parameters:
scope - The PreferencesScope.

getPartitionId

public String getPartitionId()
Returns:
The partitionId the preferences are stored in.

setPartitionId

public void setPartitionId(String partitionId)
This value cannot be changed from client-side, it is only set on server-side. The partitionId is internally determined by the logged in user's partition.

Parameters:
partitionId - The partitionId.

getRealmId

public String getRealmId()
Returns the realmId if valid for the PreferencesScope.

Returns:
The realmId of the preferences.

setRealmId

public void setRealmId(String realmId)
Sets the realmId. Only valid in USER, REALM PreferencesScopes. Changing this value is restricted to administrators.

Parameters:
realmId - The realmId of the preferences.

getUserId

public String getUserId()
Returns the userId if valid for the PreferencesScope.

Returns:
Id of the user

setUserId

public void setUserId(String userId)
Sets the userId. Only valid in USER PreferencesScope. Changing this value is restricted to administrators.

Parameters:
userId - Id of the user

getPreferenceCacheHint

public org.eclipse.stardust.engine.core.preferences.PreferenceCacheHint getPreferenceCacheHint()
Holds information for cache synchronization.

Returns:
Preference cache information

setPreferenceCacheHint

public void setPreferenceCacheHint(org.eclipse.stardust.engine.core.preferences.PreferenceCacheHint preferenceCacheHint)
Internally used.

Parameters:
preferenceCacheHint -


Copyright © 2017 Eclipse Stardust. All Rights Reserved.