org.n52.security.common.artifact
Class TransferableImpl

java.lang.Object
  extended by org.n52.security.common.artifact.TransferableImpl
All Implemented Interfaces:
Transferable

public class TransferableImpl
extends Object
implements Transferable

Default implementation of Transferable.


Field Summary
protected  Map<String,TransferAttribute> m_attributes
          Attributes associated with this instnace.
protected  Payload m_payload
          Payload tranferred by this Transferable.
 
Constructor Summary
TransferableImpl()
           
 
Method Summary
 void addAttribute(TransferAttribute pAttribute)
          Adds a Attribute to the Set and stores it under pAttribute.getName().
 TransferAttribute getAttribute(String pName)
          Gets the TransferAttribute which are stored under pName.
 Collection<String> getAttributeNames()
          Returns the Collection of keys, under which TransferAttributes.
 Collection<TransferAttribute> getAttributes()
          Returns the Collection of TransferAttributes which stored in.
 Object getAttributeValue(String pName)
          Gets the Value of the TransferAttribute which are stored under pName.
 Payload getPayload()
          Gets the PayLoad of this Transferable.
 void removeAttribute(String name)
          Removes an attribute from the transferable.
 void setPayload(Payload pPayload)
          Sets the Payload of this Transferable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_payload

protected Payload m_payload
Payload tranferred by this Transferable.


m_attributes

protected Map<String,TransferAttribute> m_attributes
Attributes associated with this instnace.

Constructor Detail

TransferableImpl

public TransferableImpl()
Method Detail

getPayload

public Payload getPayload()
Description copied from interface: Transferable
Gets the PayLoad of this Transferable.

Specified by:
getPayload in interface Transferable
Returns:

setPayload

public void setPayload(Payload pPayload)
Description copied from interface: Transferable
Sets the Payload of this Transferable.

Specified by:
setPayload in interface Transferable

getAttributeNames

public Collection<String> getAttributeNames()
Description copied from interface: Transferable
Returns the Collection of keys, under which TransferAttributes. are stored

Specified by:
getAttributeNames in interface Transferable
Returns:

getAttributes

public Collection<TransferAttribute> getAttributes()
Description copied from interface: Transferable
Returns the Collection of TransferAttributes which stored in. this Transferable

Specified by:
getAttributes in interface Transferable
Returns:

getAttribute

public TransferAttribute getAttribute(String pName)
Description copied from interface: Transferable
Gets the TransferAttribute which are stored under pName.

Specified by:
getAttribute in interface Transferable
Returns:
null <==> (!getAttributeNames.contains(pKey) || pKey==null)

getAttributeValue

public Object getAttributeValue(String pName)
Description copied from interface: Transferable
Gets the Value of the TransferAttribute which are stored under pName.

Specified by:
getAttributeValue in interface Transferable
Returns:
null <==> (!getAttributeNames.contains(pName) || pName==null)
short for getAttribute(pName).getValue();

addAttribute

public void addAttribute(TransferAttribute pAttribute)
Description copied from interface: Transferable
Adds a Attribute to the Set and stores it under pAttribute.getName().

Specified by:
addAttribute in interface Transferable
Parameters:
pAttribute - The Attribute

removeAttribute

public void removeAttribute(String name)
Description copied from interface: Transferable
Removes an attribute from the transferable.

Specified by:
removeAttribute in interface Transferable
Parameters:
name - the attribute name.


Copyright © 2004–2014 52north.org. All rights reserved.