org.exoplatform.commons.api.settings.data
Class SettingContext

java.lang.Object
  extended by org.exoplatform.commons.api.settings.data.SettingContext
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SettingScope

public class SettingContext
extends Object
implements Serializable

Associates setting properties with a specified context (GLOBAL/USER). This is used to specify context of setting properties at the Context level when working with database and cache or dispatching the setting event.

See Also:
Serialized Form

Field Summary
protected  Context context
          Context of the setting object.
protected  String ContextPath
          Path of the context in JCR.
protected  String repositoryName
          Name of the repository in JCR.
 
Constructor Summary
SettingContext(Context context)
          Creates a SettingContext object with a specified context type.
 
Method Summary
 boolean equals(Object obj)
          Compares a specified object with the SettingContext for equality.
 Context getContext()
          Gets a context object associated with the SettingContext object.
 String getContextPath()
          Gets path of the SettingContext object.
static String getCurrentRepositoryName()
          Gets the current repository name.
 String getRepositoryName()
          Gets a repository name associated with the SettingContext object.
 int hashCode()
          Returns the hash code value for the SettingContext object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

repositoryName

protected String repositoryName
Name of the repository in JCR.


context

protected Context context
Context of the setting object.


ContextPath

protected String ContextPath
Path of the context in JCR.

Constructor Detail

SettingContext

public SettingContext(Context context)
Creates a SettingContext object with a specified context type.

Parameters:
context - The context type.
Method Detail

equals

public boolean equals(Object obj)
Compares a specified object with the SettingContext for equality.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns the hash code value for the SettingContext object.

Overrides:
hashCode in class Object

getContextPath

public String getContextPath()
Gets path of the SettingContext object.

Returns:
The setting context path.

getRepositoryName

public String getRepositoryName()
Gets a repository name associated with the SettingContext object.

Returns:
The repository name.

getContext

public Context getContext()
Gets a context object associated with the SettingContext object.

Returns:
The context object.

getCurrentRepositoryName

public static String getCurrentRepositoryName()
Gets the current repository name.



Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.