Sun Adapter for LDAP API

com.stc.connector.ldapadapter.appconn
Class STCValueImpl

java.lang.Object
  extended by com.stc.connector.ldapadapter.appconn.STCValueImpl
All Implemented Interfaces:
STCValue

public class STCValueImpl
extends java.lang.Object
implements STCValue

This class is used as a container for a single value of an attribute's value

Version:
$Revision: 1.5 $
Author:

Constructor Summary
protected STCValueImpl()
           
protected STCValueImpl(java.lang.Object aVal)
          Creates a new instance of STCValue
 
Method Summary
 byte[] getByteValue()
          Retrieves the value from the value Object as a byte array
 java.lang.String getStringValue()
          Retrieves the String value from the value Object
 java.lang.Object getValue()
          Returns the value from the value Object as an Object
 boolean isByteArray()
          Checks whether the value is a byte array
 boolean isString()
          Checks whether the value is a String
 void reset()
          Method to reset the values
 void setByteValue(byte[] byteVal)
          Sets the byte value for the value Object
 void setStringValue(java.lang.String strVal)
          Sets the String value for the value Object
 void setValue(java.lang.Object aVal)
          Sets the value for the value Object as an Object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

STCValueImpl

protected STCValueImpl()

STCValueImpl

protected STCValueImpl(java.lang.Object aVal)
Creates a new instance of STCValue

Parameters:
val - the value as an Object
Method Detail

reset

public void reset()
Description copied from interface: STCValue
Method to reset the values

Specified by:
reset in interface STCValue

isByteArray

public boolean isByteArray()
                    throws LDAPApplicationException
Checks whether the value is a byte array

Specified by:
isByteArray in interface STCValue
Returns:
true if the value is a byte array
Throws:
LDAPApplicationException - if the type of the value cannot be determined

isString

public boolean isString()
                 throws LDAPApplicationException
Checks whether the value is a String

Specified by:
isString in interface STCValue
Returns:
true if the value is a String
Throws:
LDAPApplicationException - if the type of the value cannot be determined

getStringValue

public java.lang.String getStringValue()
                                throws LDAPApplicationException
Retrieves the String value from the value Object

Specified by:
getStringValue in interface STCValue
Returns:
the String value of the value Object
Throws:
LDAPApplicationException - if the value is not of type String or if there is no value

setStringValue

public void setStringValue(java.lang.String strVal)
Sets the String value for the value Object

Specified by:
setStringValue in interface STCValue
Parameters:
strVal - the String value of the value Object

getByteValue

public byte[] getByteValue()
                    throws LDAPApplicationException
Retrieves the value from the value Object as a byte array

Specified by:
getByteValue in interface STCValue
Returns:
the value of the value Object as a byte array
Throws:
LDAPApplicationException - if the value is not of type byte array or if there is no value

setByteValue

public void setByteValue(byte[] byteVal)
Sets the byte value for the value Object

Specified by:
setByteValue in interface STCValue
Parameters:
byteVal - the String value of the value Object

setValue

public void setValue(java.lang.Object aVal)
              throws LDAPApplicationException
Sets the value for the value Object as an Object

Specified by:
setValue in interface STCValue
Parameters:
val - the value of the value Object as an Object
Throws:
LDAPApplicationException - if the value is not of one of the supported types

getValue

public java.lang.Object getValue()
                          throws LDAPApplicationException
Returns the value from the value Object as an Object

Specified by:
getValue in interface STCValue
Returns:
the value of the value Object as an Object
Throws:
LDAPApplicationException - if there is no value

Sun Adapter for LDAP API