com.stratelia.webactiv.util.publication.model
Class PublicationDetail

java.lang.Object
  extended by com.silverpeas.util.i18n.AbstractI18NBean<PublicationI18N>
      extended by com.stratelia.webactiv.util.publication.model.PublicationDetail
All Implemented Interfaces:
SilverpeasContent, I18NBean<PublicationI18N>, SilverContentInterface, Serializable, Cloneable, Rateable

public class PublicationDetail
extends AbstractI18NBean<PublicationI18N>
implements SilverContentInterface, SilverpeasContent, Rateable, Serializable, Cloneable

This object contains the description of a publication

See Also:
Serialized Form

Field Summary
static String CLONE
           
static String DRAFT
           
static String REFUSED
           
static String TO_VALIDATE
           
static String TYPE
           
static String VALID
           
 
Constructor Summary
PublicationDetail()
          Default contructor, required for castor mapping in importExport.
PublicationDetail(PublicationPK pk, String name, String description, Date creationDate, Date beginDate, Date endDate, String creatorId, int importance, String version, String keywords, String content)
           
PublicationDetail(PublicationPK pk, String name, String description, Date creationDate, Date beginDate, Date endDate, String creatorId, int importance, String version, String keywords, String content, String status)
           
PublicationDetail(PublicationPK pk, String name, String description, Date creationDate, Date beginDate, Date endDate, String creatorId, int importance, String version, String keywords, String content, String status, Date updateDate)
           
PublicationDetail(PublicationPK pk, String name, String description, Date creationDate, Date beginDate, Date endDate, String creatorId, int importance, String version, String keywords, String content, String status, Date updateDate, String updaterId)
          Deprecated. @param pk
PublicationDetail(PublicationPK pk, String name, String description, Date creationDate, Date beginDate, Date endDate, String creatorId, int importance, String version, String keywords, String content, String status, Date updateDate, String updaterId, Date validateDate, String validatorId)
          Deprecated.  
PublicationDetail(PublicationPK pk, String name, String description, Date creationDate, Date beginDate, Date endDate, String creatorId, int importance, String version, String keywords, String content, String status, Date updateDate, String updaterId, Date validateDate, String validatorId, String author)
           
PublicationDetail(PublicationPK pk, String name, String description, Date creationDate, Date beginDate, Date endDate, String creatorId, int importance, String version, String keywords, String content, String status, Date updateDate, String updaterId, String author)
           
PublicationDetail(String name, String description, Period visibilityPeriod, String creatorId, String componentId)
           
PublicationDetail(String id, String name, String description, Date creationDate, Date beginDate, Date endDate, String creatorId, String importance, String version, String keywords, String content)
           
PublicationDetail(String id, String name, String description, Date creationDate, Date beginDate, Date endDate, String creatorId, String importance, String version, String keywords, String content, String status)
          Deprecated. @param id
PublicationDetail(String id, String name, String description, Date creationDate, Date beginDate, Date endDate, String creatorId, String importance, String version, String keywords, String content, String status, Date updateDate)
           
PublicationDetail(String id, String name, String description, Date creationDate, Date beginDate, Date endDate, String creatorId, String importance, String version, String keywords, String content, String status, Date updateDate, String updaterId)
           
PublicationDetail(String id, String name, String description, Date creationDate, Date beginDate, Date endDate, String creatorId, String importance, String version, String keywords, String content, String status, Date updateDate, String updaterId, Date validateDate, String validatorId)
           
