fr.paris.lutece.plugins.document.business
Class Document

java.lang.Object
  extended by 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
static String CODE_DOCUMENT_TYPE_DOWNLOAD
           
static String CODE_DOCUMENT_TYPE_IMAGE
           
static String PROPERTY_RESOURCE_TYPE
           
 
Constructor Summary
Document()
           
 
Method Summary
 List getActions()
          Returns Actions List
 DocumentAttribute getAttribute(String strAttributeCode)
          Returns a document attribute by its code
 List<DocumentAttribute> getAttributes()
          Returns attributes List
 List<Category> getCategories()
           
 String getCodeDocumentType()
          Returns the CodeDocumentType
 String getComment()
          Returns the Comment
 int getCreatorId()
          Returns the IdCreator
 Timestamp getDateCreation()
          Returns the DateCreation
 Timestamp getDateModification()
          Returns the Date of the last Modification
 Timestamp getDateValidityBegin()
          Returns the begining Date of the validity period of the document
 Timestamp getDateValidityEnd()
          Returns the end Date of the validity period of the document
 String getExtendableResourceDescription()
          
 String getExtendableResourceImageUrl()
          
 String getExtendableResourceName()
          
 String getExtendableResourceType()
          
 int getId()
          Returns the IdDocument
 String getIdExtendableResource()
          
 Locale getLocale()
          Returns the Locale
 int getMailingListId()
          Returns the IdMailingList
 int getPageTemplateDocumentId()
          Returns the IdPageTemplateDocument
 int getPublishedStatus()
          Returns the PublishedSTatus
 String getSpace()
          Returns the Space
 int getSpaceId()
          Returns the IdSpace
 String getState()
          Returns the State
 int getStateId()
          Returns the IdState
 String getStateKey()
          Returns the State
 String getSummary()
          Returns the Summary
 String getThumbnail()
          Returns a Thumbnail url for the document based on a document attribute or on the document type.
 String getTitle()
          Returns the Title
 String getType()
          Returns the Type
 String getXml(javax.servlet.http.HttpServletRequest request, int nIdPortlet)
          Returns the xml of this document
 String getXmlDocument(javax.servlet.http.HttpServletRequest request, int nIdPortlet)
          Returns the xml document of this link
 String getXmlMetadata()
          Returns the XmlMetadata
 String getXmlValidatedContent()
          Returns the XmlValidatedContent
 String getXmlWorkingContent()
          Returns the XmlWorkingContent
 boolean isOutOfDate()
          Control that an document is out of date, i.e. dateValidityEnd has expired :
 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
 void setActions(List listActions)
          Set the document Actions list
 void setAttributes(List<DocumentAttribute> listAttributes)
          Set the document attributes list
 void setCategories(List<Category> listCategory)
           
 void setCodeDocumentType(String strCodeDocumentType)
          Sets the CodeDocumentType
 void setComment(String strComment)
          Sets the Comment
 void setCreatorId(int nIdCreator)
          Sets the IdCreator
 void setDateCreation(Timestamp dateCreation)
          Sets the DateCreation
 void setDateModification(Timestamp dateModification)
          Sets the Date of the last Modification
 void setDateValidityBegin(Timestamp dateValidityBegin)
          Sets the begining Date of the validity period of the document
 void setDateValidityEnd(Timestamp dateValidityEnd)
          Sets the end Date of the validity period of the document
 void setId(int nIdDocument)
          Sets the IdDocument
 void setLocale(Locale locale)
          Sets the Locale
 void setMailingListId(int nIdMailingList)
          Sets the IdMailingList
 void setPageTemplateDocumentId(int nIdPageTemplateDocument)
          Sets the IdPageTemplateDocument
 void setPublishedStatus(int nPublishedStatus)
           
 void setSpace(String strSpace)
          Sets the Space
 void setSpaceId(int nIdSpace)
          Sets the IdSpace
 void setStateId(int nIdState)
          Sets the IdState
 void setStateKey(String strState)
          Sets the State
 void setSummary(String strSummary)
          Sets the Summary
 void setTitle(String strTitle)
          Sets the Title
 void setType(String strType)
          Sets the Type
 void setXmlMetadata(String strXmlMetadata)
          Sets the XmlMetadata
 void setXmlValidatedContent(String strXmlValidatedContent)
          Sets the XmlValidatedContent
 void setXmlWorkingContent(String strXmlWorkingContent)
          Sets the XmlWorkingContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CODE_DOCUMENT_TYPE_DOWNLOAD

public static final String CODE_DOCUMENT_TYPE_DOWNLOAD
See Also:
Constant Field Values

CODE_DOCUMENT_TYPE_IMAGE

public static final String CODE_DOCUMENT_TYPE_IMAGE
See Also:
Constant Field Values

PROPERTY_RESOURCE_TYPE

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

Document

public Document()
Method Detail

getId

public int getId()
Returns the IdDocument

Returns:
The IdDocument

setId

public void setId(int nIdDocument)
Sets the IdDocument

Parameters:
nIdDocument - The IdDocument

getLocale

public Locale getLocale()
Returns the Locale

Returns:
The Locale

setLocale

public void setLocale(Locale locale)
Sets the Locale

Specified by:
setLocale in interface fr.paris.lutece.portal.service.i18n.Localizable
Parameters:
locale - The Locale

getCodeDocumentType

public String getCodeDocumentType()
Returns the CodeDocumentType

Returns:
The CodeDocumentType

