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
Interface Blog.Collection

All Known Implementing Classes:
  AtomCollection, MetaWeblogBlog.MetaWeblogBlogCollection

Enclosing interface:
  Blog

    public static interface Blog.Collection

Represents an entry or resource collection on a blog server.

Method Summary
`boolean` | `accepts(String contentType)` 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 resource)` Save or update resource in this collection

Method Detail

### getBlog

    Blog getBlog()

  Get blog that contains this collection.

  Returns:
    Blog that contains this collection.

### getTitle

    String getTitle()

  Title of collection.

  Returns:
    Title of collecton.

### getToken

    String getToken()

  Token that can be used to fetch collection.

  Returns:
    Token that can be used to fetch collection.

### getAccepts

    List getAccepts()

  Content-types accepted by collection.

  Returns:
    Comma-separated list of content-types accepted.

### accepts

    boolean accepts(String contentType)

  Determines if collection will accept a content-type.

  Parameters:
    `contentType` - Content-type to be considered.
  Returns:
    True of content type will be accepted, false otherwise.

### getCategories

    List getCategories()
                       throws BlogClientException

  Return categories allowed by colletion.

  Returns:
    List of BlogEntry.Category objects for this collection.
  Throws:
    `BlogClientException` - On error fetching categories.

### newEntry

    BlogEntry newEntry()
                       throws BlogClientException

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

  Returns:
    New BlogEntry object.
  Throws:
    `BlogClientException` - On error creating entry.

### newResource

    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.

  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.

### getEntries

    Iterator getEntries()
                        throws BlogClientException

  Get iterator over entries/resources in this collection.

  Returns:
    List of BlogEntry objects, some may be BlogResources.
  Throws:
    `BlogClientException` - On error fetching entries/resources.

### saveEntry

    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.

  Parameters:
    `entry` - BlogEntry to be saved.
  Returns:
    URI of entry.
  Throws:
    `BlogClientException` - On error saving entry.

### saveResource

    String saveResource(BlogResource resource)
                        throws BlogClientException

  Save or update resource in this collection

  Parameters:
    `resource` - BlogResource to be saved.
  Returns:
    URI of resource.
  Throws:
    `BlogClientException` - On error saving resource.

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