Class Document
java.lang.Object
fr.paris.lutece.plugins.document.business.Document
- All Implemented Interfaces:
fr.paris.lutece.portal.service.i18n.Localizable,fr.paris.lutece.portal.service.resource.IExtendableResource
public class Document
extends Object
implements fr.paris.lutece.portal.service.i18n.Localizable, fr.paris.lutece.portal.service.resource.IExtendableResource
A document of the CMS.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns Actions ListgetAttribute(String strAttributeCode) Returns a document attribute by its codeReturns attributes ListReturns the CodeDocumentTypeReturns the CommentintReturns the IdCreatorReturns the DateCreationReturns the Date of the last ModificationReturns the begining Date of the validity period of the documentReturns the end Date of the validity period of the documentintgetId()Returns the IdDocumentReturns the LocaleintReturns the IdMailingListintReturns the IdPageTemplateDocumentintReturns the PublishedSTatusgetSpace()Returns the SpaceintReturns the IdSpacegetState()Returns the StateintReturns the IdStateReturns the StateReturns the SummaryReturns a Thumbnail url for the document based on a document attribute or on the document type.getTitle()Returns the TitlegetType()Returns the TypegetXml(jakarta.servlet.http.HttpServletRequest request, int nIdPortlet) Returns the xml of this documentgetXmlDocument(jakarta.servlet.http.HttpServletRequest request, int nIdPortlet) Returns the xml document of this linkReturns the XmlMetadataReturns the XmlValidatedContentReturns the XmlWorkingContentbooleanControl that an document is out of date, i.e. dateValidityEnd has expired :booleanReturns the SkipCategoriesbooleanReturns the SkipPortletbooleanisValid()Control that an document is valid, i.e. that its period of validity defined by its dateValidityBegin and its dateValidityEnd is valid : an document is valid if the current date > = dateValidityBegin and if current date < = dateValidityEnd If the two dates are null, the test of validity will return true if one of the dates is null, the result of the test will be that carried out on the non null datevoidsetActions(List listActions) Set the document Actions listvoidsetAttributes(List<DocumentAttribute> listAttributes) Set the document attributes listvoidsetCategories(List<Category> listCategory) voidsetCodeDocumentType(String strCodeDocumentType) Sets the CodeDocumentTypevoidsetComment(String strComment) Sets the CommentvoidsetCreatorId(int nIdCreator) Sets the IdCreatorvoidsetDateCreation(Timestamp dateCreation) Sets the DateCreationvoidsetDateModification(Timestamp dateModification) Sets the Date of the last ModificationvoidsetDateValidityBegin(Timestamp dateValidityBegin) Sets the begining Date of the validity period of the documentvoidsetDateValidityEnd(Timestamp dateValidityEnd) Sets the end Date of the validity period of the documentvoidsetId(int nIdDocument) Sets the IdDocumentvoidSets the LocalevoidsetMailingListId(int nIdMailingList) Sets the IdMailingListvoidsetPageTemplateDocumentId(int nIdPageTemplateDocument) Sets the IdPageTemplateDocumentvoidsetPublishedStatus(int nPublishedStatus) voidsetSkipCategories(boolean bSkipCategories) Sets the SkipCategoriesvoidsetSkipPortlet(boolean bSkipPortlet) Sets the SkipPortletvoidSets the SpacevoidsetSpaceId(int nIdSpace) Sets the IdSpacevoidsetStateId(int nIdState) Sets the IdStatevoidsetStateKey(String strState) Sets the StatevoidsetSummary(String strSummary) Sets the SummaryvoidSets the TitlevoidSets the TypevoidsetXmlMetadata(String strXmlMetadata) Sets the XmlMetadatavoidsetXmlValidatedContent(String strXmlValidatedContent) Sets the XmlValidatedContentvoidsetXmlWorkingContent(String strXmlWorkingContent) Sets the XmlWorkingContent
-
Field Details
-
CODE_DOCUMENT_TYPE_DOWNLOAD
- See Also:
-
CODE_DOCUMENT_TYPE_IMAGE
- See Also:
-
PROPERTY_RESOURCE_TYPE
- See Also:
-
-
Constructor Details
-
Document
public Document()
-
-
Method Details
-
getId
public int getId()Returns the IdDocument- Returns:
- The IdDocument
-
setId
public void setId(int nIdDocument) Sets the IdDocument- Parameters:
nIdDocument- The IdDocument
-
getLocale
Returns the Locale- Returns:
- The Locale
-
setLocale
Sets the Locale- Specified by:
setLocalein interfacefr.paris.lutece.portal.service.i18n.Localizable- Parameters:
locale- The Locale
-
getCodeDocumentType
Returns the CodeDocumentType- Returns:
- The CodeDocumentType
-
setCodeDocumentType
Sets the CodeDocumentType- Parameters:
strCodeDocumentType- The CodeDocumentType
-
getTitle
Returns the Title- Returns:
- The Title
-
setTitle
Sets the Title- Parameters:
strTitle- The Title
-
getSummary
Returns the Summary- Returns:
- The Summary
-
setSummary
Sets the Summary- Parameters:
strSummary- The Summary
-
getDateCreation
Returns the DateCreation- Returns:
- The DateCreation
-
setDateCreation
Sets the DateCreation- Parameters:
dateCreation- The DateCreation
-
getCreatorId
public int getCreatorId()Returns the IdCreator- Returns:
- The IdCreator
-
setCreatorId
public void setCreatorId(int nIdCreator) Sets the IdCreator- Parameters:
nIdCreator- The IdCreator
-
getDateModification
Returns the Date of the last Modification- Returns:
- The Date of the last Modification
-
setDateModification
Sets the Date of the last Modification- Parameters:
dateModification- The Date of the last Modification
-
getDateValidityBegin
Returns the begining Date of the validity period of the document- Returns:
- The begining Date of the validity period of the document
-
setDateValidityBegin
Sets the begining Date of the validity period of the document- Parameters:
dateValidityBegin- The begining Date of the validity period of the document
-
getDateValidityEnd
Returns the end Date of the validity period of the document- Returns:
- The end Date of the validity period of the document
-
setDateValidityEnd
Sets the end Date of the validity period of the document- Parameters:
dateValidityEnd- The end Date of the validity period of the document
-
getComment
Returns the Comment- Returns:
- The Comment
-
setComment
Sets the Comment- Parameters:
strComment- The Comment
-
getXmlWorkingContent
Returns the XmlWorkingContent- Returns:
- The XmlWorkingContent
-
setXmlWorkingContent
Sets the XmlWorkingContent- Parameters:
strXmlWorkingContent- The XmlWorkingContent
-
getXmlValidatedContent
Returns the XmlValidatedContent- Returns:
- The XmlValidatedContent
-
setXmlValidatedContent
Sets the XmlValidatedContent- Parameters:
strXmlValidatedContent- The XmlValidatedContent
-
getXmlMetadata
Returns the XmlMetadata- Returns:
- The XmlMetadata
-
setXmlMetadata
Sets the XmlMetadata- Parameters:
strXmlMetadata- The XmlMetadata
-
getSpaceId
public int getSpaceId()Returns the IdSpace- Returns:
- The IdSpace
-
setSpaceId
public void setSpaceId(int nIdSpace) Sets the IdSpace- Parameters:
nIdSpace- The IdSpace
-
getSpace
Returns the Space- Returns:
- The Space
-
setSpace
Sets the Space- Parameters:
strSpace- The Space
-
getStateId
public int getStateId()Returns the IdState- Returns:
- The IdState
-
setStateId
public void setStateId(int nIdState) Sets the IdState- Parameters:
nIdState- The IdState
-
getStateKey
Returns the State- Returns:
- The State
-
getState
Returns the State- Returns:
- The State
-
setStateKey
Sets the State- Parameters:
strState- The State
-
getMailingListId
public int getMailingListId()Returns the IdMailingList- Returns:
- The IdMailingList
-
setMailingListId
public void setMailingListId(int nIdMailingList) Sets the IdMailingList- Parameters:
nIdMailingList- The IdMailingList
-
getPageTemplateDocumentId
public int getPageTemplateDocumentId()Returns the IdPageTemplateDocument- Returns:
- The IdPageTemplateDocument
-
setPageTemplateDocumentId
public void setPageTemplateDocumentId(int nIdPageTemplateDocument) Sets the IdPageTemplateDocument- Parameters:
nIdPageTemplateDocument- The IdPageTemplateDocument
-
getAttributes
Returns attributes List- Returns:
- The document attributes list
-
setAttributes
Set the document attributes list- Parameters:
listAttributes- The document attributes list
-
getActions
Returns Actions List- Returns:
- The document Actions list
-
setActions
Set the document Actions list- Parameters:
listActions- The document Actions list
-
getType
Returns the Type- Returns:
- The Type
-
setType
Sets the Type- Parameters:
strType- The Type
-
getCategories
- Returns:
- the _listCategory
-
setCategories
- Parameters:
listCategory- the _listCategory to set
-
setPublishedStatus
public void setPublishedStatus(int nPublishedStatus) - Parameters:
nPublishedStatus- the nPublishedStatus to set
-
getPublishedStatus
public int getPublishedStatus()Returns the PublishedSTatus- Returns:
- The PublishedSTatus
-
isSkipPortlet
public boolean isSkipPortlet()Returns the SkipPortlet- Returns:
- The SkipPortlet
-
setSkipPortlet
public void setSkipPortlet(boolean bSkipPortlet) Sets the SkipPortlet- Parameters:
bSkipPortlet- The SkipPortlet
-
isSkipCategories
public boolean isSkipCategories()Returns the SkipCategories- Returns:
- The SkipCategories
-
setSkipCategories
public void setSkipCategories(boolean bSkipCategories) Sets the SkipCategories- Parameters:
bSkipCategories- The SkipCategories
-
getThumbnail
Returns a Thumbnail url for the document based on a document attribute or on the document type.- Returns:
- A Thumbnail url
-
getXml
Returns the xml of this document- Parameters:
request- The HTTP Servlet requestnIdPortlet- the id of the portlet where the document is published- Returns:
- the link xml
-
getXmlDocument
Returns the xml document of this link- Parameters:
nIdPortlet- the id of the portlet where the document is publishedrequest- The HTTP servlet request- Returns:
- the link xml document
-
getAttribute
Returns a document attribute by its code- Parameters:
strAttributeCode- The Attribute Code- Returns:
- the attribute object corresponding to the code
-
isValid
public boolean isValid()Control that an document is valid, i.e. that its period of validity defined by its dateValidityBegin and its dateValidityEnd is valid : an document is valid if the current date > = dateValidityBegin and if current date < = dateValidityEnd If the two dates are null, the test of validity will return true if one of the dates is null, the result of the test will be that carried out on the non null date- Returns:
- true if the document is valid, false otherwise
-
isOutOfDate
public boolean isOutOfDate()Control that an document is out of date, i.e. dateValidityEnd has expired :- Returns:
- true if the document is out of date, false otherwise
-
getIdExtendableResource
- Specified by:
getIdExtendableResourcein interfacefr.paris.lutece.portal.service.resource.IExtendableResource
-
getExtendableResourceType
- Specified by:
getExtendableResourceTypein interfacefr.paris.lutece.portal.service.resource.IExtendableResource
-
getExtendableResourceName
- Specified by:
getExtendableResourceNamein interfacefr.paris.lutece.portal.service.resource.IExtendableResource
-
getExtendableResourceDescription
- Specified by:
getExtendableResourceDescriptionin interfacefr.paris.lutece.portal.service.resource.IExtendableResource
-
getExtendableResourceImageUrl
- Specified by:
getExtendableResourceImageUrlin interfacefr.paris.lutece.portal.service.resource.IExtendableResource
-