Package lumis.portal.file.transformation
Interface IFileTransformationManagerSPI
-
- All Superinterfaces:
IFileTransformationManager
- All Known Implementing Classes:
FileTransformationManager
public interface IFileTransformationManagerSPI extends IFileTransformationManager
Service provider interface for file transformations.- Since:
- 6.1.0
- Version:
- $Revision$ $Date$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addTransformedFileConfig(TransformedFileConfig file, ITransaction transaction)
Persists a transformed file.void
changeFilename(SessionConfig sessionConfig, java.lang.String fileId, java.lang.String newFilename, ITransaction transaction)
Changes the filename of a tranformed file.IServiceInterfaceUrl
getFileHref(SessionConfig sessionConfig, TransformedFileConfig transformedFileConfig, ITransaction transaction)
Returns the href for linking to the given transformed file in a portal's page.java.util.Collection<IImageScaleTransformationResult>
getImageScaleTransformationResults(FileConfig srcFile)
Returns all image scaling transformations of the given file.IFile
getPortalFile(SessionConfig sessionConfig, TransformedFileConfig transformedFileConfig, ITransaction transaction)
Returns theIFile
related to the givenTransformedFileConfig
.TransformedFileConfig
getTransformedFileConfig(java.lang.String fileTrnsfPersistedId, ITransaction transaction)
Returns the persisted generated file.java.util.Collection<TransformedFileConfig>
getTransformedFileConfigByOriginalId(java.lang.String originalFileId, ITransaction transaction)
Returns all transformed files by the original file.void
moveTransformedFiles(FileConfig fileConfig, IWebRootPortalBaseFolder oldWebRoot)
Moves the transformed public files from the old web root to the current.void
recreateTransformations(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction)
Recreates all transformations of a given file.void
removeFileTransformationInternal(SessionConfig sessionConfig, FileTransformation fileTransformation, IWebRootPortalBaseFolder webRoot, ITransaction transaction)
Removes the specified transformation and all related files.void
removeTransformedFileConfig(TransformedFileConfig transformedFileConfig, ITransaction transaction)
Deletes asynchronously the persisted transformed file.void
removeTransformedFileConfig(TransformedFileConfig transformedFileConfig, IWebRootPortalBaseFolder webRootBaseFolder, ITransaction transaction)
Deletes synchronously persisted transformed file.void
transformFile(SessionConfig sessionConfig, java.lang.String fileId, FileTransformation fileTransformation, ITransaction transaction)
Transforms a given file.void
updateMetadata(java.lang.String transformedFileConfigId, ITransaction transaction)
Updates metadata information from a given tranformed file-
Methods inherited from interface lumis.portal.file.transformation.IFileTransformationManager
addFileTransformation, getFileTransformation, getFileTransformationsByServiceInstanceId, removeFileTransformation, updateFileTransformation
-
-
-
-
Method Detail
-
removeFileTransformationInternal
void removeFileTransformationInternal(SessionConfig sessionConfig, FileTransformation fileTransformation, IWebRootPortalBaseFolder webRoot, ITransaction transaction) throws PortalException
Removes the specified transformation and all related files.- Parameters:
sessionConfig
- the current session configuration.fileTransformation
- the file transformation.webRoot
- base folder for the website.transaction
- the transaction for persistence access.- Throws:
PortalException
- Since:
- 6.2.0
-
recreateTransformations
void recreateTransformations(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction) throws PortalException
Recreates all transformations of a given file.- Parameters:
sessionConfig
- the current session configuration.serviceInstanceId
- the desired serviceInstanceId.transaction
- the transaction for persistence access.- Throws:
PortalException
- Since:
- 6.1.0
-
transformFile
void transformFile(SessionConfig sessionConfig, java.lang.String fileId, FileTransformation fileTransformation, ITransaction transaction) throws PortalException
Transforms a given file.- Parameters:
sessionConfig
- the current session configuration.fileId
- the file to be transformed.fileTransformation
- the transformation to be user.transaction
- the current transaction- Throws:
PortalException
- Since:
- 6.1.0
-
addTransformedFileConfig
void addTransformedFileConfig(TransformedFileConfig file, ITransaction transaction) throws PortalException
Persists a transformed file.- Parameters:
file
- the transformed file to be persistedtransaction
- the current transaction- Throws:
PortalException
- Since:
- 6.1.0
-
getTransformedFileConfig
TransformedFileConfig getTransformedFileConfig(java.lang.String fileTrnsfPersistedId, ITransaction transaction) throws PortalException
Returns the persisted generated file.- Parameters:
fileTrnsfPersistedId
- the file id of the generated file.transaction
- the current transaction- Throws:
PortalException
- Since:
- 6.1.0
-
removeTransformedFileConfig
void removeTransformedFileConfig(TransformedFileConfig transformedFileConfig, ITransaction transaction) throws PortalException
Deletes asynchronously the persisted transformed file.- Parameters:
transformedFileConfig
- the transformed file config to be deleted.transaction
- the current transaction- Throws:
PortalException
- Since:
- 6.2.0
-
removeTransformedFileConfig
void removeTransformedFileConfig(TransformedFileConfig transformedFileConfig, IWebRootPortalBaseFolder webRootBaseFolder, ITransaction transaction) throws PortalException
Deletes synchronously persisted transformed file.- Parameters:
transformedFileConfig
- the transformed file config to be deleted.webRootBaseFolder
- base folder for the website.transaction
- in which the deletion should occur.- Throws:
PortalException
- Since:
- 6.2.0
-
getTransformedFileConfigByOriginalId
java.util.Collection<TransformedFileConfig> getTransformedFileConfigByOriginalId(java.lang.String originalFileId, ITransaction transaction) throws PortalException
Returns all transformed files by the original file.- Parameters:
originalFileId
- the original file of the transformed config persistedtransaction
- the current transaction- Returns:
- the file transformation persisted
- Throws:
PortalException
- Since:
- 6.1.0
-
getPortalFile
IFile getPortalFile(SessionConfig sessionConfig, TransformedFileConfig transformedFileConfig, ITransaction transaction) throws PortalException
Returns theIFile
related to the givenTransformedFileConfig
.- Parameters:
sessionConfig
- the user's session.transformedFileConfig
- the transformed file config.transaction
- the transaction.- Returns:
- the
IFile
related to the givenTransformedFileConfig
. - Throws:
PortalException
- Since:
- 8.0.0
-
getFileHref
IServiceInterfaceUrl getFileHref(SessionConfig sessionConfig, TransformedFileConfig transformedFileConfig, ITransaction transaction) throws PortalException
Returns the href for linking to the given transformed file in a portal's page.- Parameters:
sessionConfig
- user session information.transformedFileConfig
- the transformed file.transaction
- the transaction for persistence access.- Returns:
- the href.
- Throws:
PortalException
- Since:
- 6.1.0
-
updateMetadata
void updateMetadata(java.lang.String transformedFileConfigId, ITransaction transaction) throws PortalException
Updates metadata information from a given tranformed file- Parameters:
transformedFileConfigId
- file that the metadata information will be updatedtransaction
- the transaction for persistence access.- Throws:
PortalException
- if any error updating occurs- Since:
- 6.1.0
-
changeFilename
void changeFilename(SessionConfig sessionConfig, java.lang.String fileId, java.lang.String newFilename, ITransaction transaction) throws PortalException
Changes the filename of a tranformed file.- Parameters:
sessionConfig
- identifier for the session.fileId
- the file id.newFilename
- the new filename for the file.transaction
- the transaction for persistence access.- Throws:
PortalException
- Since:
- 6.1.0
-
moveTransformedFiles
void moveTransformedFiles(FileConfig fileConfig, IWebRootPortalBaseFolder oldWebRoot) throws PortalException
Moves the transformed public files from the old web root to the current.- Parameters:
fileConfig
- the file whose transformations are to be moved.oldWebRoot
- the web root folder the file was originally in, ornull
if it was not in any web root.- Throws:
PortalException
- Since:
- 6.2.0
-
getImageScaleTransformationResults
java.util.Collection<IImageScaleTransformationResult> getImageScaleTransformationResults(FileConfig srcFile) throws PortalException
Returns all image scaling transformations of the given file.- Parameters:
srcFile
- the file- Returns:
- all image scaling transformations of the given file
- Throws:
PortalException
- Since:
- 16.0.0
-
-