com.ca.commons.jndi.beans
Class ByteDataPropertyHandler

java.lang.Object
  extended by com.ca.commons.jndi.beans.MultiValuedAttribHandler
      extended by com.ca.commons.jndi.beans.ByteDataPropertyHandler
All Implemented Interfaces:
JNDIBeanPropertyHandler

public final class ByteDataPropertyHandler
extends MultiValuedAttribHandler


Field Summary
static String KEY_CHARSET
           
 
Fields inherited from interface com.ca.commons.jndi.beans.JNDIBeanPropertyHandler
logger
 
Constructor Summary
ByteDataPropertyHandler()
           
 
Method Summary
protected  Object attrib2Property(Object attrValue)
          Converts a single attribute value to a value to be included in the Collection result.
 void init(Properties props)
          Provides a set of properties to initialize the handler.
protected  Object property2Attrib(Object propValue)
          Converts a single property value to an attribute value.
 
Methods inherited from class com.ca.commons.jndi.beans.MultiValuedAttribHandler
getAttributeValues, getPropertyValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_CHARSET

public static final String KEY_CHARSET
See Also:
Constant Field Values
Constructor Detail

ByteDataPropertyHandler

public ByteDataPropertyHandler()
Method Detail

init

public void init(Properties props)
          throws JNDIBeanStoreConfigException
Description copied from interface: JNDIBeanPropertyHandler
Provides a set of properties to initialize the handler. A handler implementation may alter aspects of its behaviour based on these properties. Each implementation must document what properties it expects (if any). This method is called once on each handler instance by JNDIBeanStoreFactory with the properties listed by its XML configuration data.

Specified by:
init in interface JNDIBeanPropertyHandler
Overrides:
init in class MultiValuedAttribHandler
Parameters:
props - The properties to use for initialization.
Throws:
JNDIBeanStoreConfigException - If any of the properties were invalid in any way.

attrib2Property

@Nullable
protected Object attrib2Property(@Nullable
                                          Object attrValue)
                          throws JNDIBeanStoreException
Description copied from class: MultiValuedAttribHandler
Converts a single attribute value to a value to be included in the Collection result. This is called by MultiValuedAttribHandler.getPropertyValue(javax.naming.directory.Attribute[]) for each value of the multivalued attribute. The default implementation simply returns the same reference it was passed.

Overrides:
attrib2Property in class MultiValuedAttribHandler
Parameters:
attrValue - An attribute value.
Returns:
The converted value.
Throws:
JNDIBeanStoreException - If the value could not be converted.

property2Attrib

@Nullable
protected Object property2Attrib(@Nullable
                                          Object propValue)
Description copied from class: MultiValuedAttribHandler
Converts a single property value to an attribute value. This is called by MultiValuedAttribHandler.getAttributeValues(java.lang.Object) for each element of the input Collection. The default implementation simply returns the same reference it was passed.

Overrides:
property2Attrib in class MultiValuedAttribHandler
Parameters:
propValue - A property value.
Returns:
The converted attribute value.


Created 2011-07-14 13:27 EST