Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.syndication.propono.blogclient.atomprotocol
Class AtomCollection

    java.lang.Object
      com.sun.syndication.propono.blogclient.atomprotocol.AtomCollection

All Implemented Interfaces:
  Blog.Collection

    public class AtomCollection

extends Object
implements Blog.Collection

Atom protocol implementation of BlogClient Blog.Collection.

Method Summary
`boolean` | `accepts(String ct)` Determines if collection will accept a content-type.
`List` | `getAccepts()` Content-types accepted by collection.
`Blog` | `getBlog()` Get blog that contains this collection.
`List` | `getCategories()` Return categories allowed by colletion.
`Iterator` | `getEntries()` Get iterator over entries/resources in this collection.
`String` | `getTitle()` Title of collection.
`String` | `getToken()` Token that can be used to fetch collection.
`BlogEntry` | `newEntry()` Create but do not save new entry in collection.
`BlogResource` | `newResource(String name, String contentType, byte[] bytes)` Create but do not save new resource in collection.
`String` | `saveEntry(BlogEntry entry)` Save or update a BlogEntry in this collection by adding it to this collection and then calling it's entry.save() method.
`String` | `saveResource(BlogResource res)` Save or update resource in this collection

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

Method Detail

### getTitle

    public String getTitle()

  Title of collection.

  Specified by:
    `getTitle` in interface `Blog.Collection`
  Returns:
    Title of collecton.

### getToken

    public String getToken()

  Token that can be used to fetch collection.

  Specified by:
    `getToken` in interface `Blog.Collection`
  Returns:
    Token that can be used to fetch collection.

### getAccepts

    public List getAccepts()

  Content-types accepted by collection.

  Specified by:
    `getAccepts` in interface `Blog.Collection`
  Returns:
    Comma-separated list of content-types accepted.

### accepts

    public boolean accepts(String ct)

  Determines if collection will accept a content-type.

  Specified by:
    `accepts` in interface `Blog.Collection`
  Parameters:
    `ct` - Content-type to be considered.
  Returns:
    True of content type will be accepted, false otherwise.

### getEntries

    public Iterator getEntries()
                        throws BlogClientException

  Get iterator over entries/resources in this collection.

  Specified by:
    `getEntries` in interface `Blog.Collection`
  Returns:
    List of BlogEntry objects, some may be BlogResources.
  Throws:
    `BlogClientException` - On error fetching entries/resources.

### newEntry

    public BlogEntry newEntry()
                       throws BlogClientException

  Create but do not save new entry in collection. To save entry, call its save() method.

  Specified by:
    `newEntry` in interface `Blog.Collection`
  Returns:
    New BlogEntry object.
  Throws:
    `BlogClientException` - On error creating entry.

### newResource

    public BlogResource newResource(String name,
                                    String contentType,
                                    byte[] bytes)
                             throws BlogClientException

  Create but do not save new resource in collection. To save resource, call its save() method.

  Specified by:
    `newResource` in interface `Blog.Collection`
  Parameters:
    `name` - Name of new resource.
    `contentType` - MIME content-type of new resource.
    `bytes` - Data for new resource.
  Returns:
    New BlogResource object,
  Throws:
    `BlogClientException` - On error creating entry.

### saveResource

    public String saveResource(BlogResource res)
                        throws BlogClientException

  Save or update resource in this collection

  Specified by:
    `saveResource` in interface `Blog.Collection`
  Parameters:
    `res` - BlogResource to be saved.
  Returns:
    URI of resource.
  Throws:
    `BlogClientException` - On error saving resource.

### saveEntry

    public String saveEntry(BlogEntry entry)
                     throws BlogClientException

  Save or update a BlogEntry in this collection by adding it to this collection and then calling it's entry.save() method.

  Specified by:
    `saveEntry` in interface `Blog.Collection`
  Parameters:
    `entry` - BlogEntry to be saved.
  Returns:
    URI of entry.
  Throws:
    `BlogClientException` - On error saving entry.

### getBlog

    public Blog getBlog()

  Get blog that contains this collection.

  Specified by:
    `getBlog` in interface `Blog.Collection`
  Returns:
    Blog that contains this collection.

### getCategories

    public List getCategories()

  Return categories allowed by colletion.

  Specified by:
    `getCategories` in interface `Blog.Collection`
  Returns:
    List of BlogEntry.Category objects for this collection.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD