com.plumtree.portaluiinfrastructure.tags.helper
Class SharedStateVariable

java.lang.Object
  extended by com.plumtree.portaluiinfrastructure.tags.helper.SharedStateVariable

public class SharedStateVariable
extends java.lang.Object

This class wraps shared state variables and tracking information to provide edit access checks.

Author:
DonH

Field Summary
protected  java.lang.Object m_oValue
          The actual value to be stored.
protected  java.lang.String m_strOwningLibraryName
          The name of the library that has edit access to this object.
 
Constructor Summary
SharedStateVariable(java.lang.Object _oValue)
          Construct a new SharedStateVariable for an object with no edit access restrictions.
SharedStateVariable(java.lang.String _strOwningLibraryName, java.lang.Object _oValue)
          Construct a new SharedStateVariable for an object with edit access restricted to the owning library only.
 
Method Summary
 void CheckHasEditAccess(java.lang.String _strCurrentLibraryName, java.lang.String _strKey, java.lang.String _strCurrentTagName)
          Check whether or not the specified library has edit access to this object.
 java.lang.Object GetValue()
          Gets the value of the stored object.
 boolean IsAccessRestricted()
          Check whether or not access is restricted to a particular library in this shared state variable.
 void SetValue(java.lang.Object _value)
          Updates the value of the stored object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_oValue

protected java.lang.Object m_oValue
The actual value to be stored.


m_strOwningLibraryName

protected java.lang.String m_strOwningLibraryName
The name of the library that has edit access to this object. If this is null, it means all libraries have edit access.

Constructor Detail

SharedStateVariable

public SharedStateVariable(java.lang.Object _oValue)
Construct a new SharedStateVariable for an object with no edit access restrictions.

Parameters:
_oValue - The actual value to be stored.

SharedStateVariable

public SharedStateVariable(java.lang.String _strOwningLibraryName,
                           java.lang.Object _oValue)
Construct a new SharedStateVariable for an object with edit access restricted to the owning library only.

Parameters:
__strOwningLibraryName - The name of the owning library with edit access.
_oValue - The actual value to be stored.
Method Detail

CheckHasEditAccess

public void CheckHasEditAccess(java.lang.String _strCurrentLibraryName,
                               java.lang.String _strKey,
                               java.lang.String _strCurrentTagName)
Check whether or not the specified library has edit access to this object.

Parameters:
_strCurrentLibraryName - The name of the library to check security for.
_strKey - The key used to access this variable. This is used for error reporting purposes only.
__strCurrentTagName - The name of the current tag. This is used for error reporting purposes only.
Throws:
XPIllegalAccessException - if the specified library does not have edit access to this variable.

IsAccessRestricted

public boolean IsAccessRestricted()
Check whether or not access is restricted to a particular library in this shared state variable.

Returns:
boolean Whether or not access is restricted.

GetValue

public java.lang.Object GetValue()
Gets the value of the stored object.

Returns:
The value of the stored object.

SetValue

public void SetValue(java.lang.Object _value)
Updates the value of the stored object.

Parameters:
The - new value for the stored object.



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.