org.apache.abdera.protocol.server.impl
Class SimpleCollectionInfo

java.lang.Object
  extended by org.apache.abdera.protocol.server.impl.SimpleCollectionInfo
All Implemented Interfaces:
Serializable, CollectionInfo

public class SimpleCollectionInfo
extends Object
implements CollectionInfo, Serializable

See Also:
Serialized Form

Constructor Summary
SimpleCollectionInfo(String title, String href, String... accepts)
           
 
Method Summary
 void addCategoriesInfo(CategoriesInfo... catinfos)
           
 Collection asCollectionElement(RequestContext request)
          Converts this to an instance of the FOM Collection interface
 boolean equals(Object obj)
           
 String[] getAccepts(RequestContext request)
          Returns an array of MIME media types for the app:collection element's app:accept elements.
 CategoriesInfo[] getCategoriesInfo(RequestContext request)
          Return the collection of CategoriesInfo objects for the app:collection element's app:categories elements.
 String getHref(RequestContext request)
          Get the value of the app:collection element's href attribute.
 String getTitle(RequestContext request)
          Get the value of the app:collection element's atom:title element.
 int hashCode()
           
 void setCategoriesInfo(CategoriesInfo... catinfos)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCollectionInfo

public SimpleCollectionInfo(String title,
                            String href,
                            String... accepts)
Method Detail

getAccepts

public String[] getAccepts(RequestContext request)
Description copied from interface: CollectionInfo
Returns an array of MIME media types for the app:collection element's app:accept elements. These tell a client which media types the collection will accept on a POST

Specified by:
getAccepts in interface CollectionInfo

getHref

public String getHref(RequestContext request)
Description copied from interface: CollectionInfo
Get the value of the app:collection element's href attribute. This must not be null

Specified by:
getHref in interface CollectionInfo

getTitle

public String getTitle(RequestContext request)
Description copied from interface: CollectionInfo
Get the value of the app:collection element's atom:title element. This assumes that the title will be type="text". This must not be null;

Specified by:
getTitle in interface CollectionInfo

getCategoriesInfo

public CategoriesInfo[] getCategoriesInfo(RequestContext request)
Description copied from interface: CollectionInfo
Return the collection of CategoriesInfo objects for the app:collection element's app:categories elements. These tell a client which atom:category elements are defined for use in the collections atom:entries

Specified by:
getCategoriesInfo in interface CollectionInfo

addCategoriesInfo

public void addCategoriesInfo(CategoriesInfo... catinfos)

setCategoriesInfo

public void setCategoriesInfo(CategoriesInfo... catinfos)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

asCollectionElement

public Collection asCollectionElement(RequestContext request)
Description copied from interface: CollectionInfo
Converts this to an instance of the FOM Collection interface

Specified by:
asCollectionElement in interface CollectionInfo


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.