com.liferay.portal.repository.liferayrepository.model
Class LiferayFileEntry
java.lang.Object
com.liferay.portal.repository.liferayrepository.util.LiferayBase
com.liferay.portal.repository.liferayrepository.model.LiferayModel
com.liferay.portal.repository.liferayrepository.model.LiferayFileEntry
- All Implemented Interfaces:
- FileEntry, RepositoryModel<FileEntry>, AuditedModel, ClassedModel, GroupedModel, Serializable
public class LiferayFileEntry
- extends LiferayModel
- implements FileEntry
- See Also:
- Serialized Form
LiferayFileEntry
public LiferayFileEntry(DLFileEntry dlFileEntry)
LiferayFileEntry
public LiferayFileEntry(DLFileEntry fileEntry,
boolean escapedModel)
containsPermission
public boolean containsPermission(PermissionChecker permissionChecker,
String actionId)
throws PortalException,
SystemException
- Specified by:
containsPermission in interface FileEntry
- Throws:
PortalException
SystemException
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
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 class LiferayModel
getContentStream
public InputStream getContentStream()
throws PortalException,
SystemException
- 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
- Throws:
PortalException
SystemException- See Also:
FileEntry.getFileVersion()
getContentStream
public InputStream getContentStream(String version)
throws PortalException,
SystemException
- Specified by:
getContentStream in interface FileEntry
- Throws:
PortalException
SystemException
getCreateDate
public Date getCreateDate()
- Specified by:
getCreateDate in interface FileEntry- Specified by:
getCreateDate in interface AuditedModel
getDescription
public String getDescription()
- Specified by:
getDescription in interface FileEntry
getDLFileEntry
public DLFileEntry getDLFileEntry()
getExpandoBridge
public ExpandoBridge getExpandoBridge()
- Specified by:
getExpandoBridge in interface ClassedModel- Specified by:
getExpandoBridge in class LiferayModel
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
SystemException
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
SystemException
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 LiferayModel
getModifiedDate
public Date getModifiedDate()
- Specified by:
getModifiedDate in interface FileEntry- Specified by:
getModifiedDate in interface AuditedModel
getPrimaryKey
public long getPrimaryKey()
- Specified by:
getPrimaryKey in interface RepositoryModel<FileEntry>- Specified by:
getPrimaryKey in class LiferayModel
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
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()
throws SystemException
- Specified by:
getUserUuid in interface FileEntry- Specified by:
getUserUuid in interface AuditedModel
- Throws:
SystemException
getUuid
public String getUuid()
- Specified by:
getUuid in interface FileEntry
getVersion
public String getVersion()
- Specified by:
getVersion in interface FileEntry
getVersionUserId
public long getVersionUserId()
- Specified by:
getVersionUserId in interface FileEntry
getVersionUserName
public String getVersionUserName()
- Specified by:
getVersionUserName in interface FileEntry
getVersionUserUuid
public String getVersionUserUuid()
throws SystemException
- Specified by:
getVersionUserUuid in interface FileEntry
- Throws:
SystemException
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
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>
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
setCreateDate
public void setCreateDate(Date date)
- Specified by:
setCreateDate in interface AuditedModel
setGroupId
public void setGroupId(long groupId)
- Specified by:
setGroupId in interface GroupedModel
setModifiedDate
public void setModifiedDate(Date date)
- Specified by:
setModifiedDate in interface AuditedModel
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
toEscapedModel
public FileEntry toEscapedModel()
- Specified by:
toEscapedModel in interface RepositoryModel<FileEntry>
toString
public String toString()
- Overrides:
toString in class Object
toUnescapedModel
public FileEntry toUnescapedModel()
- Specified by:
toUnescapedModel in interface RepositoryModel<FileEntry>