setCodeDocumentType

public void setCodeDocumentType(String strCodeDocumentType)
Sets the CodeDocumentType

Parameters:
strCodeDocumentType - The CodeDocumentType

getTitle

public String getTitle()
Returns the Title

Returns:
The Title

setTitle

public void setTitle(String strTitle)
Sets the Title

Parameters:
strTitle - The Title

getSummary

public String getSummary()
Returns the Summary

Returns:
The Summary

setSummary

public void setSummary(String strSummary)
Sets the Summary

Parameters:
strSummary - The Summary

getDateCreation

public Timestamp getDateCreation()
Returns the DateCreation

Returns:
The DateCreation

setDateCreation

public void setDateCreation(Timestamp dateCreation)
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

public Timestamp getDateModification()
Returns the Date of the last Modification

Returns:
The Date of the last Modification

setDateModification

public void setDateModification(Timestamp dateModification)
Sets the Date of the last Modification

Parameters:
dateModification - The Date of the last Modification

getDateValidityBegin

public Timestamp getDateValidityBegin()
Returns the begining Date of the validity period of the document

Returns:
The begining Date of the validity period of the document

setDateValidityBegin

public void setDateValidityBegin(Timestamp dateValidityBegin)
Sets the begining Date of the validity period of the document

Parameters:
dateValidityBegin - The begining Date of the validity period of the document

getDateValidityEnd

public Timestamp getDateValidityEnd()
Returns the end Date of the validity period of the document

Returns:
The end Date of the validity period of the document

setDateValidityEnd

public void setDateValidityEnd(Timestamp dateValidityEnd)
Sets the end Date of the validity period of the document

Parameters:
dateValidityEnd - The end Date of the validity period of the document

getComment

public String getComment()
Returns the Comment

Returns:
The Comment

setComment

public void setComment(String strComment)
Sets the Comment

Parameters:
strComment - The Comment

getXmlWorkingContent

public String getXmlWorkingContent()
Returns the XmlWorkingContent

Returns:
The XmlWorkingContent

setXmlWorkingContent

public void setXmlWorkingContent(String strXmlWorkingContent)
Sets the XmlWorkingContent

Parameters:
strXmlWorkingContent - The XmlWorkingContent

getXmlValidatedContent

public String getXmlValidatedContent()
Returns the XmlValidatedContent

Returns:
The XmlValidatedContent

setXmlValidatedContent

public void setXmlValidatedContent(String strXmlValidatedContent)
Sets the XmlValidatedContent

Parameters:
strXmlValidatedContent - The XmlValidatedContent

getXmlMetadata

public String getXmlMetadata()
Returns the XmlMetadata

Returns:
The XmlMetadata

setXmlMetadata

public void setXmlMetadata(String strXmlMetadata)
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

public String getSpace()
Returns the Space

Returns:
The Space

setSpace

public void setSpace(String strSpace)
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

public String getStateKey()
Returns the State

Returns:
The State

getState

public String getState()
Returns the State

Returns:
The State

setStateKey

public void setStateKey(String strState)
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

public List<DocumentAttribute> getAttributes()
Returns attributes List

Returns:
The document attributes list

setAttributes

public void setAttributes(List<DocumentAttribute> listAttributes)
Set the document attributes list

Parameters:
listAttributes - The document attributes list

getActions

public List getActions()
Returns Actions List

Returns:
The document Actions list

setActions

public void setActions(List listActions)
Set the document Actions list

Parameters:
listActions - The document Actions list

getType

public String getType()
Returns the Type

Returns:
The Type

setType

public void setType(String strType)
Sets the Type

Parameters:
strType - The Type

getCategories

public List<Category> getCategories()
Returns:
the _listCategory

setCategories

public void setCategories(List<Category> listCategory)
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

getThumbnail

public String getThumbnail()
Returns a Thumbnail url for the document based on a document attribute or on the document type.

Returns:
A Thumbnail url

getXml

public String getXml(javax.servlet.http.HttpServletRequest request,
                     int nIdPortlet)
Returns the xml of this document

Parameters:
request - The HTTP Servlet request
nIdPortlet - the id of the portlet where the document is published
Returns:
the link xml

getXmlDocument

public String getXmlDocument(javax.servlet.http.HttpServletRequest request,
                             int nIdPortlet)
Returns the xml document of this link

Parameters:
nIdPortlet - the id of the portlet where the document is published
request - The HTTP servlet request
Returns:
the link xml document

getAttribute

public DocumentAttribute getAttribute(String strAttributeCode)
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

public String getIdExtendableResource()

Specified by:
getIdExtendableResource in interface fr.paris.lutece.portal.service.resource.IExtendableResource

getExtendableResourceType

public String getExtendableResourceType()

Specified by:
getExtendableResourceType in interface fr.paris.lutece.portal.service.resource.IExtendableResource

getExtendableResourceName

public String getExtendableResourceName()

Specified by:
getExtendableResourceName in interface fr.paris.lutece.portal.service.resource.IExtendableResource

getExtendableResourceDescription

public String getExtendableResourceDescription()

Specified by:
getExtendableResourceDescription in interface fr.paris.lutece.portal.service.resource.IExtendableResource

getExtendableResourceImageUrl

public String getExtendableResourceImageUrl()

Specified by:
getExtendableResourceImageUrl in interface fr.paris.lutece.portal.service.resource.IExtendableResource


Copyright © 2014 Mairie de Paris. All Rights Reserved.