|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.silverpeas.attachment.model.SimpleDocument
public class SimpleDocument
Field Summary | |
---|---|
static String |
ATTACHMENT_PREFIX
|
static String |
DOCUMENT_PREFIX
|
static String |
FILE_PREFIX
|
static String |
VERSION_PREFIX
|
static String |
WEBDAV_FOLDER
|
Constructor Summary | |
---|---|
SimpleDocument()
|
|
SimpleDocument(SimpleDocument simpleDocument)
|
|
SimpleDocument(SimpleDocumentPK pk,
String foreignId,
int order,
boolean versioned,
Date reservation,
Date alert,
Date expiry,
String comment,
SimpleAttachment attachment)
|
|
SimpleDocument(SimpleDocumentPK pk,
String foreignId,
int order,
boolean versioned,
SimpleAttachment attachment)
|
|
SimpleDocument(SimpleDocumentPK pk,
String foreignId,
int order,
boolean versioned,
String editedBy,
Date reservation,
Date alert,
Date expiry,
String comment,
SimpleAttachment attachment)
|
|
SimpleDocument(SimpleDocumentPK pk,
String foreignId,
int order,
boolean versioned,
String editedBy,
SimpleAttachment attachment)
|
Method Summary | |
---|---|
boolean |
addRolesForWhichDownloadIsAllowed(Collection<SilverpeasRole> allowedRoles)
Allows the download for the given roles. |
boolean |
addRolesForWhichDownloadIsAllowed(SilverpeasRole... allowedRoles)
Allows the download for the given roles. |
boolean |
addRolesForWhichDownloadIsForbidden(Collection<SilverpeasRole> forbiddenRoles)
Forbids the download for the given roles. |
boolean |
addRolesForWhichDownloadIsForbidden(SilverpeasRole... forbiddenRoles)
Forbids the download for the given roles. |
boolean |
canBeAccessedBy(UserDetail user)
Is the specified user can access this document? |
boolean |
canBeModifiedBy(UserDetail user)
Is the specified user can access this document on persist context? |
String |
computeNodeName()
|
void |
edit(String currentEditor)
|
boolean |
equals(Object obj)
|
Date |
getAlert()
|
String |
getAliasURL()
|
SimpleAttachment |
getAttachment()
|
String |
getAttachmentPath()
Path to the file stored on the filesystem. |
String |
getAttachmentURL()
Returns the attachment URL. |
String |
getCloneId()
Get the value of cloneId |
String |
getComment()
|
String |
getContentType()
|
Date |
getCreated()
|
String |
getCreatedBy()
|
String |
getDescription()
|
String |
getDirectoryPath(String language)
Path to the directory where the file is to be stored. |
String |
getDisplayIcon()
Return the icon correponding to the file. |
DocumentType |
getDocumentType()
|
String |
getEditedBy()
|
Date |
getExpiry()
|
String |
getFilename()
|
String |
getFolder()
|
Set<SilverpeasRole> |
getForbiddenDownloadForRoles()
Gets roles for which download is not allowed. |
String |
getForeignId()
|
String |
getFullJcrContentPath()
Full JCR path to the file node. |
String |
getFullJcrPath()
Full JCR path to the document node. |
String |
getId()
|
String |
getInstanceId()
|
String |
getLanguage()
|
SimpleDocument |
getLastPublicVersion()
Returns the more recent public version of this document - null if none exists. |
int |
getMajorVersion()
|
int |
getMinorVersion()
|
String |
getNodeName()
|
long |
getOldSilverpeasId()
|
String |
getOnlineURL()
|
int |
getOrder()
|
SimpleDocumentPK |
getPk()
|
String |
getRepositoryPath()
Returns the path into the repository. |
Date |
getReservation()
|
long |
getSize()
|
String |
getStatus()
|
String |
getTitle()
|
String |
getUniversalURL()
|
Date |
getUpdated()
|
String |
getUpdatedBy()
|
String |
getVersion()
Gets a version number as String. |
int |
getVersionIndex()
Returns the index of document into the history if any and if the document is a versioned one. |
SimpleDocument |
getVersionMaster()
Returns the master of versioned document. |
String |
getWebdavContentEditionLanguage()
Gets the content language handled into webdav for the document. |
long |
getWebdavContentEditionSize()
Gets the content size handled into webdav for the document. |
String |
getWebdavJcrPath()
|
String |
getWebdavUrl()
|
String |
getWebURL()
Deprecated. use getAttachmentURL instead. |
String |
getXmlFormId()
|
int |
hashCode()
|
boolean |
isContentArchive()
Indicates if the file described by current SimpleAttachment is type of archive. |
boolean |
isContentImage()
Indicates if the file described by current SimpleAttachment is type of image. |
boolean |
isContentMail()
Indicates if the file described by current SimpleAttachment is type of mail. |
boolean |
isContentPdf()
Indicates if the file described by current SimpleAttachment is type of pdf. |
boolean |
isContentSpinfire()
Indicates if the file described by current SimpleAttachment is type of 3D. |
boolean |
isDownloadAllowedForReaders()
Indicates if the download is allowed for readers. |
boolean |
isDownloadAllowedForRoles(Set<SilverpeasRole> roles)
Indicates if the download of the document is allowed for the given roles. |
boolean |
isDownloadAllowedForRolesFrom(UserDetail user)
Indicates if the download of the document is allowed for the given user in relation to its roles. |
boolean |
isOpenOfficeCompatible()
Check if the document is compatible with OpenOffice using the mime type . |
boolean |
isPublic()
|
boolean |
isReadOnly()
|
boolean |
isSharingAllowedForRolesFrom(UserDetail user)
|
boolean |
isVersioned()
|
boolean |
isVersionMaster()
Indicates if the current instance is a master one. |
void |
release()
|
protected void |
resetWebdavContentEditionContext()
|
void |
setAlert(Date alert)
|
void |
setAttachment(SimpleAttachment attachment)
|
void |
setCloneId(String cloneId)
Set the value of cloneId |
void |
setComment(String comment)
|
void |
setContentType(String contentType)
|
void |
setCreated(Date created)
|
void |
setDescription(String description)
|
void |
setDocumentType(DocumentType documentType)
|
void |
setExpiry(Date expiry)
|
void |
setFilename(String filename)
|
void |
setForeignId(String foreignId)
|
void |
setId(String id)
|
void |
setLanguage(String language)
|
void |
setMajorVersion(int majorVersion)
|
void |
setMinorVersion(int minorVersion)
|
void |
setNodeName(String nodeName)
|
void |
setOldSilverpeasId(long oldSilverpeasId)
|
void |
setOrder(int order)
|
void |
setPK(SimpleDocumentPK pk)
|
void |
setPublicDocument(boolean publicDocument)
|
void |
setRepositoryPath(String repositoryPath)
|
void |
setReservation(Date reservationDate)
|
void |
setSize(long size)
|
void |
setStatus(String status)
|
void |
setTitle(String title)
|
void |
setUpdated(Date updated)
|
void |
setUpdatedBy(String updatedBy)
|
void |
setVersionIndex(int versionIndex)
|
void |
setVersionMaster(SimpleDocument versionMaster)
|
void |
setXmlFormId(String xmlFormId)
|
String |
toString()
|
void |
unlock()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String WEBDAV_FOLDER
public static final String ATTACHMENT_PREFIX
public static final String VERSION_PREFIX
public static final String FILE_PREFIX
public static final String DOCUMENT_PREFIX
Constructor Detail |
---|
public SimpleDocument(SimpleDocumentPK pk, String foreignId, int order, boolean versioned, SimpleAttachment attachment)
public SimpleDocument(SimpleDocumentPK pk, String foreignId, int order, boolean versioned, String editedBy, SimpleAttachment attachment)
public SimpleDocument(SimpleDocumentPK pk, String foreignId, int order, boolean versioned, Date reservation, Date alert, Date expiry, String comment, SimpleAttachment attachment)
public SimpleDocument(SimpleDocumentPK pk, String foreignId, int order, boolean versioned, String editedBy, Date reservation, Date alert, Date expiry, String comment, SimpleAttachment attachment)
pk
- foreignId
- order
- versioned
- editedBy
- reservation
- alert
- expiry
- comment
- attachment
- public SimpleDocument()
public SimpleDocument(SimpleDocument simpleDocument)
Method Detail |
---|
public void setDocumentType(DocumentType documentType)
public DocumentType getDocumentType()
public String getCloneId()
public void setCloneId(String cloneId)
cloneId
- new value of cloneIdpublic String getFilename()
public void setFilename(String filename)
public String getLanguage()
public void setLanguage(String language)
public String getTitle()
public void setTitle(String title)
public String getDescription()
public void setDescription(String description)
public long getSize()
public void setSize(long size)
public String getContentType()
public void setContentType(String contentType)
public String getCreatedBy()
public Date getCreated()
public void setCreated(Date created)
public String getUpdatedBy()
public void setUpdatedBy(String updatedBy)
public Date getUpdated()
public void setUpdated(Date updated)
public Date getReservation()
public final void setReservation(Date reservationDate)
public Date getAlert()
public void setAlert(Date alert)
public Date getExpiry()
public void setExpiry(Date expiry)
public String getStatus()
public void setStatus(String status)
public int getMinorVersion()
public void setMinorVersion(int minorVersion)
public int getMajorVersion()
public void setMajorVersion(int majorVersion)
public String getVersion()
public String getComment()
public void setComment(String comment)
protected void resetWebdavContentEditionContext()
public String getWebdavContentEditionLanguage()
public long getWebdavContentEditionSize()
public String getEditedBy()
public void edit(String currentEditor)
public void release()
public String getXmlFormId()
public void setXmlFormId(String xmlFormId)
public String getId()
public void setId(String id)
public void setPK(SimpleDocumentPK pk)
public String getInstanceId()
public long getOldSilverpeasId()
public void setOldSilverpeasId(long oldSilverpeasId)
public String getForeignId()
public void setForeignId(String foreignId)
public int getOrder()
public void setOrder(int order)
public boolean isVersioned()
public SimpleAttachment getAttachment()
public SimpleDocumentPK getPk()
public void setAttachment(SimpleAttachment attachment)
public boolean isPublic()
public void setPublicDocument(boolean publicDocument)
public void unlock()
public String getNodeName()
public void setNodeName(String nodeName)
public String computeNodeName()
public String getFullJcrContentPath()
public String getFullJcrPath()
public String getDisplayIcon()
public boolean isOpenOfficeCompatible()
public boolean isReadOnly()
public String getAttachmentPath()
public String getDirectoryPath(String language)
language
- the language of the document.
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String getAttachmentURL()
public String getUniversalURL()
public String getOnlineURL()
public String getAliasURL()
public String getWebdavUrl()
public String getWebdavJcrPath()
@Deprecated public String getWebURL()
public SimpleDocument getVersionMaster()
public void setVersionMaster(SimpleDocument versionMaster)
public boolean isVersionMaster()
public String getRepositoryPath()
public void setRepositoryPath(String repositoryPath)
public int getVersionIndex()
public void setVersionIndex(int versionIndex)
public SimpleDocument getLastPublicVersion()
public String getFolder()
public boolean isSharingAllowedForRolesFrom(UserDetail user)
public boolean canBeAccessedBy(UserDetail user)
user
- a user in Silverpeas.
public boolean canBeModifiedBy(UserDetail user)
user
- a user in Silverpeas.
public boolean isDownloadAllowedForRolesFrom(UserDetail user)
user
-
public boolean isDownloadAllowedForRoles(Set<SilverpeasRole> roles)
roles
-
public boolean isDownloadAllowedForReaders()
public boolean addRolesForWhichDownloadIsForbidden(SilverpeasRole... forbiddenRoles)
forbiddenRoles
-
public boolean addRolesForWhichDownloadIsForbidden(Collection<SilverpeasRole> forbiddenRoles)
forbiddenRoles
-
public boolean addRolesForWhichDownloadIsAllowed(SilverpeasRole... allowedRoles)
allowedRoles
-
public boolean addRolesForWhichDownloadIsAllowed(Collection<SilverpeasRole> allowedRoles)
allowedRoles
-
public Set<SilverpeasRole> getForbiddenDownloadForRoles()
public boolean isContentImage()
SimpleAttachment
is type of image.
public boolean isContentSpinfire()
SimpleAttachment
is type of 3D.
public boolean isContentArchive()
SimpleAttachment
is type of archive.
public boolean isContentMail()
SimpleAttachment
is type of mail.
public boolean isContentPdf()
SimpleAttachment
is type of pdf.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |