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:
Serializable, AttributeValue

public class AnyObjectAttributeValue
extends AttributeValueAdapter
implements Serializable

Unknown attribute value.

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: 3422 $
Author:
Marko Reiprecht Created on 26.03.2007
See Also:
Serialized Form

Field Summary
protected  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(Object wrappedObject)
          Creates a new AnyObjectAttributeValue.
AnyObjectAttributeValue(Object wrappedObject, String typeName)
          Creates a new AnyObjectAttributeValue.
 
Method Summary
 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 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(Object wrappedObject)
                        throws NullPointerException
Creates a new AnyObjectAttributeValue.

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

AnyObjectAttributeValue

public AnyObjectAttributeValue(Object wrappedObject,
                               String typeName)
                        throws 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:
NullPointerException - if wrappedObject is null.
See Also:
AttributeValueAdapter.AttributeValueAdapter(Object)
Method Detail

getTypeName

public 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–2014 52north.org. All rights reserved.