Skip navigation links


com.fatwire.assetapi.data
Class AttributeDataImpl

java.lang.Object
  extended by com.fatwire.assetapi.data.AttributeDataImpl

All Implemented Interfaces:
AttributeData

public class AttributeDataImpl
extends java.lang.Object
implements AttributeData

Default implementation of AttributeData interface


Constructor Summary
AttributeDataImpl(AttributeDef def, java.lang.String attributeName, AttributeTypeEnum type, java.util.List data)
          Constructs an AttributeData with attribute def, name, type and a list of data
AttributeDataImpl(AttributeDef def, java.lang.String attributeName, AttributeTypeEnum type, java.lang.Object data)
          Constructs an AttributeData with attribute def, name, type and data
AttributeDataImpl(java.lang.String assettype, java.lang.String subtype, java.lang.String attributeName, AttributeTypeEnum type, java.util.List data)
          Constructs an AttributeData with assettype, subtype, name, type and a list of data
AttributeDataImpl(java.lang.String assettype, java.lang.String subtype, java.lang.String attributeName, AttributeTypeEnum type, java.lang.Object data)
          Constructs an AttributeData with assettype, subtype, name, type and data

 

Method Summary
 void addData(java.lang.Object data)
          append a data to the AttributeData list if the attribute is multi-valued.
 AttributeDef getAttributeDef()
          Returns attribute definition for this attribute.
 java.lang.String getAttributeName()
          Returns name of the attribute for which this instance represents data
 java.lang.Object getData()
          Returns handle to the raw data.
 java.util.List getDataAsList()
          Returns handle to data when data is multi valued.
 AttributeTypeEnum getType()
          Indicates the type of data contained.
 void removeData(java.lang.Object data)
          remove a data from the attribute
 void setAttributeDef(AttributeDef attributeDef)
          Sets the AttributeDef for this AttributeData
 void setData(java.lang.Object data)
          sets data to the AttributeData
 void setDataAsList(java.util.List data)
          sets data aslist to the AttributeData

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

AttributeDataImpl

public AttributeDataImpl(AttributeDef def,
                         java.lang.String attributeName,
                         AttributeTypeEnum type,
                         java.lang.Object data)
Constructs an AttributeData with attribute def, name, type and data
Parameters:
def - the Attribute Definition
attributeName - the name of the attribute
type - the type of the attribute
data - the data for the attribute

AttributeDataImpl

public AttributeDataImpl(AttributeDef def,
                         java.lang.String attributeName,
                         AttributeTypeEnum type,
                         java.util.List data)
Constructs an AttributeData with attribute def, name, type and a list of data
Parameters:
def - the Attribute Definition
attributeName - the name of the attribute
type - the type of the attribute
data - the data for the attribute

AttributeDataImpl

public AttributeDataImpl(java.lang.String assettype,
                         java.lang.String subtype,
                         java.lang.String attributeName,
                         AttributeTypeEnum type,
                         java.lang.Object data)
Constructs an AttributeData with assettype, subtype, name, type and data
Parameters:
assettype - the asset type
subtype - the asset subtype
attributeName - the name of the attribute
type - the type of the attribute
data - the data for the attribute

AttributeDataImpl

public AttributeDataImpl(java.lang.String assettype,
                         java.lang.String subtype,
                         java.lang.String attributeName,
                         AttributeTypeEnum type,
                         java.util.List data)
Constructs an AttributeData with assettype, subtype, name, type and a list of data
Parameters:
assettype - the asset type
subtype - the asset subtype
attributeName - the name of the attribute
type - the type of the attribute
data - the data for the attribute

Method Detail

setAttributeDef

public void setAttributeDef(AttributeDef attributeDef)
Sets the AttributeDef for this AttributeData
Parameters:
attributeDef - the AttributeDef

getAttributeName

public java.lang.String getAttributeName()
Description copied from interface: AttributeData
Returns name of the attribute for which this instance represents data
Specified by:
getAttributeName in interface AttributeData
Returns:
name of the attribute

getType

public AttributeTypeEnum getType()
Description copied from interface: AttributeData
Indicates the type of data contained.
Specified by:
getType in interface AttributeData
Returns:
corresponding type as AttributeTypeEnum

getData

public java.lang.Object getData()
Description copied from interface: AttributeData
Returns handle to the raw data.
Specified by:
getData in interface AttributeData
Returns:
data

getAttributeDef

public AttributeDef getAttributeDef()
Description copied from interface: AttributeData
Returns attribute definition for this attribute.
Specified by:
getAttributeDef in interface AttributeData
Returns:
Attribute definition for which this instance is data for.

getDataAsList

public java.util.List getDataAsList()
Description copied from interface: AttributeData
Returns handle to data when data is multi valued.
Specified by:
getDataAsList in interface AttributeData
Returns:
list of data (for multi valued attributes)

setData

public void setData(java.lang.Object data)
Description copied from interface: AttributeData
sets data to the AttributeData
Specified by:
setData in interface AttributeData
Parameters:
data - data to add

setDataAsList

public void setDataAsList(java.util.List data)
Description copied from interface: AttributeData
sets data aslist to the AttributeData
Specified by:
setDataAsList in interface AttributeData
Parameters:
data - data to add

addData

public void addData(java.lang.Object data)
Description copied from interface: AttributeData
append a data to the AttributeData list if the attribute is multi-valued. Else it will replace the exisiting data
Specified by:
addData in interface AttributeData
Parameters:
data - data to add

removeData

public void removeData(java.lang.Object data)
Description copied from interface: AttributeData
remove a data from the attribute
Specified by:
removeData in interface AttributeData
Parameters:
data - the data to remove

Skip navigation links


Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.