org.rometools.propono.atom.client
Class ClientEntry

java.lang.Object
  extended by com.sun.syndication.feed.atom.Entry
      extended by org.rometools.propono.atom.client.ClientEntry
All Implemented Interfaces:
com.sun.syndication.feed.module.Extendable, Serializable, Cloneable
Direct Known Subclasses:
ClientMediaEntry

public class ClientEntry
extends com.sun.syndication.feed.atom.Entry

Client implementation of Atom entry, extends ROME Entry to add methods for easily getting/setting content, updating and removing the entry from the server.

See Also:
Serialized Form

Constructor Summary
ClientEntry(ClientAtomService service, ClientCollection collection)
           
ClientEntry(ClientAtomService service, ClientCollection collection, com.sun.syndication.feed.atom.Entry entry, boolean partial)
           
 
Method Summary
 boolean equals(Object o)
          Determines if entries are equal based on edit URI.
 com.sun.syndication.feed.atom.Content getContent()
          Convenience method to get first content object in content collection.
 String getEditURI()
          Get the URI that can be used to edit the entry via HTTP PUT or DELETE.
 void remove()
          Remove entry from server.
 void setContent(com.sun.syndication.feed.atom.Content c)
          Convenience method to set first content object in content collection.
 void setContent(String contentString, String type)
          Set content of entry.
 void update()
          Update entry by posting new representation of entry to server.
 
Methods inherited from class com.sun.syndication.feed.atom.Entry
clone, findRelatedLink, getAlternateLinks, getAuthors, getCategories, getContents, getContributors, getCreated, getForeignMarkup, getId, getIssued, getModified, getModule, getModules, getOtherLinks, getPublished, getRights, getSource, getSummary, getTitle, getTitleEx, getUpdated, getXmlBase, hashCode, isMediaEntry, setAlternateLinks, setAuthors, setCategories, setContents, setContributors, setCreated, setForeignMarkup, setId, setIssued, setModified, setModules, setOtherLinks, setPublished, setRights, setSource, setSummary, setTitle, setTitleEx, setUpdated, setXmlBase, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClientEntry

public ClientEntry(ClientAtomService service,
                   ClientCollection collection)

ClientEntry

public ClientEntry(ClientAtomService service,
                   ClientCollection collection,
                   com.sun.syndication.feed.atom.Entry entry,
                   boolean partial)
            throws ProponoException
Throws:
ProponoException
Method Detail

setContent

public void setContent(String contentString,
                       String type)
Set content of entry.

Parameters:
contentString - content string.
type - Must be "text" for plain text, "html" for escaped HTML, "xhtml" for XHTML or a valid MIME content-type.

setContent

public void setContent(com.sun.syndication.feed.atom.Content c)
Convenience method to set first content object in content collection. Atom 1.0 allows only one content element per entry.


getContent

public com.sun.syndication.feed.atom.Content getContent()
Convenience method to get first content object in content collection. Atom 1.0 allows only one content element per entry.


equals

public boolean equals(Object o)
Determines if entries are equal based on edit URI.

Overrides:
equals in class com.sun.syndication.feed.atom.Entry

update

public void update()
            throws ProponoException
Update entry by posting new representation of entry to server. Note that you should not attempt to update entries that you get from iterating over a collection they may be "partial" entries. If you want to update an entry, you must get it via one of the getEntry() methods in com.sun.syndication.propono.atom.common.Collection or com.sun.syndication.propono.atom.common.AtomService.

Throws:
ProponoException - If entry is a "partial" entry.

remove

public void remove()
            throws ProponoException
Remove entry from server.

Throws:
ProponoException

getEditURI

public String getEditURI()
Get the URI that can be used to edit the entry via HTTP PUT or DELETE.



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