org.jboss.naming
Class JNDIBinding

java.lang.Object
  extended by org.jboss.naming.JNDIBinding

public class JNDIBinding
extends Object

A representation of a binding into JNDI.

Version:
$Revision: 1.2 $
Author:
Scott.Stark@jboss.org

Constructor Summary
JNDIBinding()
           
 
Method Summary
 String getEditor()
          The optional PropertyEditor implementation class name.
 String getName()
          The JNDI name to bind under
 String getText()
          The text representation of the binding
 String getType()
          The optional type the text representation should be converted to.
 Object getValue()
          Object the binding value.
 boolean isTrim()
           
 void setEditor(String editor)
           
 void setName(String name)
           
 void setText(String text)
          Set the text representation of the binding.
 void setTrim(boolean trim)
           
 void setType(String type)
           
 void setValue(Object value)
          Set the raw value binding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JNDIBinding

public JNDIBinding()
Method Detail

getName

public String getName()
The JNDI name to bind under

Returns:

setName

public void setName(String name)

getText

public String getText()
The text representation of the binding

Returns:

setText

public void setText(String text)
Set the text representation of the binding. If the replace attribute is true, the text will be searched for system property references of the form ${x}.

Parameters:
text -

getType

public String getType()
The optional type the text representation should be converted to.

Returns:

setType

public void setType(String type)
Parameters:
type - - type the text representation should be converted to.

getEditor

public String getEditor()
The optional PropertyEditor implementation class name.

Returns:

setEditor

public void setEditor(String editor)
Parameters:
editor - - the optional PropertyEditor implementation class name.

getValue

public Object getValue()
                throws Exception
Object the binding value. If there is a binding from an external xml fragment it will be whatever that was. If there is a type it will be the value as obtained by converting the text of the value element to an object using the type PropertyEditor. If there is an explicit PropertyEditor given by the editor attribute that will be used to convert the text into an object.

Returns:
the value binding
Throws:
Exception - - on failure to load/use the PropertyEditor

setValue

public void setValue(Object value)
Set the raw value binding

Parameters:
value -

isTrim

public boolean isTrim()
Returns:
flag indicating if the text should be trimmed

setTrim

public void setTrim(boolean trim)
Parameters:
trim - - flag indicating if the text should be trimmed


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.