com.liferay.portal.kernel.repository.model
Class FileEntryWrapper
java.lang.Object
com.liferay.portal.kernel.repository.model.FileEntryWrapper
- All Implemented Interfaces:
- FileEntry, RepositoryEntry, RepositoryModel<FileEntry>, AuditedModel, ClassedModel, GroupedModel, ModelWrapper<FileEntry>, StagedGroupedModel, StagedModel, Serializable
public class FileEntryWrapper
- extends Object
- implements FileEntry, ModelWrapper<FileEntry>
- See Also:
- Serialized Form
FileEntryWrapper
public FileEntryWrapper(FileEntry fileEntry)
clone
public Object clone()
- Specified by:
clone in interface StagedModel- Overrides:
clone in class Object
containsPermission
public boolean containsPermission(PermissionChecker permissionChecker,
String actionId)
throws PortalException
- Specified by:
containsPermission in interface FileEntry
- Throws:
PortalException
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
execute
public void execute(RepositoryModelOperation repositoryModelOperation)
throws PortalException
- Specified by:
execute in interface RepositoryModel<FileEntry>
- Throws:
PortalException
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 RepositoryEntry- Specified by:
getCompanyId in interface AuditedModel- Specified by:
getCompanyId in interface StagedModel
getContentStream
public InputStream getContentStream()
throws PortalException
- Description copied from interface:
FileEntry
- Returns the content stream of the current file version. In a Liferay
repository, this is the latest approved version. In third-party
repositories, the latest content stream may be returned, regardless of
workflow state.
- Specified by:
getContentStream in interface FileEntry
- Returns:
- the content stream of the current file version
- Throws:
PortalException- 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 RepositoryEntry- Specified by:
getCreateDate in interface AuditedModel- Specified by:
getCreateDate in interface StagedModel
getDescription
public String getDescription()
- Specified by:
getDescription in interface FileEntry
getExpandoBridge
public ExpandoBridge getExpandoBridge()
- Specified by:
getExpandoBridge in interface ClassedModel
getExtension
public String getExtension()
- Specified by:
getExtension in interface FileEntry
getFileEntryId
public long getFileEntryId()
- Specified by:
getFileEntryId in interface FileEntry
getFileName
public String getFileName()
- Specified by:
getFileName in interface FileEntry
getFileShortcuts
public List<FileShortcut> getFileShortcuts()
- Specified by:
getFileShortcuts in interface FileEntry
getFileVersion
public FileVersion getFileVersion()
throws PortalException
- Description copied from interface:
FileEntry
- Returns the current file version. The workflow state of the latest file
version may affect the file version that is returned. In a Liferay
repository, the latest approved version is returned; 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:
- the current file version
- Throws:
PortalException
getFileVersion
public FileVersion getFileVersion(String version)
throws PortalException
- Specified by:
getFileVersion in interface FileEntry
- Throws:
PortalException
getFileVersions
public List<FileVersion> getFileVersions(int status)
- Specified by:
getFileVersions in interface FileEntry
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 RepositoryEntry- Specified by:
getGroupId in interface GroupedModel
getIcon
public String getIcon()
- Specified by:
getIcon in interface FileEntry
getIconCssClass
public String getIconCssClass()
- Specified by:
getIconCssClass in interface FileEntry
getLastPublishDate
public Date getLastPublishDate()
- Specified by:
getLastPublishDate in interface StagedGroupedModel
getLatestFileVersion
public FileVersion getLatestFileVersion()
throws PortalException
- Description copied from interface:
FileEntry
- Returns the latest file version. In a Liferay repository, the latest
version is returned, regardless of workflow state. In third-party
repositories, the functionality of this method and
FileEntry.getFileVersion() may be identical.
- Specified by:
getLatestFileVersion in interface FileEntry
- Returns:
- the latest file version
- Throws:
PortalException
getLatestFileVersion
public FileVersion getLatestFileVersion(boolean trusted)
throws PortalException
- Description copied from interface:
FileEntry
- Returns the latest file version, optionally bypassing security checks. In
a Liferay repository, the latest version is returned, regardless of
workflow state. In third-party repositories, the functionality of this
method and
FileEntry.getFileVersion() may be identical.
- Specified by:
getLatestFileVersion in interface FileEntry
- Parameters:
trusted - whether to bypass permission checks. In third-party
repositories, this parameter may be ignored.
- Returns:
- the latest file version
- Throws:
PortalException
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
getModifiedDate
public Date getModifiedDate()
- Specified by:
getModifiedDate in interface FileEntry- Specified by:
getModifiedDate in interface RepositoryEntry- Specified by:
getModifiedDate in interface AuditedModel- Specified by:
getModifiedDate in interface StagedModel
getPrimaryKey
public long getPrimaryKey()
- Specified by:
getPrimaryKey in interface RepositoryModel<FileEntry>
getPrimaryKeyObj
public Serializable getPrimaryKeyObj()
- Specified by:
getPrimaryKeyObj in interface ClassedModel
getReadCount
public int getReadCount()
- Specified by:
getReadCount in interface FileEntry
getRepositoryCapability
public <T extends Capability> T getRepositoryCapability(Class<T> capabilityClass)
- Specified by:
getRepositoryCapability 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 RepositoryEntry- Specified by:
getUserId in interface AuditedModel
getUserName
public String getUserName()
- Specified by:
getUserName in interface FileEntry- Specified by:
getUserName in interface RepositoryEntry- Specified by:
getUserName in interface AuditedModel
getUserUuid
public String getUserUuid()
- Specified by:
getUserUuid in interface FileEntry- Specified by:
getUserUuid in interface RepositoryEntry- 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()
- Specified by:
getVersionUserId in interface FileEntry
getVersionUserName
public String getVersionUserName()
- Specified by:
getVersionUserName in interface FileEntry
getVersionUserUuid
public String getVersionUserUuid()
- Specified by:
getVersionUserUuid in interface FileEntry
getWrappedModel
public FileEntry getWrappedModel()
- Specified by:
getWrappedModel in interface ModelWrapper<FileEntry>
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>
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
isRepositoryCapabilityProvided
public <T extends Capability> boolean isRepositoryCapabilityProvided(Class<T> capabilityClass)
- Specified by:
isRepositoryCapabilityProvided 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 createDate)
- Specified by:
setCreateDate in interface AuditedModel- Specified by:
setCreateDate in interface StagedModel
setGroupId
public void setGroupId(long groupId)
- Specified by:
setGroupId in interface GroupedModel
setLastPublishDate
public void setLastPublishDate(Date lastPublishDate)
- Specified by:
setLastPublishDate in interface StagedGroupedModel
setModifiedDate
public void setModifiedDate(Date modifiedDate)
- Specified by:
setModifiedDate in interface AuditedModel- Specified by:
setModifiedDate in interface StagedModel
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>
toString
public String toString()
- Overrides:
toString in class Object
toUnescapedModel
public FileEntry toUnescapedModel()
- Specified by:
toUnescapedModel in interface RepositoryModel<FileEntry>