lumis.portal.file.transformation
Interface IFileTransformationManagerSPI

Package class diagram package IFileTransformationManagerSPI
All Superinterfaces:
IFileTransformationManager
All Known Implementing Classes:
FileTransformationManager

public interface IFileTransformationManagerSPI
extends IFileTransformationManager

Service provider interface for file transformations.

Since:
6.1.0

Method Summary
 void addTransformedFileConfig(TransformedFileConfig file, ITransaction transaction)
          Persists a transformed file.
 void changeFilename(SessionConfig sessionConfig, String fileId, String newFilename, ITransaction transaction)
          Changes the filename of a tranformed file.
 File getFile(SessionConfig sessionConfig, TransformedFileConfig transformedFileConfig, ITransaction transaction)
          Returns a file based on the TransformedFileConfig indicated.
 IServiceInterfaceUrl getFileHref(SessionConfig sessionConfig, TransformedFileConfig transformedFileConfig, ITransaction transaction)
          Returns the href for linking to the given transformed file in a portal's page.
 TransformedFileConfig getTransformedFileConfig(String fileTrnsfPersistedId, ITransaction transaction)
          Returns the persisted generated file.
 Collection<TransformedFileConfig> getTransformedFileConfigByOriginalId(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 recreateFiles(SessionConfig sessionConfig, FileTransformation fileTransformation, ITransaction transaction)
          Recreates all derived files of a given transformation.
 void recreateTransformations(SessionConfig sessionConfig, 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, String fileId, FileTransformation fileTransformation, ITransaction transaction)
          Transforms a given file.
 void updateMetadata(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

recreateFiles

void recreateFiles(SessionConfig sessionConfig,
                   FileTransformation fileTransformation,
                   ITransaction transaction)
                   throws PortalException
Recreates all derived files of a given transformation.

Parameters:
sessionConfig - the current session configuration.
fileTransformation - the file transformation
transaction - the transaction for persistence access.
Throws:
PortalException
Since:
6.1.0

recreateTransformations

void recreateTransformations(SessionConfig sessionConfig,
                             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,
                   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 persisted
transaction - the current transaction
Throws:
PortalException
Since:
6.1.0

getTransformedFileConfig

TransformedFileConfig getTransformedFileConfig(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

Collection<TransformedFileConfig> getTransformedFileConfigByOriginalId(String originalFileId,
                                                                       ITransaction transaction)
                                                                       throws PortalException
Returns all transformed files by the original file.

Parameters:
originalFileId - the original file of the transformed config persisted
transaction - the current transaction
Returns:
the file transformation persisted
Throws:
PortalException
Since:
6.1.0

getFile

File getFile(SessionConfig sessionConfig,
             TransformedFileConfig transformedFileConfig,
             ITransaction transaction)
             throws PortalException
Returns a file based on the TransformedFileConfig indicated.

Parameters:
sessionConfig - identifier for the session.
transformedFileConfig - the transformedfileConfig of the asked file.
transaction - the transaction for persistence access.
Returns:
the File object for accessing the corresponding file in the filesystem.
Throws:
PortalException
Since:
6.1.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(String transformedFileConfigId,
                    ITransaction transaction)
                    throws PortalException
Updates metadata information from a given tranformed file

Parameters:
transformedFileConfigId - file that the metadata information will be updated
transaction - the transaction for persistence access.
Throws:
PortalException - if any error updating occurs
Since:
6.1.0

changeFilename

void changeFilename(SessionConfig sessionConfig,
                    String fileId,
                    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, or null if it was not in any web root.
Throws:
PortalException
Since:
6.2.0


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.