org.n52.security.common.attributes
Class AnyObjectAttributeValue

java.lang.Object
  extended by org.n52.security.common.attributes.AttributeValueAdapter
      extended by org.n52.security.common.attributes.AnyObjectAttributeValue
All Implemented Interfaces:
java.io.Serializable, AttributeValue

public class AnyObjectAttributeValue
extends AttributeValueAdapter
implements java.io.Serializable

Class AnyObjectAttributeValue represents unknown attribute values.

This class should be used by pdp-proxy implementations to react on attribute values, which they do not directly support. It is recommend to create a concrete attribute value for such a 'new' type.

Version:
$Revision: 1748 $
Author:
Marko Reiprecht Created on 26.03.2007
See Also:
Serialized Form

Field Summary
protected  java.lang.String m_typeName
          Holds a custom type name if given in the constructor, otherwise the classname of the wrapped object.
 
Fields inherited from class org.n52.security.common.attributes.AttributeValueAdapter
m_wrappedObject
 
Fields inherited from interface org.n52.security.common.attributes.AttributeValue
EMPTY_VALUE
 
Constructor Summary
AnyObjectAttributeValue(java.lang.Object wrappedObject)
          Creates a new AnyObjectAttributeValue.
AnyObjectAttributeValue(java.lang.Object wrappedObject, java.lang.String typeName)
          Creates a new AnyObjectAttributeValue.
 
Method Summary
 java.lang.String getTypeName()
          gets the type name of the concrete value.
 
Methods inherited from class org.n52.security.common.attributes.AttributeValueAdapter
equals, getUnspecifiedValue, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

m_typeName

protected java.lang.String m_typeName
Holds a custom type name if given in the constructor, otherwise the classname of the wrapped object.

Constructor Detail

AnyObjectAttributeValue

public AnyObjectAttributeValue(java.lang.Object wrappedObject)
                        throws java.lang.NullPointerException
Creates a new AnyObjectAttributeValue.

Parameters:
wrappedObject - the wrapped object, must be not null.
Throws:
java.lang.NullPointerException - if wrappedObject is null.
See Also:
AttributeValueAdapter.AttributeValueAdapter(Object)

AnyObjectAttributeValue

public AnyObjectAttributeValue(java.lang.Object wrappedObject,
                               java.lang.String typeName)
                        throws java.lang.NullPointerException
Creates a new AnyObjectAttributeValue.

Parameters:
wrappedObject - the wrapped object, must be not null.
typeName - a custom typename. If not given or empty the class name of wrappedObject is used.
Throws:
java.lang.NullPointerException - if wrappedObject is null.
See Also:
AttributeValueAdapter.AttributeValueAdapter(Object)
Method Detail

getTypeName

public java.lang.String getTypeName()
gets the type name of the concrete value. this can be the classname of the wrapped object or a custom value. It is dependend of the way it is constructed.

Specified by:
getTypeName in interface AttributeValue
Overrides:
getTypeName in class AttributeValueAdapter
Returns:
a type name.
See Also:
AttributeValue.getTypeName(), AttributeValueAdapter.getTypeName()


Copyright © 2004-2009 52north.org. All Rights Reserved.