|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@StableMinor(version="6.2", sinceVersion="4.0") public interface IFileManager
Manages file information.
File validations may be configured defining property bags. The properties are applied to service instances within of a channel that contains it. The properties are:
Property | Description |
---|---|
lumis.portal.file.validation.height | Define the maximum height limit for the file in pixels. This validation will be applied just over files that have this information with metadata. |
lumis.portal.file.validation.width | Define the maximum width limit for the file in pixels. This validation will be applied just over files that have this information with metadata. |
lumis.portal.file.validation.size | Define the maximum size limit for the file in bytes. This validation will be applied over all files that the File Manager tries to persist. |
lumis.portal.file.validation.className | Define a list of custom class validators
that will be used by the File Manager when his will try to persist each file. More information check
IFileValidator . |
IFileValidator}
Method Summary | |
---|---|
FileConfig |
add(SessionConfig sessionConfig,
FileConfig fileConfig,
ITransaction transaction)
Deprecated. Since 6.0.0 replaced by add(SessionConfig, String, File, String, String, ITransaction) . |
FileConfig |
add(SessionConfig sessionConfig,
String name,
File file,
String contentType,
String serviceInstanceId,
ITransaction transaction)
Persists a file. |
void |
changeFilename(SessionConfig sessionConfig,
String fileId,
String newFilename,
ITransaction transaction)
Changes the filename of a file. |
FileConfig |
get(SessionConfig sessionConfig,
String fileId,
ITransaction transaction)
Returns the FileConfig for a file with the given fileId. |
File |
getFile(SessionConfig sessionConfig,
FileConfig fileConfig,
ITransaction transaction)
Returns the File object for accessing the corresponding file in the filesystem. |
Collection<FileConfig> |
getFileConfigsByFilesId(SessionConfig sessionConfig,
String filesId,
ITransaction transaction)
Returns a collection of FileConfig of file entries belonging to the files with the given id. |
IServiceInterfaceUrl |
getFileHref(SessionConfig sessionConfig,
String fileId,
ITransaction transaction)
Returns the href that is used to access the specified file. |
FilesConfig |
getFilesConfig(SessionConfig sessionConfig,
String filesId,
ITransaction transaction)
Returns the FilesConfig for a files with the given filesId. |
FileMimeTypeConfig |
getMimeType(SessionConfig sessionConfig,
String fileMimeType,
ITransaction transaction)
Returns a mime type information. |
int |
getNumberOfServiceInstanceFiles(SessionConfig sessionConfig,
String serviceInstanceId,
ITransaction transaction)
Returns the number of files for a service instance. |
void |
publicServiceInstanceFiles(SessionConfig sessionConfig,
String serviceInstanceId,
boolean filesArePublic,
ITransaction transaction)
Creates or deletes the public copy of the files of a service instance. |
void |
removeStoredFile(SessionConfig sessionConfig,
String fileId,
ITransaction transaction)
Removes the specified file. |
void |
removeStoredFiles(SessionConfig sessionConfig,
String filesId,
ITransaction transaction)
Removes the files associated with the filesId given. |
Method Detail |
---|
FileConfig get(SessionConfig sessionConfig, String fileId, ITransaction transaction) throws PortalException
sessionConfig
- identifier for the session.fileId
- the id of the file.transaction
- the transaction for persistence access.
PortalException
FilesConfig getFilesConfig(SessionConfig sessionConfig, String filesId, ITransaction transaction) throws PortalException
sessionConfig
- identifier for the session.filesId
- the id of the files.transaction
- the transaction for persistence access.
PortalException
Collection<FileConfig> getFileConfigsByFilesId(SessionConfig sessionConfig, String filesId, ITransaction transaction) throws PortalException
sessionConfig
- identifier for the session.filesId
- id of the files entry.transaction
- the transaction for persistence access.
PortalException
File getFile(SessionConfig sessionConfig, FileConfig fileConfig, ITransaction transaction) throws PortalException
sessionConfig
- identifier for the session.fileConfig
- the fileConfig of the asked file.transaction
- the transaction for persistence access.
PortalException
FileConfig add(SessionConfig sessionConfig, String name, File file, String contentType, String serviceInstanceId, ITransaction transaction) throws PortalException
sessionConfig
- The session information.name
- The name of the file.file
- The file to be added.contentType
- The contentType of the file.serviceInstanceId
- The ID of the service instance used to add this file.transaction
- The transaction used for the persistence
PortalException
- If any error occurs
FileUploadDeniedException
- if the file was not added
because it did not comply with portal file upload restrictions configuration.FileConfig add(SessionConfig sessionConfig, FileConfig fileConfig, ITransaction transaction) throws PortalException
add(SessionConfig, String, File, String, String, ITransaction)
.
sessionConfig
- identifier for the session.fileConfig
- file config of the file to be added.transaction
- the transaction for persistence access.
FileUploadDeniedException
- if the file was not added
because it did not comply with portal file upload restrictions configuration.
PortalException
void removeStoredFile(SessionConfig sessionConfig, String fileId, ITransaction transaction) throws PortalException
sessionConfig
- identifier for the session.fileId
- the file id.transaction
- the transaction for persistence access.
PortalException
void removeStoredFiles(SessionConfig sessionConfig, String filesId, ITransaction transaction) throws PortalException
sessionConfig
- identifier for the session.filesId
- the filesId.transaction
- the transaction for persistence access.
PortalException
void changeFilename(SessionConfig sessionConfig, String fileId, String newFilename, ITransaction transaction) throws PortalException
sessionConfig
- identifier for the session.fileId
- the file id.newFilename
- the new filename for the file.transaction
- the transaction for persistence access.
PortalException
IServiceInterfaceUrl getFileHref(SessionConfig sessionConfig, String fileId, ITransaction transaction) throws PortalException
sessionConfig
- identifier for the session.fileId
- the file id.transaction
- the transaction for persistence access.
PortalException
void publicServiceInstanceFiles(SessionConfig sessionConfig, String serviceInstanceId, boolean filesArePublic, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.serviceInstanceId
- the service instance id.filesArePublic
- if true the files are copied to the public area, if false the
files are deleted from the public area.transaction
- the transaction for persistence access.
PortalException
FileMimeTypeConfig getMimeType(SessionConfig sessionConfig, String fileMimeType, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.fileMimeType
- the mime type.transaction
- the transaction for persistence access.
PortalException
int getNumberOfServiceInstanceFiles(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.serviceInstanceId
- the service instance identifier.transaction
- the transaction for persistence access.
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |