Liferay 7.0-ce-b4

com.liferay.portal.kernel.repository.model
Interface FileEntry

All Superinterfaces:
AuditedModel, ClassedModel, GroupedModel, RepositoryEntry, RepositoryModel<FileEntry>, Serializable, StagedGroupedModel, StagedModel
All Known Implementing Classes:
FileEntryProxyBean, FileEntryWrapper

@JSON
@ProviderType
public interface FileEntry
extends RepositoryEntry, RepositoryModel<FileEntry>


Field Summary
static Accessor<FileEntry,Long> FILE_ENTRY_ID_ACCESSOR
           
 
Method Summary
 boolean containsPermission(PermissionChecker permissionChecker, String actionId)
           
 long getCompanyId()
           
 InputStream getContentStream()
          Returns the content stream of the current file version.
 InputStream getContentStream(String version)
           
 Date getCreateDate()
           
 String getDescription()
           
 String getExtension()
           
 long getFileEntryId()
           
 String getFileName()
           
 List<FileShortcut> getFileShortcuts()
           
 FileVersion getFileVersion()
          Returns the current file version.
 FileVersion getFileVersion(String version)
           
 List<FileVersion> getFileVersions(int status)
           
 Folder getFolder()
           
 long getFolderId()
           
 long getGroupId()
           
 String getIcon()
           
 String getIconCssClass()
           
 FileVersion getLatestFileVersion()
          Returns the latest file version.
 FileVersion getLatestFileVersion(boolean trusted)
          Returns the latest file version, optionally bypassing security checks.
 Lock getLock()
           
 String getMimeType()
           
 String getMimeType(String version)
           
 Date getModifiedDate()
           
 int getReadCount()
           
<T extends Capability>
T
getRepositoryCapability(Class<T> capabilityClass)
           
 long getRepositoryId()
           
 long getSize()
           
 String getTitle()
           
 long getUserId()
           
 String getUserName()
           
 String getUserUuid()
           
 String getUuid()
           
 String getVersion()
           
 long getVersionUserId()
           
 String getVersionUserName()
           
 String getVersionUserUuid()
           
 boolean hasLock()
           
 boolean isCheckedOut()
           
 boolean isDefaultRepository()
           
 boolean isInTrash()
           
 boolean isInTrashContainer()
           
 boolean isManualCheckInRequired()
           
<T extends Capability>
boolean
isRepositoryCapabilityProvided(Class<T> capabilityClass)
           
 boolean isSupportsLocking()
           
 boolean isSupportsMetadata()
           
 boolean isSupportsSocial()
           
 
Methods inherited from interface com.liferay.portal.kernel.repository.model.RepositoryModel
execute, getAttributes, getModel, getPrimaryKey, isEscapedModel, toEscapedModel, toUnescapedModel
 
Methods inherited from interface com.liferay.portal.model.StagedGroupedModel
getLastPublishDate, setLastPublishDate
 
Methods inherited from interface com.liferay.portal.model.GroupedModel
setGroupId
 
Methods inherited from interface com.liferay.portal.model.AuditedModel
setCompanyId, setCreateDate, setModifiedDate, setUserId, setUserName, setUserUuid
 
Methods inherited from interface com.liferay.portal.model.ClassedModel
getExpandoBridge, getModelClass, getModelClassName, getPrimaryKeyObj, setPrimaryKeyObj
 
Methods inherited from interface com.liferay.portal.model.StagedModel
clone, getStagedModelType, setCompanyId, setCreateDate, setModifiedDate, setUuid
 

Field Detail

FILE_ENTRY_ID_ACCESSOR

static final Accessor<FileEntry,Long> FILE_ENTRY_ID_ACCESSOR
Method Detail

containsPermission

boolean containsPermission(PermissionChecker permissionChecker,
                           String actionId)
                           throws PortalException
Throws:
PortalException

getCompanyId

long getCompanyId()
Specified by:
getCompanyId in interface AuditedModel
Specified by:
getCompanyId in interface RepositoryEntry
Specified by:
getCompanyId in interface StagedModel

getContentStream

@JSON(include=false)
InputStream getContentStream()
                             throws PortalException
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.

Returns:
the content stream of the current file version
Throws:
PortalException
See Also:
getFileVersion()

getContentStream

InputStream getContentStream(String version)
                             throws PortalException
Throws:
PortalException

getCreateDate

Date getCreateDate()
Specified by:
getCreateDate in interface AuditedModel
Specified by:
getCreateDate in interface RepositoryEntry
Specified by:
getCreateDate in interface StagedModel

getDescription

String getDescription()

getExtension

String getExtension()

getFileEntryId

long getFileEntryId()

getFileName

String getFileName()

getFileShortcuts

List<FileShortcut> getFileShortcuts()

getFileVersion

FileVersion getFileVersion()
                           throws PortalException
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 getLatestFileVersion(). In third-party repositories, these two methods may function identically.

Returns:
the current file version
Throws:
PortalException

getFileVersion

FileVersion getFileVersion(String version)
                           throws PortalException
Throws:
PortalException

getFileVersions

List<FileVersion> getFileVersions(int status)

getFolder

Folder getFolder()

getFolderId

long getFolderId()

getGroupId

long getGroupId()
Specified by:
getGroupId in interface GroupedModel
Specified by:
getGroupId in interface RepositoryEntry

getIcon

String getIcon()

getIconCssClass

String getIconCssClass()

getLatestFileVersion

FileVersion getLatestFileVersion()
                                 throws PortalException
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 getFileVersion() may be identical.

Returns:
the latest file version
Throws:
PortalException

getLatestFileVersion

FileVersion getLatestFileVersion(boolean trusted)
                                 throws PortalException
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 getFileVersion() may be identical.

Parameters:
trusted - whether to bypass permission checks. In third-party repositories, this parameter may be ignored.
Returns:
the latest file version
Throws:
PortalException

getLock

Lock getLock()

getMimeType

String getMimeType()

getMimeType

String getMimeType(String version)

getModifiedDate

Date getModifiedDate()
Specified by:
getModifiedDate in interface AuditedModel
Specified by:
getModifiedDate in interface RepositoryEntry
Specified by:
getModifiedDate in interface StagedModel

getReadCount

int getReadCount()

getRepositoryCapability

<T extends Capability> T getRepositoryCapability(Class<T> capabilityClass)

getRepositoryId

long getRepositoryId()

getSize

long getSize()

getTitle

String getTitle()

getUserId

long getUserId()
Specified by:
getUserId in interface AuditedModel
Specified by:
getUserId in interface RepositoryEntry

getUserName

String getUserName()
Specified by:
getUserName in interface AuditedModel
Specified by:
getUserName in interface RepositoryEntry

getUserUuid

String getUserUuid()
Specified by:
getUserUuid in interface AuditedModel
Specified by:
getUserUuid in interface RepositoryEntry

getUuid

String getUuid()
Specified by:
getUuid in interface StagedModel

getVersion

String getVersion()

getVersionUserId

long getVersionUserId()

getVersionUserName

String getVersionUserName()

getVersionUserUuid

String getVersionUserUuid()

hasLock

boolean hasLock()

isCheckedOut

boolean isCheckedOut()

isDefaultRepository

boolean isDefaultRepository()

isInTrash

boolean isInTrash()

isInTrashContainer

boolean isInTrashContainer()

isManualCheckInRequired

boolean isManualCheckInRequired()

isRepositoryCapabilityProvided

<T extends Capability> boolean isRepositoryCapabilityProvided(Class<T> capabilityClass)

isSupportsLocking

boolean isSupportsLocking()

isSupportsMetadata

boolean isSupportsMetadata()

isSupportsSocial

boolean isSupportsSocial()

Liferay 7.0-ce-b4