PublicationDetail(String id, String name, String description, Date creationDate, Date beginDate, Date endDate, String creatorId, String importance, String version, String keywords, String content, String status, String updaterId, String author)
           
 
Method Summary
 boolean canBeAccessedBy(UserDetail user)
          Is the specified user can access this publication?
 boolean canBeModifiedBy(UserDetail user)
          Is the specified user can access this publication on persist context?
 Object clone()
           
 boolean equals(Object o)
           
 Collection<SimpleDocument> getAttachments()
           
 String getAuthor()
           
 Date getBeginDate()
           
 Date getBeginDateAndHour()
           
 String getBeginHour()
           
 String getCloneId()
           
 PublicationPK getClonePK()
           
 String getCloneStatus()
           
 String getComponentInstanceId()
          Gets the unique identifier of the Silverpeas component instance that manages this content.
 String getContent()
           
 String getContributionType()
          Gets the type of this content.
 Date getCreationDate()
          Gets the date at which this content was created.
 UserDetail getCreator()
          Gets the author that has created this content.
 String getCreatorId()
           
 String getCreatorName()
           
 String getDate()
           
 String getDefaultUrl(String componentName)
           
 Date getDraftOutDate()
           
 Date getEndDate()
           
 Date getEndDateAndHour()
           
 String getEndHour()
           
 int getExplicitRank()
           
 String getFieldValue(String fieldNameAndLanguage)
           
 HashMap<String,String> getFormValues(String language)
           
 String getIconUrl()
           
 String getId()
          Gets the identifier of this content in the Silverpeas component providing it.
 String getImage()
           
 String getImageMimeType()
           
 int getImportance()
           
 int getIndexOperation()
           
 String getInfoId()
           
 String getInstanceId()
           
 String getKeywords()
           
 String getKeywords(String lang)
           
 int getNbAccess()
           
 PublicationPK getPK()
           
 PublicationBm getPublicationBm()
           
 ContributionRating getRating()
          Gets the rating informations linked with the current publication.
static String getResourceType()
          The type of this resource
 String getSilverCreationDate()
           
 String getSilverObjectId()
           
 String getSilverpeasContentId()
          Gets the unique identifier of this content among all the contents managed in the Silverpeas collaborative portal.
 String getStatus()
           
 String getTargetValidatorId()
           
 ThumbnailDetail getThumbnail()
           
 String getTitle()
          Gets the title of this content if any.
 Date getUpdateDate()
           
 String getUpdaterId()
           
 String getURL()
           
 Date getValidateDate()
           
 String getValidatorId()
           
 String getVersion()
           
 Period getVisibilityPeriod()
           
 String getWysiwyg()
           
 List<XMLField> getXmlFields()
          *************************************************************************************
 List<XMLField> getXmlFields(String language)
           
 int hashCode()
           
 boolean haveGotClone()
           
 boolean isAlias()
           
 boolean isClone()
           
 boolean isDraft()
           
 boolean isIndexable()
           
 boolean isNoMoreVisible()
           
 boolean isNotYetVisible()
           
 boolean isPublicationEditor(String userId)
           
 boolean isRefused()
           
 boolean isStatusMustBeChecked()
           
 boolean isUpdateDateMustBeSet()
           
 boolean isValid()
           
 boolean isValidationRequired()
           
 boolean isVisible()
           
 void setAlias(boolean alias)
           
 void setAuthor(String author)
           
 void setBeginDate(Date beginDate)
           
 void setBeginHour(String hour)
           
 void setCloneId(String tempPubId)
           
 void setCloneStatus(String cloneStatus)
           
 void setContent(String content)
           
 void setCreationDate(Date creationDate)
           
 void setCreatorId(String creatorId)
           
 void setCreatorName(String creatorName)
           
 void setDraftOutDate(Date draftOutDate)
           
 void setEndDate(Date endDate)
           
 void setEndHour(String hour)
           
 void setExplicitRank(int explicitRank)
           
 void setIconUrl(String iconUrl)
           
 void setImportance(int importance)
           
 void setIndexOperation(int i)
           
 void setInfoId(String infoId)
           
 void setKeywords(String keywords)
           
 void setNbAccess(int nbAccess)
           
 void setPk(PublicationPK pk)
           
 void setSilverObjectId(int silverObjectId)
           
 void setSilverObjectId(String silverObjectId)
           
 void setStatus(String status)
           
 void setStatusMustBeChecked(boolean statusMustBeChecked)
           
 void setTargetValidatorId(String targetValidatorId)
           
 void setUpdateDate(Date updateDate)
           
 void setUpdateDateMustBeSet(boolean updateDateMustBeSet)
           
 void setUpdaterId(String updaterId)
           
 void setValidateDate(Date validateDate)
           
 void setValidatorId(String validatorId)
           
 void setVersion(String version)
           
 void setVisibilityPeriod(Period period)
           
 String toString()
           
 
