Class SimpleDocument
- java.lang.Object
-
- org.silverpeas.core.contribution.attachment.model.SimpleDocument
-
- All Implemented Interfaces:
Serializable,Attachment,Contribution,LocalizedAttachment,LocalizedContribution,LocalizedResource,ResourceTranslation,Translatable,Translation,Identifiable,Instance<Contribution>,Nameable,Securable,SilverpeasResource
- Direct Known Subclasses:
HistorisedDocument,SimpleDocumentVersion
public class SimpleDocument extends Object implements LocalizedAttachment, LocalizedResource, ResourceTranslation, Serializable, Securable
A document file attached to a given user contribution. A document file is itself a user contribution whose content is written in a given language. As such it is then both a localized contribution and its own translation. A localized contribution because it can exist in different languages (rare enough) and a translation by itself because the content of the file is always written in a given language; it is then not a container of several contents, each of them written in a different language. The choice has been made here, in the current context, to not represent such a document as a virtual localized contribution and resource of one or more translation(s) (each of them being a document file) but to merge these different concepts into a single one in this peculiar case of attached document files.- Author:
- ehugonnet, mmoquillon
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTACHMENT_PREFIXstatic StringDOCUMENT_PREFIXstatic StringFILE_PREFIXstatic StringVERSION_PREFIXstatic StringWEBDAV_FOLDER
-
Constructor Summary
Constructors Constructor Description SimpleDocument()SimpleDocument(SimpleDocument simpleDocument)SimpleDocument(SimpleDocumentPK pk, String foreignId, int order, boolean versioned, String editedBy, SimpleAttachment attachment)SimpleDocument(SimpleDocumentPK pk, String foreignId, int order, boolean versioned, SimpleAttachment attachment)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddRolesForWhichDownloadIsAllowed(Collection<SilverpeasRole> allowedRoles)Allows the download for the given roles.voidaddRolesForWhichDownloadIsAllowed(SilverpeasRole... allowedRoles)Allows the download for the given roles.booleanaddRolesForWhichDownloadIsForbidden(Collection<SilverpeasRole> forbiddenRoles)Forbids the download for the given roles.booleanaddRolesForWhichDownloadIsForbidden(SilverpeasRole... forbiddenRoles)Forbids the download for the given roles.booleancanBeAccessedBy(User user)Is the specified user can access this document?booleancanBeModifiedBy(User user)Is the specified user can access this document on persist context?StringcomputeNodeName()voidedit(String currentEditor)Optional<Boolean>editableSimultaneously()Indicates if the attachment can be edited simultaneously into web browser by several users.booleanequals(Object obj)DategetAlert()SimpleAttachmentgetAttachment()StringgetAttachmentPath()Path to the file stored on the filesystem.StringgetAttachmentURL()Returns the attachment URL.StringgetCloneId()Get the value of cloneIdStringgetComment()StringgetContentType()Gets the content type of this attached document file as a predefined MIME type.StringgetCreatedBy()DategetCreationDate()Gets the date at which the resource has been created.UsergetCreator()Gets the user that has created the resource.StringgetDescription()Gets a description about this contribution if any.StringgetDirectoryPath(String language)Path to the directory where the file is to be stored.StringgetDisplayIcon()Gets the path of the icon representing either the attachment itself or its content type.DocumentTypegetDocumentType()StringgetEditedBy()DategetExpiry()StringgetFilename()Gets the name of the document file as stored in the filesystem.StringgetFolder()Set<SilverpeasRole>getForbiddenDownloadForRoles()Gets roles for which download is not allowed.StringgetForeignId()StringgetFullJcrContentPath()Full JCR path to the file node.StringgetFullJcrPath()Full JCR path to the document node.StringgetId()Gets the unique identifier of the object in Silverpeas.ContributionIdentifiergetIdentifier()Gets the unique identifier of this contribution.StringgetInstanceId()StringgetLanguage()Gets the language in which this contribution was authored.SimpleDocumentgetLastPublicVersion()Returns the more recent public version of this document - null if none exists.DategetLastUpdateDate()Gets the date at which the resource has been lastly updated.UsergetLastUpdater()Gets the user that has lastly updated the resource.intgetMajorVersion()Gets the major part of the document version.intgetMinorVersion()Gets the minor part of the document version.StringgetName()Gets the name of this contribution.StringgetNodeName()longgetOldSilverpeasId()StringgetOnlineURL()intgetOrder()SimpleDocumentPKgetPk()StringgetRepositoryPath()Returns the path into the repository.DategetReservation()longgetSize()Gets the size of the document file in the filesystem.StringgetStatus()StringgetTitle()Gets the title of the document.SimpleDocumentgetTranslation(String language)Gets a translation in the specified language about some textual properties of the object.StringgetUniversalURL()StringgetUpdatedBy()StringgetVersion()Gets the version of the document.intgetVersionIndex()Returns the index of document into the history if any and if the document is a versioned one.SimpleDocumentgetVersionMaster()Returns the master of versioned document.StringgetWebdavContentEditionLanguage()Gets the content language handled into webdav for the document.longgetWebdavContentEditionSize()Gets the content size handled into webdav for the document.StringgetWebdavJcrPath()StringgetWebdavUrl()StringgetXmlFormId()inthashCode()static booleanisASimpleDocument(ContributionIdentifier id)booleanisContentArchive()Indicates if the file described by currentSimpleAttachmentis type of archive.booleanisContentImage()Indicates if the file described by currentSimpleAttachmentis type of image.booleanisContentMail()Indicates if the file described by currentSimpleAttachmentis type of mail.booleanisContentPdf()Indicates if the file described by currentSimpleAttachmentis type of pdf.booleanisContentSpinfire()Indicates if the file described by currentSimpleAttachmentis type of 3D.booleanisDisplayableAsContent()Indicates if the attachment content can be displayed as a contribution content.booleanisDownloadAllowedForReaders()Indicates if the download is allowed for readers.booleanisDownloadAllowedForRoles(Set<SilverpeasRole> roles)Indicates if the download of the document is allowed for the given roles.booleanisDownloadAllowedForRolesFrom(User user)Indicates if the download of the document is allowed for the given user in relation to its roles.booleanisEdited()Is this document currently being edited?booleanisEditedBy(User user)Is this document currently being edited by the specified user?booleanisOpenOfficeCompatible()Check if the document is compatible with OpenOffice using the mime type .booleanisPublic()booleanisReadOnly()Is this document in read-only?booleanisSharingAllowedForRolesFrom(User user)booleanisVersioned()Is this attachment versioned?booleanisVersionMaster()Indicates if the current instance is a master one.voidrelease()protected voidresetWebdavContentEditionContext()voidsetAlert(Date alert)voidsetAttachment(SimpleAttachment attachment)voidsetCloneId(String cloneId)Set the value of cloneIdvoidsetComment(String comment)voidsetContentType(String contentType)voidsetCreationDate(Date created)voidsetDescription(String description)voidsetDisplayableAsContent(boolean displayableAsContent)voidsetDocumentType(DocumentType documentType)voidsetEditableSimultaneously(boolean editableSimultaneously)voidsetExpiry(Date expiry)voidsetFilename(String filename)voidsetForeignId(String foreignId)voidsetId(String id)voidsetLanguage(String language)voidsetLastUpdateDate(Date updated)voidsetMajorVersion(int majorVersion)voidsetMinorVersion(int minorVersion)voidsetNodeName(String nodeName)voidsetOldSilverpeasId(long oldSilverpeasId)voidsetOrder(int order)voidsetPK(SimpleDocumentPK pk)voidsetPublicDocument(boolean publicDocument)voidsetRepositoryPath(String repositoryPath)voidsetReservation(Date reservationDate)voidsetSize(long size)voidsetStatus(String status)voidsetTitle(String title)voidsetUpdatedBy(String updatedBy)voidsetVersionIndex(int versionIndex)voidsetVersionMaster(SimpleDocument versionMaster)voidsetXmlFormId(String xmlFormId)StringtoString()voidunlock()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.contribution.model.Contribution
getContributionType, getModel, getResourcePath, isIndexable
-
Methods inherited from interface org.silverpeas.core.security.Securable
canBeDeletedBy, canBeFiledInBy
-
-
-
-
Field Detail
-
WEBDAV_FOLDER
public static final String WEBDAV_FOLDER
- See Also:
- Constant Field Values
-
ATTACHMENT_PREFIX
public static final String ATTACHMENT_PREFIX
- See Also:
- Constant Field Values
-
VERSION_PREFIX
public static final String VERSION_PREFIX
- See Also:
- Constant Field Values
-
FILE_PREFIX
public static final String FILE_PREFIX
- See Also:
- Constant Field Values
-
DOCUMENT_PREFIX
public static final String DOCUMENT_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SimpleDocument
public SimpleDocument(SimpleDocumentPK pk, String foreignId, int order, boolean versioned, SimpleAttachment attachment)
-
SimpleDocument
public SimpleDocument(SimpleDocumentPK pk, String foreignId, int order, boolean versioned, String editedBy, SimpleAttachment attachment)
-
SimpleDocument
public SimpleDocument()
-
SimpleDocument
public SimpleDocument(SimpleDocument simpleDocument)
-
-
Method Detail
-
isASimpleDocument
public static boolean isASimpleDocument(ContributionIdentifier id)
-
getIdentifier
public ContributionIdentifier getIdentifier()
Description copied from interface:ContributionGets the unique identifier of this contribution.- Specified by:
getIdentifierin interfaceContribution- Specified by:
getIdentifierin interfaceSilverpeasResource- Returns:
- the unique identifier of the contribution.
-
getCreator
public User getCreator()
Description copied from interface:SilverpeasResourceGets the user that has created the resource.- Specified by:
getCreatorin interfaceSilverpeasResource- Returns:
- a
Userin Silverpeas.
-
getLastUpdater
public User getLastUpdater()
Description copied from interface:SilverpeasResourceGets the user that has lastly updated the resource. If the resource doesn't have such an information, then this method should return the user that has created the resource.- Specified by:
getLastUpdaterin interfaceSilverpeasResource- Returns:
- a
Userin Silverpeas.
-
setDocumentType
public void setDocumentType(DocumentType documentType)
-
getDocumentType
public DocumentType getDocumentType()
-
getCloneId
public String getCloneId()
Get the value of cloneId- Returns:
- the value of cloneId
-
setCloneId
public void setCloneId(String cloneId)
Set the value of cloneId- Parameters:
cloneId- new value of cloneId
-
getFilename
public String getFilename()
Description copied from interface:AttachmentGets the name of the document file as stored in the filesystem. The filename can differ from the contribution name that is the title of the document.- Specified by:
getFilenamein interfaceAttachment- Returns:
- the name of the document file in the filesystem.
-
setFilename
public void setFilename(String filename)
-
getLanguage
public String getLanguage()
Description copied from interface:LocalizedContributionGets the language in which this contribution was authored. By default, returns the default language in Silverpeas.- Specified by:
getLanguagein interfaceLocalizedContribution- Specified by:
getLanguagein interfaceTranslation- Returns:
- the language at which this contribution was authored.
-
setLanguage
public void setLanguage(String language)
-
getTitle
public String getTitle()
Description copied from interface:AttachmentGets the title of the document. The title is either the name set explicitly by the user to the attachment or the title fetched from the document metadata itself or the filename whether the previous data weren't provided.- Specified by:
getTitlein interfaceAttachment- Specified by:
getTitlein interfaceContribution- Returns:
- the title of the document.
-
getName
public String getName()
Description copied from interface:ContributionGets the name of this contribution. The name is in a contribution its title.- Specified by:
getNamein interfaceContribution- Specified by:
getNamein interfaceNameable- Specified by:
getNamein interfaceResourceTranslation- Returns:
- the contribution title.
-
setTitle
public void setTitle(String title)
-
getDescription
public String getDescription()
Description copied from interface:ContributionGets a description about this contribution if any. By default returns an empty String.- Specified by:
getDescriptionin interfaceContribution- Specified by:
getDescriptionin interfaceNameable- Specified by:
getDescriptionin interfaceResourceTranslation- Returns:
- the description on this contribution. Can be empty if no description was set or no description is defined for a such contribution.
-
setDescription
public void setDescription(String description)
-
getSize
public long getSize()
Description copied from interface:AttachmentGets the size of the document file in the filesystem.- Specified by:
getSizein interfaceAttachment- Returns:
- the size in bytes.
-
setSize
public void setSize(long size)
-
getContentType
public String getContentType()
Description copied from interface:AttachmentGets the content type of this attached document file as a predefined MIME type.- Specified by:
getContentTypein interfaceAttachment- Returns:
- the MIME type of the document.
-
setContentType
public void setContentType(String contentType)
-
getCreatedBy
public String getCreatedBy()
-
getCreationDate
public Date getCreationDate()
Description copied from interface:SilverpeasResourceGets the date at which the resource has been created.- Specified by:
getCreationDatein interfaceSilverpeasResource- Returns:
- the date of creation of the resource.
-
setCreationDate
public void setCreationDate(Date created)
-
getUpdatedBy
public String getUpdatedBy()
-
setUpdatedBy
public void setUpdatedBy(String updatedBy)
-
getLastUpdateDate
public Date getLastUpdateDate()
Description copied from interface:SilverpeasResourceGets the date at which the resource has been lastly updated. If the resource doesn't have such an information, then this method should return the date of the resource creation.- Specified by:
getLastUpdateDatein interfaceSilverpeasResource- Returns:
- the date of the last update of the resource.
-
setLastUpdateDate
public void setLastUpdateDate(Date updated)
-
getReservation
public Date getReservation()
-
setReservation
public final void setReservation(Date reservationDate)
-
getAlert
public Date getAlert()
-
setAlert
public void setAlert(Date alert)
-
getExpiry
public Date getExpiry()
-
setExpiry
public void setExpiry(Date expiry)
-
getStatus
public String getStatus()
-
setStatus
public void setStatus(String status)
-
getMinorVersion
public int getMinorVersion()
Description copied from interface:AttachmentGets the minor part of the document version. If the attachment isn't versioned, then zero value is returned.- Specified by:
getMinorVersionin interfaceAttachment- Returns:
- the minor version part of the document.
-
setMinorVersion
public void setMinorVersion(int minorVersion)
-
getMajorVersion
public int getMajorVersion()
Description copied from interface:AttachmentGets the major part of the document version. If the attachment isn't versioned, then zero value is returned.- Specified by:
getMajorVersionin interfaceAttachment- Returns:
- the major version part of the document.
-
setMajorVersion
public void setMajorVersion(int majorVersion)
-
getVersion
public String getVersion()
Description copied from interface:AttachmentGets the version of the document. It is a concatenation of the major and of the minor version with a dot as separator.- Specified by:
getVersionin interfaceAttachment- Returns:
- the version of the attachment or "0.0" if the document isn't versioned.
-
getComment
public String getComment()
-
setComment
public void setComment(String comment)
-
resetWebdavContentEditionContext
protected void resetWebdavContentEditionContext()
-
getWebdavContentEditionLanguage
public String getWebdavContentEditionLanguage()
Gets the content language handled into webdav for the document.- Returns:
- the content language if the document is currently handled into the webdav repository, empty string otherwise.
-
getWebdavContentEditionSize
public long getWebdavContentEditionSize()
Gets the content size handled into webdav for the document.- Returns:
- the content size if the document is currently handled into the webdav repository, a value less than zero otherwise.
-
getEditedBy
public String getEditedBy()
-
edit
public void edit(String currentEditor)
-
release
public void release()
-
getXmlFormId
public String getXmlFormId()
-
setXmlFormId
public void setXmlFormId(String xmlFormId)
-
getId
public String getId()
Description copied from interface:IdentifiableGets the unique identifier of the object in Silverpeas. If he's also identified by a local identifier, then this method should return the one global to Silverpeas.- Specified by:
getIdin interfaceIdentifiable- Returns:
- the identifier encoded as a String. If the identifier is a complex one, that is made up of several identification parts, then the returned representation should take care of such a structure.
-
setId
public void setId(String id)
-
setPK
public void setPK(SimpleDocumentPK pk)
-
getInstanceId
public String getInstanceId()
-
getOldSilverpeasId
public long getOldSilverpeasId()
-
setOldSilverpeasId
public void setOldSilverpeasId(long oldSilverpeasId)
-
getForeignId
public String getForeignId()
-
setForeignId
public void setForeignId(String foreignId)
-
getOrder
public int getOrder()
-
setOrder
public void setOrder(int order)
-
isVersioned
public boolean isVersioned()
Description copied from interface:AttachmentIs this attachment versioned? A document is versioned if each change is historized and comes to a new minor or major version.- Specified by:
isVersionedin interfaceAttachment- Returns:
- true if this attachment is versioned, false otherwise.
-
getAttachment
public SimpleAttachment getAttachment()
-
getPk
public SimpleDocumentPK getPk()
-
setAttachment
public void setAttachment(SimpleAttachment attachment)
-
isPublic
public boolean isPublic()
-
setPublicDocument
public void setPublicDocument(boolean publicDocument)
-
unlock
public void unlock()
-
getNodeName
public String getNodeName()
-
setNodeName
public void setNodeName(String nodeName)
-
computeNodeName
public String computeNodeName()
-
getFullJcrContentPath
public String getFullJcrContentPath()
Full JCR path to the file node.- Returns:
- the full JCR path to the file node (starting with /).
-
getFullJcrPath
public String getFullJcrPath()
Full JCR path to the document node.- Returns:
- the full JCR path to the document node (starting with /).
-
getDisplayIcon
public String getDisplayIcon()
Description copied from interface:AttachmentGets the path of the icon representing either the attachment itself or its content type.- Specified by:
getDisplayIconin interfaceAttachment- Returns:
- the path of the icon representing this attachment.
-
isOpenOfficeCompatible
public boolean isOpenOfficeCompatible()
Check if the document is compatible with OpenOffice using the mime type .- Returns:
- true if the document is compatible with OpenOffice false otherwise.
-
isReadOnly
public boolean isReadOnly()
Is this document in read-only? A document is read-only if either it is currently being editing by another user than the current one, or it isn't edited, and it cannot be modified by the current user, or it is currently being editing by another user than the current one. If there is no user behind the scene, then the method behave like theisEdited()method.- Returns:
- true if this document cannot be modified, false otherwise.
-
isEdited
public boolean isEdited()
Is this document currently being edited?- Returns:
- true if this document is being edited by a user in Silverpeas. False otherwise.
-
isEditedBy
public boolean isEditedBy(User user)
Is this document currently being edited by the specified user? If the document isn't being currently edited by any user, false is returned.- Parameters:
user- a user in Silverpeas- Returns:
- true if the specified user is editing this document. False either no users are editing it or another user is editing it.
-
getAttachmentPath
public String getAttachmentPath()
Path to the file stored on the filesystem.- Specified by:
getAttachmentPathin interfaceAttachment- Returns:
- the path to the file stored on the filesystem.
-
getDirectoryPath
public String getDirectoryPath(String language)
Path to the directory where the file is to be stored.- Parameters:
language- the language of the document.- Returns:
- the path to the directory where the file is to be stored.
-
getAttachmentURL
public String getAttachmentURL()
Returns the attachment URL.- Returns:
- the attachment URL.
-
getUniversalURL
public String getUniversalURL()
-
getOnlineURL
public String getOnlineURL()
-
getWebdavUrl
public String getWebdavUrl()
-
getWebdavJcrPath
public String getWebdavJcrPath()
-
getVersionMaster
public SimpleDocument getVersionMaster()
Returns the master of versioned document. If not versioned, it returns itself. If versioned, it returns the master of versioned document (the last created or updated in other words).- Returns:
- the master version of this document.
-
setVersionMaster
public void setVersionMaster(SimpleDocument versionMaster)
-
isVersionMaster
public boolean isVersionMaster()
Indicates if the current instance is a master one.- Returns:
- true if current instance is master, false otherwise.
-
getRepositoryPath
public String getRepositoryPath()
Returns the path into the repository.- Returns:
- the repository path.
-
setRepositoryPath
public void setRepositoryPath(String repositoryPath)
-
getVersionIndex
public int getVersionIndex()
Returns the index of document into the history if any and if the document is a versioned one. In other cases, it returns 0 (the start index).- Returns:
- the index of the document version in the document change history.
-
setVersionIndex
public void setVersionIndex(int versionIndex)
-
getLastPublicVersion
public SimpleDocument getLastPublicVersion()
Returns the more recent public version of this document - null if none exists.- Returns:
- the more recent public version of this document - null if none exists.
-
getFolder
public String getFolder()
-
isSharingAllowedForRolesFrom
public boolean isSharingAllowedForRolesFrom(User user)
-
canBeAccessedBy
public boolean canBeAccessedBy(User user)
Is the specified user can access this document?- Specified by:
canBeAccessedByin interfaceContribution- Specified by:
canBeAccessedByin interfaceSecurable- Parameters:
user- a user in Silverpeas.- Returns:
- true if the user can access this document, false otherwise.
-
canBeModifiedBy
public boolean canBeModifiedBy(User user)
Is the specified user can access this document on persist context?- Specified by:
canBeModifiedByin interfaceSecurable- Parameters:
user- a user in Silverpeas.- Returns:
- true if the user can access this document, false otherwise.
-
isDownloadAllowedForRolesFrom
public boolean isDownloadAllowedForRolesFrom(User user)
Indicates if the download of the document is allowed for the given user in relation to its roles. DON'T USE THIS METHOD IN CASE OF LARGE NUMBER OF ATTACHMENT TO PERFORM.- Parameters:
user- a user in Silverpeas.- Returns:
- true if download is allowed.
-
isDownloadAllowedForRoles
public boolean isDownloadAllowedForRoles(Set<SilverpeasRole> roles)
Indicates if the download of the document is allowed for the given roles.- Parameters:
roles- a set of silverpeas roles- Returns:
- true if download is allowed.
-
isDownloadAllowedForReaders
public boolean isDownloadAllowedForReaders()
Indicates if the download is allowed for readers.
-
addRolesForWhichDownloadIsForbidden
public boolean addRolesForWhichDownloadIsForbidden(SilverpeasRole... forbiddenRoles)
Forbids the download for the given roles. PLEASE BE CAREFUL : this method doesn't persist the information. It is used by attachment services during the conversion from JCR data to SimpleDocument data.- Parameters:
forbiddenRoles- one or more silverpeas roles- Returns:
- true if roles were not forbidden before the call of this method.
-
addRolesForWhichDownloadIsForbidden
public boolean addRolesForWhichDownloadIsForbidden(Collection<SilverpeasRole> forbiddenRoles)
Forbids the download for the given roles. PLEASE BE CAREFUL : this method doesn't persist the information. It is used by attachment services during the conversion from JCR data to SimpleDocument data.- Parameters:
forbiddenRoles- a collection of silverpeas roles- Returns:
- true if roles were not forbidden before the call of this method.
-
addRolesForWhichDownloadIsAllowed
public void addRolesForWhichDownloadIsAllowed(SilverpeasRole... allowedRoles)
Allows the download for the given roles. PLEASE BE CAREFUL : this method doesn't persist the information. It is used by attachment services during the conversion from JCR data to SimpleDocument data.- Parameters:
allowedRoles- one or more silverpeas roles
-
addRolesForWhichDownloadIsAllowed
public boolean addRolesForWhichDownloadIsAllowed(Collection<SilverpeasRole> allowedRoles)
Allows the download for the given roles. PLEASE BE CAREFUL : this method doesn't persist the information. It is used by attachment services during the conversion from JCR data to SimpleDocument data.- Parameters:
allowedRoles- a collection of silverpeas roles- Returns:
- true if roles were not allowed before the call of this method.
-
getForbiddenDownloadForRoles
public Set<SilverpeasRole> getForbiddenDownloadForRoles()
Gets roles for which download is not allowed.- Returns:
- a set of silverpeas roles
-
isContentImage
public boolean isContentImage()
Indicates if the file described by currentSimpleAttachmentis type of image.
-
isContentSpinfire
public boolean isContentSpinfire()
Indicates if the file described by currentSimpleAttachmentis type of 3D.
-
isContentArchive
public boolean isContentArchive()
Indicates if the file described by currentSimpleAttachmentis type of archive.
-
isContentMail
public boolean isContentMail()
Indicates if the file described by currentSimpleAttachmentis type of mail.
-
isContentPdf
public boolean isContentPdf()
Indicates if the file described by currentSimpleAttachmentis type of pdf.
-
isDisplayableAsContent
public boolean isDisplayableAsContent()
Indicates if the attachment content can be displayed as a contribution content.- Returns:
- true to display as content, false otherwise.
-
setDisplayableAsContent
public void setDisplayableAsContent(boolean displayableAsContent)
-
getTranslation
public SimpleDocument getTranslation(String language)
Description copied from interface:TranslatableGets a translation in the specified language about some textual properties of the object. If no such translation exists, then returns the default translation of the object.- Specified by:
getTranslationin interfaceLocalizedResource- Specified by:
getTranslationin interfaceTranslatable- Parameters:
language- the ISO 631-1 code of a language.- Returns:
- a translation of the object in the given language. Can be never null.
-
editableSimultaneously
public Optional<Boolean> editableSimultaneously()
Indicates if the attachment can be edited simultaneously into web browser by several users.- Returns:
- An optional true if editable, false otherwise. If Optional is empty, it means that the indicator is not handled.
-
setEditableSimultaneously
public void setEditableSimultaneously(boolean editableSimultaneously)
-
-