org.rometools.propono.blogclient.metaweblog
Class MetaWeblogResource

java.lang.Object
  extended by org.rometools.propono.blogclient.BaseBlogEntry
      extended by org.rometools.propono.blogclient.metaweblog.MetaWeblogEntry
          extended by org.rometools.propono.blogclient.metaweblog.MetaWeblogResource
All Implemented Interfaces:
BlogEntry, BlogResource

public class MetaWeblogResource
extends MetaWeblogEntry
implements BlogResource

MetaWeblog API implementation of an resource entry.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.rometools.propono.blogclient.BlogEntry
BlogEntry.Category, BlogEntry.Content, BlogEntry.Person
 
Field Summary
 
Fields inherited from class org.rometools.propono.blogclient.BaseBlogEntry
author, categories, content, draft, id, modificationDate, permalink, publicationDate, summary, title
 
Method Summary
 void delete()
          Not supported by MetaWeblog API
 InputStream getAsStream()
          Get media resource as input stream.
 byte[] getBytes()
          Get resource data as byte array.
 String getContentType()
          Get content-type of associated media resource.
 String getName()
          Get resource name (name is required)
 String getToken()
          Get token, which can be used to fetch the blog entry
 void save()
          Save this entry to it's collection.
 void update(byte[] bytes)
          Update resource by immediately uploading new bytes to server
 
Methods inherited from class org.rometools.propono.blogclient.metaweblog.MetaWeblogEntry
equals
 
Methods inherited from class org.rometools.propono.blogclient.BaseBlogEntry
getAuthor, getBlog, getCategories, getContent, getDraft, getId, getModificationDate, getPermalink, getPublicationDate, getSummary, getTitle, setAuthor, setCategories, setContent, setDraft, setModificationDate, setPublicationDate, setSummary, setTitle, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.rometools.propono.blogclient.BlogEntry
getAuthor, getBlog, getCategories, getContent, getDraft, getId, getModificationDate, getPermalink, getPublicationDate, getSummary, getTitle, setAuthor, setCategories, setContent, setDraft, setModificationDate, setPublicationDate, setSummary, setTitle
 

Method Detail

getName

public String getName()
Get resource name (name is required)

Specified by:
getName in interface BlogResource

getToken

public String getToken()
Get token, which can be used to fetch the blog entry

Specified by:
getToken in interface BlogEntry
Overrides:
getToken in class MetaWeblogEntry

getContentType

public String getContentType()
Get content-type of associated media resource.


getAsStream

public InputStream getAsStream()
                        throws BlogClientException
Get media resource as input stream.

Specified by:
getAsStream in interface BlogResource
Throws:
BlogClientException

save

public void save()
          throws BlogClientException
Save this entry to it's collection. If this is a new entry and does not have a collection yet, then save() will save it to the primary collection.

Specified by:
save in interface BlogEntry
Overrides:
save in class MetaWeblogEntry
Throws:
BlogClientException

update

public void update(byte[] bytes)
            throws BlogClientException
Update resource by immediately uploading new bytes to server

Specified by:
update in interface BlogResource
Throws:
BlogClientException

getBytes

public byte[] getBytes()
Get resource data as byte array.


delete

public void delete()
            throws BlogClientException
Not supported by MetaWeblog API

Specified by:
delete in interface BlogEntry
Overrides:
delete in class MetaWeblogEntry
Throws:
BlogClientException


Copyright © 2007-2013 ROME Project. All Rights Reserved.