Methods inherited from class com.silverpeas.util.i18n.AbstractI18NBean
addTranslation, getClonedTranslations, getDescription, getDescription, getLanguage, getLanguages, getLanguageToDisplay, getName, getName, getNextTranslation, getTranslation, getTranslationId, getTranslations, isRemoveTranslation, setDescription, setLanguage, setName, setRemoveTranslation, setTranslationId, setTranslations, setTranslations, setTranslations
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.stratelia.silverpeas.contentManager.SilverContentInterface
getDescription, getDescription, getLanguages, getName, getName
 
Methods inherited from interface com.silverpeas.SilverpeasContent
getDescription
 

Field Detail

DRAFT

public static final String DRAFT
See Also:
Constant Field Values

VALID

public static final String VALID
See Also:
Constant Field Values

TO_VALIDATE

public static final String TO_VALIDATE
See Also:
Constant Field Values

REFUSED

public static final String REFUSED
See Also:
Constant Field Values

CLONE

public static final String CLONE
See Also:
Constant Field Values

TYPE

public static final String TYPE
See Also:
Constant Field Values
Constructor Detail

PublicationDetail

public PublicationDetail()
Default contructor, required for castor mapping in importExport.


PublicationDetail

public PublicationDetail(String name,
                         String description,
                         Period visibilityPeriod,
                         String creatorId,
                         String componentId)

PublicationDetail

public PublicationDetail(PublicationPK pk,
                         String name,
                         String description,
                         Date creationDate,
                         Date beginDate,
                         Date endDate,
                         String creatorId,
                         int importance,
                         String version,
                         String keywords,
                         String content)

PublicationDetail

public PublicationDetail(String id,
                         String name,
                         String description,
                         Date creationDate,
                         Date beginDate,
                         Date endDate,
                         String creatorId,
                         String importance,
                         String version,
                         String keywords,
                         String content)
Parameters:
id -
name -
description -
creationDate -
beginDate -
endDate -
creatorId -
importance -
version -
keywords -
content -

PublicationDetail

public PublicationDetail(PublicationPK pk,
                         String name,
                         String description,
                         Date creationDate,
                         Date beginDate,
                         Date endDate,
                         String creatorId,
                         int importance,
                         String version,
                         String keywords,
                         String content,
                         String status)

PublicationDetail

public PublicationDetail(PublicationPK pk,
                         String name,
                         String description,
                         Date creationDate,
                         Date beginDate,
                         Date endDate,
                         String creatorId,
                         int importance,
                         String version,
                         String keywords,
                         String content,
                         String status,
                         Date updateDate)

PublicationDetail

public PublicationDetail(PublicationPK pk,
                         String name,
                         String description,
                         Date creationDate,
                         Date beginDate,
                         Date endDate,
                         String creatorId,
                         int importance,
                         String version,
                         String keywords,
                         String content,
                         String status,
                         Date updateDate,
                         String updaterId)
Deprecated. @param pk

Parameters:
name -
description -
creationDate -
beginDate -
endDate -
creatorId -
importance -
version -
keywords -
content -
status -
updateDate -
updaterId -

PublicationDetail

public PublicationDetail(PublicationPK pk,
                         String name,
                         String description,
                         Date creationDate,
                         Date beginDate,
                         Date endDate,
                         String creatorId,
                         int importance,
                         String version,
                         String keywords,
                         String content,
                         String status,
                         Date updateDate,
                         String updaterId,
                         String author)

PublicationDetail

