org.silverpeas.publication.web
Class PublicationEntity

java.lang.Object
  extended by org.silverpeas.publication.web.PublicationEntity
All Implemented Interfaces:
Exposable, Serializable

public class PublicationEntity
extends Object
implements Exposable

Web entity representing a publication that can be serialized into a given media type (JSON, XML).

See Also:
Serialized Form

Method Summary
static PublicationEntity fromPublicationDetail(PublicationDetail publication, URI uri)
          Creates a new publication entity from the specified publication.
protected  List<AttachmentEntity> getAttachments()
           
 String getComponentId()
          Gets the identifier of the Silverpeas component instance which the publication belongs to.
 String getDescription()
           
 String getId()
          Gets the unique identifier of the publication.
 int getImportance()
           
 String getKeywords()
           
 String getName()
           
 Date getUpdateDate()
           
 URI getURI()
          Gets the URI at which this resource is published and can be accessed.
protected  void setAttachments(List<AttachmentEntity> attachments)
           
 void setCreator(UserDetail user)
           
 void setDescription(String description)
           
 void setImportance(int importance)
           
 void setKeywords(String keywords)
           
 void setName(String name)
           
 void setUpdateDate(Date updateDate)
           
 void setUri(URI uri)
           
 PublicationDetail toPublicationDetail()
           
 PublicationEntity withAttachments(Collection<SimpleDocument> attachmentDetails)
           
 PublicationEntity withSharedContent(SharingContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getURI

public URI getURI()
Description copied from interface: Exposable
Gets the URI at which this resource is published and can be accessed.

Specified by:
getURI in interface Exposable
Returns:
the web resource URI.

getId

public String getId()
Gets the unique identifier of the publication.

Returns:
the publication identifier.

getComponentId

public String getComponentId()
Gets the identifier of the Silverpeas component instance which the publication belongs to.

Returns:
the silverpeas component instance identifier.

fromPublicationDetail

public static PublicationEntity fromPublicationDetail(PublicationDetail publication,
                                                      URI uri)
Creates a new publication entity from the specified publication.

Parameters:
publication - the publication to entitify.

withAttachments

public PublicationEntity withAttachments(Collection<SimpleDocument> attachmentDetails)

withSharedContent

public PublicationEntity withSharedContent(SharingContext context)

setUri

public void setUri(URI uri)

setName

public void setName(String name)

getName

public String getName()

setDescription

public void setDescription(String description)

getDescription

public String getDescription()

setKeywords

public void setKeywords(String keywords)

getKeywords

public String getKeywords()

getImportance

public int getImportance()

setImportance

public void setImportance(int importance)

setUpdateDate

public void setUpdateDate(Date updateDate)

getUpdateDate

public Date getUpdateDate()

setCreator

public void setCreator(UserDetail user)

setAttachments

protected void setAttachments(List<AttachmentEntity> attachments)

getAttachments

protected List<AttachmentEntity> getAttachments()

toPublicationDetail

public PublicationDetail toPublicationDetail()


Copyright © 2016 Silverpeas. All Rights Reserved.