com.liferay.portal.repository.cmis.model
Class CMISFileEntry
java.lang.Object
com.liferay.portal.repository.cmis.model.CMISModel
com.liferay.portal.repository.cmis.model.CMISFileEntry
- All Implemented Interfaces:
- FileEntry, RepositoryModel<FileEntry>, AuditedModel, ClassedModel, GroupedModel, StagedGroupedModel, StagedModel, Serializable
public class CMISFileEntry
- extends CMISModel
- implements FileEntry
- See Also:
- Serialized Form
CMISFileEntry
public CMISFileEntry(CMISRepository cmisRepository,
String uuid,
long fileEntryId,
org.apache.chemistry.opencmis.client.api.Document document)
clone
public Object clone()
- Specified by:
clone in interface StagedModel- Overrides:
clone in class Object
containsPermission
public boolean containsPermission(PermissionChecker permissionChecker,
String actionId)
throws SystemException
- Specified by:
containsPermission in interface FileEntry
- Throws:
SystemException
getAttributes
public Map<String,Serializable> getAttributes()
- Specified by:
getAttributes in interface RepositoryModel<FileEntry>
getCompanyId
public long getCompanyId()
- Specified by:
getCompanyId in interface FileEntry- Specified by:
getCompanyId in interface AuditedModel- Specified by:
getCompanyId in interface StagedModel- Specified by:
getCompanyId in class CMISModel
getContentStream
public InputStream getContentStream()
- Description copied from interface:
FileEntry
- Retrieves the content stream of the current file version. In a Liferay
repository, this is the latest approved version. In third-party
repositories, this may be the latest content regardless of workflow
state.
- Specified by:
getContentStream in interface FileEntry
- Returns:
- content stream of the current file version
- See Also:
FileEntry.getFileVersion()
getContentStream
public InputStream getContentStream(String version)
throws PortalException
- Specified by:
getContentStream in interface FileEntry
- Throws:
PortalException
getCreateDate
public Date getCreateDate()
- Specified by:
getCreateDate in interface FileEntry- Specified by:
getCreateDate in interface AuditedModel- Specified by:
getCreateDate in interface StagedModel
getExtension
public String getExtension()
- Specified by:
getExtension in interface FileEntry
getFileEntryId
public long getFileEntryId()
- Specified by:
getFileEntryId in interface FileEntry
getFileVersion
public FileVersion getFileVersion()
throws PortalException,
SystemException
- Description copied from interface:
FileEntry
- Retrieves the current file version. The workflow state of the latest file
version may affect what is returned by this method. In a Liferay
repository, this will return the latest approved version; the latest
version regardless of workflow state can be retrieved by
FileEntry.getLatestFileVersion(). In third-party repositories, these two methods
may function identically.
- Specified by:
getFileVersion in interface FileEntry
- Returns:
- current file version
- Throws:
PortalException - if a portal exception occurred
SystemException - if a system exception occurred
getFileVersion
public FileVersion getFileVersion(String version)
throws PortalException,
SystemException
- Specified by:
getFileVersion in interface FileEntry
- Throws:
PortalException
SystemException
getFileVersions
public List<FileVersion> getFileVersions(int status)
throws SystemException
- Specified by:
getFileVersions in interface FileEntry
- Throws:
SystemException
getFolder
public Folder getFolder()
- Specified by:
getFolder in interface FileEntry
getFolderId
public long getFolderId()
- Specified by:
getFolderId in interface FileEntry
getGroupId
public long getGroupId()
- Specified by:
getGroupId in interface FileEntry- Specified by:
getGroupId in interface GroupedModel
getIcon
public String getIcon()
- Specified by:
getIcon in interface FileEntry
getLatestFileVersion
public FileVersion getLatestFileVersion()
throws PortalException,
SystemException
- Description copied from interface:
FileEntry
- Retrieves the latest file version. In a Liferay repository, this means
the latest version regardless of workflow state. In third-party
repositories, this may have an identical functionality with
FileEntry.getFileVersion().
- Specified by:
getLatestFileVersion in interface FileEntry
- Returns:
- latest file version
- Throws:
PortalException - if a portal exception occurred
SystemException - if a system exception occurred
getLock
public Lock getLock()
- Specified by:
getLock in interface FileEntry
getMimeType
public String getMimeType()
- Specified by:
getMimeType in interface FileEntry
getMimeType
public String getMimeType(String version)
- Specified by:
getMimeType in interface FileEntry
getModel
public Object getModel()
- Specified by:
getModel in interface RepositoryModel<FileEntry>
getModelClass
public Class<?> getModelClass()
- Specified by:
getModelClass in interface ClassedModel
getModelClassName
public String getModelClassName()
- Specified by:
getModelClassName in interface ClassedModel- Specified by:
getModelClassName in class CMISModel
getModifiedDate
public Date getModifiedDate()
- Specified by:
getModifiedDate in interface FileEntry- Specified by:
getModifiedDate in interface AuditedModel- Specified by:
getModifiedDate in interface StagedModel
getPrimaryKey
public long getPrimaryKey()
- Specified by:
getPrimaryKey in interface RepositoryModel<FileEntry>- Specified by:
getPrimaryKey in class CMISModel
getPrimaryKeyObj
public Serializable getPrimaryKeyObj()
- Specified by:
getPrimaryKeyObj in interface ClassedModel
getReadCount
public int getReadCount()
- Specified by:
getReadCount in interface FileEntry
getRepositoryId
public long getRepositoryId()
- Specified by:
getRepositoryId in interface FileEntry
getSize
public long getSize()
- Specified by:
getSize in interface FileEntry
getStagedModelType
public StagedModelType getStagedModelType()
- Specified by:
getStagedModelType in interface StagedModel
getTitle
public String getTitle()
- Specified by:
getTitle in interface FileEntry
getUserId
public long getUserId()
- Specified by:
getUserId in interface FileEntry- Specified by:
getUserId in interface AuditedModel
getUserName
public String getUserName()
- Specified by:
getUserName in interface FileEntry- Specified by:
getUserName in interface AuditedModel
getUserUuid
public String getUserUuid()
- Specified by:
getUserUuid in interface FileEntry- Specified by:
getUserUuid in interface AuditedModel
getUuid
public String getUuid()
- Specified by:
getUuid in interface FileEntry- Specified by:
getUuid in interface StagedModel
getVersion
public String getVersion()
- Specified by:
getVersion in interface FileEntry
getVersionUserId
public long getVersionUserId()
- Deprecated. As of 6.2.0, replaced by
CMISFileVersion.getUserId()
- Specified by:
getVersionUserId in interface FileEntry
getVersionUserName
public String getVersionUserName()
- Deprecated. As of 6.2.0, replaced by
CMISFileVersion.getUserName()
- Specified by:
getVersionUserName in interface FileEntry
getVersionUserUuid
public String getVersionUserUuid()
- Deprecated. As of 6.2.0, replaced by
CMISFileVersion.getUserUuid()
- Specified by:
getVersionUserUuid in interface FileEntry
hasLock
public boolean hasLock()
- Specified by:
hasLock in interface FileEntry
isCheckedOut
public boolean isCheckedOut()
- Specified by:
isCheckedOut in interface FileEntry
isDefaultRepository
public boolean isDefaultRepository()
- Specified by:
isDefaultRepository in interface FileEntry
isEscapedModel
public boolean isEscapedModel()
- Specified by:
isEscapedModel in interface RepositoryModel<FileEntry>
isInTrash
public boolean isInTrash()
- Specified by:
isInTrash in interface FileEntry
isInTrashContainer
public boolean isInTrashContainer()
- Specified by:
isInTrashContainer in interface FileEntry
isManualCheckInRequired
public boolean isManualCheckInRequired()
- Specified by:
isManualCheckInRequired in interface FileEntry
isSupportsLocking
public boolean isSupportsLocking()
- Specified by:
isSupportsLocking in interface FileEntry
isSupportsMetadata
public boolean isSupportsMetadata()
- Specified by:
isSupportsMetadata in interface FileEntry
isSupportsSocial
public boolean isSupportsSocial()
- Specified by:
isSupportsSocial in interface FileEntry
setCompanyId
public void setCompanyId(long companyId)
- Specified by:
setCompanyId in interface AuditedModel- Specified by:
setCompanyId in interface StagedModel
setCreateDate
public void setCreateDate(Date date)
- Specified by:
setCreateDate in interface AuditedModel- Specified by:
setCreateDate in interface StagedModel
setFileEntryId
public void setFileEntryId(long fileEntryId)
setGroupId
public void setGroupId(long groupId)
- Specified by:
setGroupId in interface GroupedModel
setModifiedDate
public void setModifiedDate(Date date)
- Specified by:
setModifiedDate in interface AuditedModel- Specified by:
setModifiedDate in interface StagedModel
setPrimaryKey
public void setPrimaryKey(long primaryKey)
setPrimaryKeyObj
public void setPrimaryKeyObj(Serializable primaryKeyObj)
- Specified by:
setPrimaryKeyObj in interface ClassedModel
setUserId
public void setUserId(long userId)
- Specified by:
setUserId in interface AuditedModel
setUserName
public void setUserName(String userName)
- Specified by:
setUserName in interface AuditedModel
setUserUuid
public void setUserUuid(String userUuid)
- Specified by:
setUserUuid in interface AuditedModel
setUuid
public void setUuid(String uuid)
- Specified by:
setUuid in interface StagedModel
toEscapedModel
public FileEntry toEscapedModel()
- Specified by:
toEscapedModel in interface RepositoryModel<FileEntry>
toUnescapedModel
public FileEntry toUnescapedModel()
- Specified by:
toUnescapedModel in interface RepositoryModel<FileEntry>
getAllVersions
protected List<org.apache.chemistry.opencmis.client.api.Document> getAllVersions()
throws PortalException
- Throws:
PortalException
getCmisRepository
protected CMISRepository getCmisRepository()
- Specified by:
getCmisRepository in class CMISModel