com.novell.emframe.dev
Class UiHandlerContext

java.lang.Object
  extended bycom.novell.emframe.dev.UiHandlerContext

public class UiHandlerContext
extends java.lang.Object

Contains information needed for a UiHandler to plug-in to iManager.


Field Summary
protected  java.lang.String m_attributeName
          Attribute's name (ex: "CN").
protected  java.lang.String m_client
          Client device name (ex: "browser", "mozilla", "default", "pocket").
protected  java.lang.String m_eDasName
          m_eDasName = m_fieldPrefix + "$" + m_encodedAttributeName (ex: eDir$target$CN).
protected  java.lang.String m_eDasRights
          m_eDasRights contains either ("edasRights.target." + m_encodedAttributeName + ".writeable") or "true".
protected  java.lang.String m_eDasRightsStandard
          m_eDasRightsStandard contains either "DISABLED" or "".
protected  java.lang.String m_encodedAttributeName
          Encoded attribute's name.
protected  java.lang.String m_firstValue
          m_firstValue = "m_xPathValue" (ex: $edasXml/edas/attributeName).
protected  boolean m_forceMandatory
          Force the control to have a value.
protected  boolean m_forceReadOnly
          Force the control into read only mode or not.
protected  boolean m_forceSingleValued
          Force the control to only allow a single value.
protected  java.lang.String m_syntaxName
          Attribute's syntax (ex: "Case Ignore String").
protected  java.lang.String m_xPathSet
          m_xPathSet = "$edasXml/edas/"+ m_encodedAttributeName (ex: $edasXml/edas/attributeName).
protected  java.lang.String m_xPathValue
          m_xPathValue = "$edasXml/edas/"+ m_encodedAttributeName +"/value" (ex: $edasXml/edas/attributeName/value).
 
Constructor Summary
UiHandlerContext(AttributeDefinition attributeDefinition, java.lang.String client, java.lang.String id, boolean forceReadOnly, boolean forceSingleValued, boolean forceMandatory)
          Constructs a UiHandlerContext with information about the attribute handled by the UiHandler.
UiHandlerContext(java.lang.String attrName, java.lang.String safeAttrName, java.lang.String syntaxName, java.lang.String client, boolean forceReadOnly, boolean forceSingleValued, boolean isSized, long upperBound, long lowerBound, boolean useDirectoryRights, java.lang.String fieldPrefix, UiHandlerActionTrigger[] actionTriggers, boolean forceMandatory)
          Constructs a UiHandlerContext with information about the attribute handled by the UiHandler.
 
Method Summary
 UiHandlerActionTrigger[] getActionTriggers()
          Returns the action triggers associated with this UiHandler.
 java.lang.String getAttributeName()
          Returns the attribute name controlled by the UiHandler.
 java.lang.String getClient()
          Returns the client device name (ex: "browser", "mozilla", "default", "pocket").
 java.lang.String geteDasName()
          Returns the String containing the m_eDasName variable.
 java.lang.String geteDasRights()
          Returns the String containing the m_eDasRights variable.
 java.lang.String geteDasRightsStandard()
          Returns the String containing the m_eDasRightsStandard variable.
 java.lang.String getEncodedAttributeName()
          Returns the attribute name encoded for safe use on URLs.
 java.lang.String getFieldPrefix()
          Returns the prefix for the field.
 java.lang.String getFirstValue()
          Returns the String containing the m_firstValue variable.
 java.lang.String getId()
          Returns the unique ID of the UiHandler from the XML descriptor registering the UiHandler with iManager.
 long getLowerBound()
          Returns the lower bound of the attribute if the attribute is sized.
 java.lang.String getSyntaxName()
          Returns the syntax of the attribute controlled by the UiHandler.
 long getUpperBound()
          Returns the upper bound of the attribute if the attribute is sized.
 java.lang.String getxPathSet()
          Returns the String containing the m_xPathSet variable.
 java.lang.String getxPathValue()
          Returns the String containing the m_xPathValue variable.
 boolean isForceMandatory()
          Returns whether to force the attribute to have a value or if it can be null.
 boolean isForceReadOnly()
          Returns whether the control should be forced into read only mode.
 boolean isForceSingleValued()
          Returns whether to force the control to only allow a single value.
 boolean isHideColon()
          Returns whether the UiHandlerContext was not created from an AttributeDefinition and we should hide the colon.
 boolean isSized()
          Returns whether the attribute has upper and lower size values.
 boolean useDirectoryRights()
          Returns whether to use directory rights to determine whether the attribute is read only or whether to use the isForceReadOnly value instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_attributeName

protected java.lang.String m_attributeName
Attribute's name (ex: "CN").


m_client

protected java.lang.String m_client
Client device name (ex: "browser", "mozilla", "default", "pocket").


m_eDasName

protected java.lang.String m_eDasName
m_eDasName = m_fieldPrefix + "$" + m_encodedAttributeName (ex: eDir$target$CN).


m_eDasRights

protected java.lang.String m_eDasRights
m_eDasRights contains either ("edasRights.target." + m_encodedAttributeName + ".writeable") or "true".


m_eDasRightsStandard

protected java.lang.String m_eDasRightsStandard
m_eDasRightsStandard contains either "DISABLED" or "".


m_encodedAttributeName

protected java.lang.String m_encodedAttributeName
Encoded attribute's name.


m_firstValue

protected java.lang.String m_firstValue
m_firstValue = "m_xPathValue" (ex: $edasXml/edas/attributeName).


m_forceMandatory

protected boolean m_forceMandatory
Force the control to have a value.


m_forceReadOnly

protected boolean m_forceReadOnly
Force the control into read only mode or not. If true, control should appear disabled to the end user.


m_forceSingleValued

protected boolean m_forceSingleValued
Force the control to only allow a single value.


m_syntaxName

protected java.lang.String m_syntaxName
Attribute's syntax (ex: "Case Ignore String").


m_xPathSet

protected java.lang.String m_xPathSet
m_xPathSet = "$edasXml/edas/"+ m_encodedAttributeName (ex: $edasXml/edas/attributeName).


m_xPathValue

protected java.lang.String m_xPathValue
m_xPathValue = "$edasXml/edas/"+ m_encodedAttributeName +"/value" (ex: $edasXml/edas/attributeName/value).

Constructor Detail

UiHandlerContext

public UiHandlerContext(AttributeDefinition attributeDefinition,
                        java.lang.String client,
                        java.lang.String id,
                        boolean forceReadOnly,
                        boolean forceSingleValued,
                        boolean forceMandatory)
Constructs a UiHandlerContext with information about the attribute handled by the UiHandler. Caller must have an AttributeDefinition with all details about the attribute

Parameters:
attributeDefinition - AttributeDefinition containing information about the attribute
client - String containing the client device name (ex: "browser", "mozilla", "default", "pocket"). This String can be obtained through the HttpSession.getAttribute("DeviceType"); call.
id - String containing the unique ID of the UiHandler
forceReadOnly - boolean telling whether to force the control into read only mode or not. If true, control should appear disabled to the end user.
forceSingleValued - boolean telling whether to force the control to only allow a single value
forceMandatory - boolean telling whether to force the control to have a value

UiHandlerContext

public UiHandlerContext(java.lang.String attrName,
                        java.lang.String safeAttrName,
                        java.lang.String syntaxName,
                        java.lang.String client,
                        boolean forceReadOnly,
                        boolean forceSingleValued,
                        boolean isSized,
                        long upperBound,
                        long lowerBound,
                        boolean useDirectoryRights,
                        java.lang.String fieldPrefix,
                        UiHandlerActionTrigger[] actionTriggers,
                        boolean forceMandatory)
Constructs a UiHandlerContext with information about the attribute handled by the UiHandler. Caller must know all details about the attribute.

Parameters:
attrName - String containing the attribute name
safeAttrName - String containing the encoded attribute name.
syntaxName - String containing the attribute's syntax
client - String containing the client device name (ex: "browser", "mozilla", "default", "pocket"). This String can be obtained through the HttpSession.getAttribute("DeviceType"); call.
forceReadOnly - boolean telling whether to force the control into read only mode or not. If true, control should appear disabled to the end user.
forceSingleValued - boolean telling whether to force the control to only allow a single value
isSized - boolean telling whether the attribute has upper and lower size values
upperBound - long containing the upper size value
lowerBound - long containing the lower size value
useDirectoryRights - boolean telling whether this field is an eDirectory attribute and we should make it read only if the user doesn't have rights to the attribute on the current object
fieldPrefix - String containing the prefix for the field (ex. "eDir$target")
actionTriggers - UiHandlerActionTrigger array containing actions that trigger events
forceMandatory - boolean telling whether to force the control to have a value
Method Detail

getActionTriggers

public UiHandlerActionTrigger[] getActionTriggers()
Returns the action triggers associated with this UiHandler.

Returns:
UiHandlerActionTrigger array containing actions that trigger events

getAttributeName

public java.lang.String getAttributeName()
Returns the attribute name controlled by the UiHandler.

Returns:
String containing the attribute name

getClient

public java.lang.String getClient()
Returns the client device name (ex: "browser", "mozilla", "default", "pocket"). This String can be obtained through the HttpSession.getAttribute("DeviceType"); call.

Returns:
String containing the client device name (ex: "browser", "mozilla", "default", "pocket")

geteDasName

public java.lang.String geteDasName()
Returns the String containing the m_eDasName variable.

Returns:
String contains m_fieldPrefix + "$" + m_encodedAttributeName (ex: eDir$target$CN)

geteDasRights

public java.lang.String geteDasRights()
Returns the String containing the m_eDasRights variable.

Returns:
String contains either ("edasRights.target." + m_encodedAttributeName + ".writeable") or "true"

geteDasRightsStandard

public java.lang.String geteDasRightsStandard()
Returns the String containing the m_eDasRightsStandard variable.

Returns:
String contains either ither "DISABLED" or ""

getEncodedAttributeName

public java.lang.String getEncodedAttributeName()
Returns the attribute name encoded for safe use on URLs.

Returns:
String containing the encoded attribute name

getFieldPrefix

public java.lang.String getFieldPrefix()
Returns the prefix for the field.

Returns:
String containing the prefix for the field (ex. "eDir$target")

getFirstValue

public java.lang.String getFirstValue()
Returns the String containing the m_firstValue variable.

Returns:
String contains "" (ex: $edasXml/edas/attributeName)

getId

public java.lang.String getId()
Returns the unique ID of the UiHandler from the XML descriptor registering the UiHandler with iManager.

Returns:
String containing the unique ID of the UiHandler

getLowerBound

public long getLowerBound()
Returns the lower bound of the attribute if the attribute is sized.

Returns:
long containing the lower size value
See Also:
isSized(), getUpperBound()

getSyntaxName

public java.lang.String getSyntaxName()
Returns the syntax of the attribute controlled by the UiHandler.

Returns:
String containing the syntax of the attribute

getUpperBound

public long getUpperBound()
Returns the upper bound of the attribute if the attribute is sized.

Returns:
long containing the upper size value
See Also:
isSized(), getLowerBound()

getxPathSet

public java.lang.String getxPathSet()
Returns the String containing the m_xPathSet variable.

Returns:
String contains "$edasXml/edas/"+ m_encodedAttributeName (ex: $edasXml/edas/attributeName)

getxPathValue

public java.lang.String getxPathValue()
Returns the String containing the m_xPathValue variable.

Returns:
String contains "$edasXml/edas/"+ m_encodedAttributeName +"/value" (ex: $edasXml/edas/attributeName/value)

isForceMandatory

public boolean isForceMandatory()
Returns whether to force the attribute to have a value or if it can be null.

Returns:
boolean: true to force a value, false to allow a null value

isForceReadOnly

public boolean isForceReadOnly()
Returns whether the control should be forced into read only mode. Used if useDirectoryRights returns false.

Returns:
boolean: true forces the control into read only mode and control should appear disabled to the end user, false if the user should be able to edit the control
See Also:
useDirectoryRights()

isForceSingleValued

public boolean isForceSingleValued()
Returns whether to force the control to only allow a single value.

Returns:
boolean: true forces the control to only allow a single value, false if multiple values are allowed

isHideColon

public boolean isHideColon()
Returns whether the UiHandlerContext was not created from an AttributeDefinition and we should hide the colon.

Returns:
boolean: true to hide the colon, false to not hide the colon

isSized

public boolean isSized()
Returns whether the attribute has upper and lower size values. If so, call getUpperBound and getLowerBound to get the size values.

Returns:
boolean: true telling whether the attribute has upper and lower size values, false if all values are allowed
See Also:
getLowerBound(), getUpperBound()

useDirectoryRights

public boolean useDirectoryRights()
Returns whether to use directory rights to determine whether the attribute is read only or whether to use the isForceReadOnly value instead.

Returns:
boolean: true telling that this field is an eDirectory attribute and we should make it read only if the user doesn't have rights to the attribute on the current object, false to use the isForceReadOnly call instead
See Also:
isForceReadOnly()


API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated September 2 2004 0111.