public PublicationDetail(String id,
                         String name,
                         String description,
                         Date creationDate,
                         Date beginDate,
                         Date endDate,
                         String creatorId,
                         String importance,
                         String version,
                         String keywords,
                         String content,
                         String status)
Deprecated. @param id

Parameters:
name -
description -
creationDate -
beginDate -
endDate -
creatorId -
importance -
version -
keywords -
content -
status -

PublicationDetail

public PublicationDetail(String id,
                         String name,
                         String description,
                         Date creationDate,
                         Date beginDate,
                         Date endDate,
                         String creatorId,
                         String importance,
                         String version,
                         String keywords,
                         String content,
                         String status,
                         String updaterId,
                         String author)

PublicationDetail

public PublicationDetail(String id,
                         String name,
                         String description,
                         Date creationDate,
                         Date beginDate,
                         Date endDate,
                         String creatorId,
                         String importance,
                         String version,
                         String keywords,
                         String content,
                         String status,
                         Date updateDate)

PublicationDetail

public PublicationDetail(String id,
                         String name,
                         String description,
                         Date creationDate,
                         Date beginDate,
                         Date endDate,
                         String creatorId,
                         String importance,
                         String version,
                         String keywords,
                         String content,
                         String status,
                         Date updateDate,
                         String updaterId)

PublicationDetail

public PublicationDetail(String id,
                         String name,
                         String description,
                         Date creationDate,
                         Date beginDate,
                         Date endDate,
                         String creatorId,
                         String importance,
                         String version,
                         String keywords,
                         String content,
                         String status,
                         Date updateDate,
                         String updaterId,
                         Date validateDate,
                         String validatorId)

PublicationDetail

public PublicationDetail(PublicationPK pk,
                         String name,
                         String description,
                         Date creationDate,
                         Date beginDate,
                         Date endDate,
                         String creatorId,
                         int importance,
                         String version,
                         String keywords,
                         String content,
                         String status,
                         Date updateDate,
                         String updaterId,
                         Date validateDate,
                         String validatorId)
Deprecated. 

Parameters:
pk -
name -
description -
creationDate -
beginDate -
endDate -
creatorId -
importance -
version -
keywords -
content -
status -
updateDate -
updaterId -
validateDate -
validatorId -

PublicationDetail

public PublicationDetail(PublicationPK pk,
                         String name,
                         String description,
                         Date creationDate,
                         Date beginDate,
                         Date endDate,
                         String creatorId,
                         int importance,
                         String version,
                         String keywords,
                         String content,
                         String status,
                         Date updateDate,
                         String updaterId,
                         Date validateDate,
                         String validatorId,
                         String author)
Method Detail

getPK

public PublicationPK getPK()

setPk

public void setPk(PublicationPK pk)

getInfoId

public String getInfoId()

setInfoId

public void setInfoId(String infoId)

setCreationDate

public void setCreationDate(Date creationDate)

setBeginDate

public void setBeginDate(Date beginDate)

setEndDate

public void setEndDate(Date endDate)

setVisibilityPeriod

public void setVisibilityPeriod(Period period)

getVisibilityPeriod

public Period getVisibilityPeriod()

setCreatorId

public void setCreatorId(String creatorId)

setContent

public void setContent(String content)

setStatus

public void setStatus(String status)

setUpdateDate

public void setUpdateDate(Date updateDate)

setUpdaterId

public void setUpdaterId(String updaterId)

setAuthor

public void setAuthor(String author)

getCreationDate

public Date getCreationDate()
Description copied from interface: SilverpeasContent
Gets the date at which this content was created.

Specified by:
getCreationDate in interface SilverpeasContent
Returns:
the date at which this content was created.

getBeginDate

public Date getBeginDate()

getEndDate

public Date getEndDate()

getCreatorId

public String getCreatorId()
Specified by:
getCreatorId in interface SilverContentInterface

getCreator

public UserDetail getCreator()
Description copied from interface: SilverpeasContent
Gets the author that has created this content.

Specified by:
getCreator in interface SilverpeasContent
Returns:
the detail about the user that created this content.

getImportance

public int getImportance()

getVersion

public String getVersion()

getKeywords

public String getKeywords()

getKeywords

public String getKeywords(String lang)

getContent

public String getContent()

getStatus

public String getStatus()

getImage

public String getImage()

getImageMimeType

public String getImageMimeType()

getThumbnail

public ThumbnailDetail getThumbnail()

getUpdateDate

public Date getUpdateDate()

getUpdaterId

public String getUpdaterId()

getAuthor

public String getAuthor()

toString

public String toString()
Overrides:
toString in class Object

getValidateDate

public Date getValidateDate()

getValidatorId

public String getValidatorId()

setValidateDate

public void setValidateDate(Date validateDate)

setValidatorId

public void setValidatorId(String validatorId)

setBeginHour

public void setBeginHour(String hour)

getBeginHour

public String getBeginHour()

setEndHour

public void setEndHour(String hour)

getEndHour

public String getEndHour()

setSilverObjectId

public void setSilverObjectId(String silverObjectId)

setSilverObjectId

public void setSilverObjectId(int silverObjectId)

getSilverObjectId

public String getSilverObjectId()

getURL

public String getURL()
Specified by:
getURL in interface SilverContentInterface

getId

public String getId()
Description copied from interface: SilverpeasContent
Gets the identifier of this content in the Silverpeas component providing it. This identifier is only unique among all of the contents managed by the same component (whatever its different instances). As each type of contents in Silverpeas is provided by a single Silverpeas component, the identifier of a content is then specific to the component it belongs to. It is a way for an instance of a such component to identify uniquely the different contents it manages. So, each component can have their own policy to identify their content, whatever the way they are identified in Silverpeas.

Specified by:
getId in interface SilverpeasContent
Specified by:
getId in interface SilverContentInterface
Returns:
the identifier of this content.

getInstanceId

public String getInstanceId()
Specified by:
getInstanceId in interface SilverContentInterface

getDate

public String getDate()
Specified by:
getDate in interface SilverContentInterface

getSilverCreationDate

public String getSilverCreationDate()
Specified by:
getSilverCreationDate in interface SilverContentInterface

getTitle

public String getTitle()
Description copied from interface: SilverpeasContent
Gets the title of this content if any.

Specified by:
getTitle in interface SilverpeasContent
Returns:
the resource title. Can be empty if no title was set or no title is defined for a such content.

setIconUrl

public void setIconUrl(String iconUrl)

getIconUrl

public String getIconUrl()
Specified by:
getIconUrl in interface SilverContentInterface

getXmlFields

public List<XMLField> getXmlFields()
*************************************************************************************


getXmlFields

public List<XMLField> getXmlFields(String language)

getFormValues

public HashMap<String,String> getFormValues(String language)

getFieldValue

public String getFieldValue(String fieldNameAndLanguage)

getPublicationBm

public PublicationBm getPublicationBm()

getAttachments

public Collection<SimpleDocument> getAttachments()

getWysiwyg

public String getWysiwyg()

setImportance

public void setImportance(int importance)

setKeywords

public void setKeywords(String keywords)

setVersion

public void setVersion(String version)

getCreatorName

public String getCreatorName()

setCreatorName

public void setCreatorName(String creatorName)

getIndexOperation

public int getIndexOperation()

setIndexOperation

public void setIndexOperation(int i)

getDefaultUrl

public String getDefaultUrl(String componentName)

isStatusMustBeChecked

public boolean isStatusMustBeChecked()

setStatusMustBeChecked

public void setStatusMustBeChecked(boolean statusMustBeChecked)

getTargetValidatorId

public String getTargetValidatorId()

setTargetValidatorId

public void setTargetValidatorId(String targetValidatorId)

getCloneId

public String getCloneId()

setCloneId

public void setCloneId(String tempPubId)

haveGotClone

