org.apache.shindig.social.core.model
Class ListFieldImpl

java.lang.Object
  extended by org.apache.shindig.social.core.model.ListFieldImpl
All Implemented Interfaces:
ListField
Direct Known Subclasses:
UrlImpl

public class ListFieldImpl
extends Object
implements ListField

ListField data structure


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.shindig.social.opensocial.model.ListField
ListField.Field
 
Constructor Summary
ListFieldImpl()
           
ListFieldImpl(String type, String value)
           
 
Method Summary
 Boolean getPrimary()
          Get Boolean value indicating whether this instance of the Plural Field is the primary or preferred value of for this field, e.g.
 String getType()
          The type of field for this instance, usually used to label the preferred function of the given contact information.
 String getValue()
          Get the primary value of this field, e.g.
 void setPrimary(Boolean primary)
          
 void setType(String type)
          Set the type of the field.
 void setValue(String value)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListFieldImpl

public ListFieldImpl()

ListFieldImpl

public ListFieldImpl(String type,
                     String value)
Method Detail

getType

public String getType()
Description copied from interface: ListField
The type of field for this instance, usually used to label the preferred function of the given contact information. Unless otherwise specified, this string value specifies Canonical Values of work, home, and other.

Specified by:
getType in interface ListField
Returns:
the type of the field

setType

public void setType(String type)
Set the type of the field.

Specified by:
setType in interface ListField
Parameters:
type - the type of the field

getValue

public String getValue()
Description copied from interface: ListField
Get the primary value of this field, e.g. the actual e-mail address, phone number, or URL. When specifying a sortBy field in the Query Parameters for a Plural Field, the default meaning is to sort based on this value sub-field. Each non-empty Plural Field value MUST contain at least the value sub-field, but all other sub-fields are optional.

Specified by:
getValue in interface ListField
Returns:
the value of the field

setValue

public void setValue(String value)

Specified by:
setValue in interface ListField
Parameters:
value - the value of the field
See Also:
ListField.getValue()

getPrimary

public Boolean getPrimary()
Description copied from interface: ListField
Get Boolean value indicating whether this instance of the Plural Field is the primary or preferred value of for this field, e.g. the preferred mailing address or primary e-mail address. Service Providers MUST NOT mark more than one instance of the same Plural Field as primary="true", and MAY choose not to mark any fields as primary, if this information is not available. For efficiency, Service Providers SHOULD NOT mark all non-primary fields with primary="false", but should instead omit this sub-field for all non-primary instances.

Specified by:
getPrimary in interface ListField
Returns:
true if this is a primary or preferred value

setPrimary

public void setPrimary(Boolean primary)

Specified by:
setPrimary in interface ListField
Parameters:
primary - set to true if a primary or preferred value
See Also:
ListField.getPrimary()


Copyright © 2007-2012. All Rights Reserved.