Interface FileEntry
- All Superinterfaces:
AuditedModel
,ClassedModel
,GroupedModel
,RepositoryEntry
,RepositoryModel<FileEntry>
,Serializable
,StagedGroupedModel
,StagedModel
- All Known Implementing Classes:
FileEntryProxyBean
,FileEntryWrapper
- Author:
- Alexander Chow
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsPermission
(PermissionChecker permissionChecker, String actionId) long
Returns the content stream of the current file version.getContentStream
(String version) default String
long
Returns the current file version.getFileVersion
(String version) getFileVersions
(int status) getFileVersions
(int status, int start, int end) int
getFileVersionsCount
(int status) long
long
getIcon()
Returns the latest file version.getLatestFileVersion
(boolean trusted) Returns the latest file version, optionally bypassing security checks.getLock()
getMimeType
(String version) long
<T extends Capability>
TgetRepositoryCapability
(Class<T> capabilityClass) long
long
getSize()
getTitle()
long
getUuid()
boolean
hasLock()
boolean
boolean
boolean
boolean
boolean
<T extends Capability>
booleanisRepositoryCapabilityProvided
(Class<T> capabilityClass) boolean
boolean
boolean
Methods inherited from interface com.liferay.portal.kernel.model.AuditedModel
setCompanyId, setCreateDate, setModifiedDate, setUserId, setUserName, setUserUuid
Methods inherited from interface com.liferay.portal.kernel.model.ClassedModel
getExpandoBridge, getModelClass, getModelClassName, getPrimaryKeyObj, setPrimaryKeyObj
Methods inherited from interface com.liferay.portal.kernel.model.GroupedModel
setGroupId
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.kernel.model.StagedGroupedModel
getLastPublishDate, setLastPublishDate
Methods inherited from interface com.liferay.portal.kernel.model.StagedModel
clone, getStagedModelType, setCompanyId, setCreateDate, setModifiedDate, setUuid
-
Field Details
-
FILE_ENTRY_ID_ACCESSOR
-
-
Method Details
-
containsPermission
boolean containsPermission(PermissionChecker permissionChecker, String actionId) throws PortalException - Throws:
PortalException
-
getCompanyId
long getCompanyId()- Specified by:
getCompanyId
in interfaceAuditedModel
- Specified by:
getCompanyId
in interfaceRepositoryEntry
- Specified by:
getCompanyId
in interfaceStagedModel
-
getContentStream
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:
-
getContentStream
- Throws:
PortalException
-
getCreateDate
Date getCreateDate()- Specified by:
getCreateDate
in interfaceAuditedModel
- Specified by:
getCreateDate
in interfaceRepositoryEntry
- Specified by:
getCreateDate
in interfaceStagedModel
-
getDescription
String getDescription() -
getDisplayDate
Date getDisplayDate() -
getExpirationDate
Date getExpirationDate() -
getExtension
String getExtension() -
getExternalReferenceCode
-
getFileEntryId
long getFileEntryId() -
getFileName
String getFileName() -
getFileShortcuts
List<FileShortcut> getFileShortcuts() -
getFileVersion
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 bygetLatestFileVersion()
. In third-party repositories, these two methods may function identically.- Returns:
- the current file version
- Throws:
PortalException
-
getFileVersion
- Throws:
PortalException
-
getFileVersions
-
getFileVersions
-
getFileVersionsCount
int getFileVersionsCount(int status) -
getFolder
Folder getFolder() -
getFolderId
long getFolderId() -
getGroupId
long getGroupId()- Specified by:
getGroupId
in interfaceGroupedModel
- Specified by:
getGroupId
in interfaceRepositoryEntry
-
getIcon
String getIcon() -
getIconCssClass
String getIconCssClass() -
getLatestFileVersion
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 andgetFileVersion()
may be identical.- Returns:
- the latest file version
- Throws:
PortalException
-
getLatestFileVersion
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 andgetFileVersion()
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
-
getModifiedDate
Date getModifiedDate()- Specified by:
getModifiedDate
in interfaceAuditedModel
- Specified by:
getModifiedDate
in interfaceRepositoryEntry
- Specified by:
getModifiedDate
in interfaceStagedModel
-
getReadCount
long getReadCount() -
getRepositoryCapability
-
getRepositoryId
long getRepositoryId() -
getReviewDate
Date getReviewDate() -
getSize
long getSize() -
getTitle
String getTitle() -
getUserId
long getUserId()- Specified by:
getUserId
in interfaceAuditedModel
- Specified by:
getUserId
in interfaceRepositoryEntry
-
getUserName
String getUserName()- Specified by:
getUserName
in interfaceAuditedModel
- Specified by:
getUserName
in interfaceRepositoryEntry
-
getUserUuid
String getUserUuid()- Specified by:
getUserUuid
in interfaceAuditedModel
- Specified by:
getUserUuid
in interfaceRepositoryEntry
-
getUuid
String getUuid()- Specified by:
getUuid
in interfaceStagedModel
-
getVersion
String getVersion() -
hasLock
boolean hasLock() -
isCheckedOut
boolean isCheckedOut() -
isDefaultRepository
boolean isDefaultRepository() -
isInTrash
boolean isInTrash() -
isInTrashContainer
boolean isInTrashContainer() -
isManualCheckInRequired
boolean isManualCheckInRequired() -
isRepositoryCapabilityProvided
-
isSupportsLocking
boolean isSupportsLocking() -
isSupportsMetadata
boolean isSupportsMetadata() -
isSupportsSocial
boolean isSupportsSocial()
-