public boolean haveGotClone()

isClone

public boolean isClone()

isValid

public boolean isValid()

isValidationRequired

public boolean isValidationRequired()

isRefused

public boolean isRefused()

isDraft

public boolean isDraft()

getClonePK

public PublicationPK getClonePK()

clone

public Object clone()
Overrides:
clone in class Object

getCloneStatus

public String getCloneStatus()

setCloneStatus

public void setCloneStatus(String cloneStatus)

isUpdateDateMustBeSet

public boolean isUpdateDateMustBeSet()

setUpdateDateMustBeSet

public void setUpdateDateMustBeSet(boolean updateDateMustBeSet)

getNbAccess

public int getNbAccess()

setNbAccess

public void setNbAccess(int nbAccess)

isVisible

public boolean isVisible()

isNoMoreVisible

public boolean isNoMoreVisible()

isNotYetVisible

public boolean isNotYetVisible()

getBeginDateAndHour

public Date getBeginDateAndHour()

getEndDateAndHour

public Date getEndDateAndHour()

getDraftOutDate

public Date getDraftOutDate()

setDraftOutDate

public void setDraftOutDate(Date draftOutDate)

isIndexable

public boolean isIndexable()

isPublicationEditor

public boolean isPublicationEditor(String userId)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getComponentInstanceId

public String getComponentInstanceId()
Description copied from interface: SilverpeasContent
Gets the unique identifier of the Silverpeas component instance that manages this content.

Specified by:
getComponentInstanceId in interface SilverpeasContent
Returns:
the unique identifier of the component instance in the Silverpeas collaborative portal.

getContributionType

public String getContributionType()
Description copied from interface: SilverpeasContent
Gets the type of this content.

Specified by:
getContributionType in interface SilverpeasContent
Returns:
the resource type. This can be Post, Message, Publication, Survey...

canBeAccessedBy

public boolean canBeAccessedBy(UserDetail user)
Is the specified user can access this publication?

A user can access a publication if he has enough rights to access both the application instance in which is managed this publication and one of the nodes to which this publication belongs to.

Specified by:
canBeAccessedBy in interface SilverpeasContent
Parameters:
user - a user in Silverpeas.
Returns:
true if the user can access this publication, false otherwise.

canBeModifiedBy

public boolean canBeModifiedBy(UserDetail user)
Is the specified user can access this publication on persist context?

A user can access a publication on persist context if he has enough rights to access both the application instance in which is managed this publication and one of the nodes to which this publication belongs to.

Parameters:
user - a user in Silverpeas.
Returns:
true if the user can access this publication, false otherwise.

getResourceType

public static String getResourceType()
The type of this resource

Returns:
the same value returned by getContributionType()

getSilverpeasContentId

public String getSilverpeasContentId()
Description copied from interface: SilverpeasContent
Gets the unique identifier of this content among all the contents managed in the Silverpeas collaborative portal. It is the alone unique identifier of a content in the whole Silverpeas portal and it is refered as the Silverpeas content identifier or the silver content identifier. For each content put into the Silverpeas collaborative portal, an entry is uniquely created in the whole system so that is can be refered by transversal services and by component instances others the one that manages it. For compatibility reason, the Silverpeas content identifier of contents that are no yet taken into account in the whole system isn't defined, so an empty string is then returned.

Specified by:
getSilverpeasContentId in interface SilverpeasContent
Returns:
the unique identifier of this content in the whole Silverpeas collaborative portal. Can be empty if no such identifier is defined for the type of this content.

setExplicitRank

public void setExplicitRank(int explicitRank)

getExplicitRank

public int getExplicitRank()

getRating

public ContributionRating getRating()
Gets the rating informations linked with the current publication.

Specified by:
getRating in interface Rateable
Returns:
the rating of the publication.
See Also:
ContributionRating

setAlias

public void setAlias(boolean alias)

isAlias

public boolean isAlias()


Copyright © 2016 Silverpeas. All Rights Reserved.