|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.portal.file.transformation.FileTransformationManager
public class FileTransformationManager
Manager responsible for file transformations.
Implementation of IFileTransformationManager
Constructor Summary | |
---|---|
FileTransformationManager()
|
Method Summary | |
---|---|
FileTransformation |
addFileTransformation(SessionConfig sessionConfig,
FileTransformation fileTransformation,
ITransaction transaction)
Persist a FileTransformation for a serviceInstance. |
void |
addTransformedFileConfig(TransformedFileConfig fileTransformedConfig,
ITransaction transaction)
Persists a transformed file. |
void |
changeFilename(SessionConfig sessionConfig,
String tranformedFileId,
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. |
FileTransformation |
getFileTransformation(String fileTransformationId,
ITransaction transaction)
Return a given persisted transformation. |
Collection<FileTransformation> |
getFileTransformationsByServiceInstanceId(String serviceInstanceId,
ITransaction transaction)
Returns all transformations for the given service instance. |
TransformedFileConfig |
getTransformedFileConfig(String transformedFileId,
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 |
removeFileTransformation(SessionConfig sessionConfig,
FileTransformation fileTransformation,
ITransaction transaction)
Removes the specified transformation and its related files. |
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 |
updateFileTransformation(SessionConfig sessionConfig,
FileTransformation fileTransformation,
ITransaction transaction)
Updates a given transformation. |
void |
updateMetadata(String transformedFileConfigId,
ITransaction transaction)
Updates metadata information from a given tranformed file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileTransformationManager()
Method Detail |
---|
public FileTransformation addFileTransformation(SessionConfig sessionConfig, FileTransformation fileTransformation, ITransaction transaction) throws PortalException
IFileTransformationManager
addFileTransformation
in interface IFileTransformationManager
sessionConfig
- the current session configuration.fileTransformation
- the transformation to be added.
PortalException
public Collection<FileTransformation> getFileTransformationsByServiceInstanceId(String serviceInstanceId, ITransaction transaction) throws PortalException
IFileTransformationManager
getFileTransformationsByServiceInstanceId
in interface IFileTransformationManager
serviceInstanceId
- the wished service instance id.
PortalException
public void recreateFiles(SessionConfig sessionConfig, FileTransformation fileTransformation, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
recreateFiles
in interface IFileTransformationManagerSPI
sessionConfig
- the current session configuration.fileTransformation
- the file transformationtransaction
- the transaction for persistence access.
PortalException
public void recreateTransformations(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
recreateTransformations
in interface IFileTransformationManagerSPI
sessionConfig
- the current session configuration.serviceInstanceId
- the desired serviceInstanceId.transaction
- the transaction for persistence access.
PortalException
public void removeFileTransformation(SessionConfig sessionConfig, FileTransformation fileTransformation, ITransaction transaction) throws PortalException
IFileTransformationManager
This method only schedules the removal, that will occur asynchrounsly. But the removal will only occur if the given transaction commits.
removeFileTransformation
in interface IFileTransformationManager
sessionConfig
- the current session configuration.fileTransformation
- the file transformation responsible for the file creation.transaction
- the transaction for persistence access.
PortalException
public void removeFileTransformationInternal(SessionConfig sessionConfig, FileTransformation fileTransformation, IWebRootPortalBaseFolder webRoot, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
removeFileTransformationInternal
in interface IFileTransformationManagerSPI
sessionConfig
- the current session configuration.fileTransformation
- the file transformation.webRoot
- base folder for the website.transaction
- the transaction for persistence access.
PortalException
public void transformFile(SessionConfig sessionConfig, String fileId, FileTransformation fileTransformation, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
transformFile
in interface IFileTransformationManagerSPI
sessionConfig
- the current session configuration.fileId
- the file to be transformed.fileTransformation
- the transformation to be user.transaction
- the current transaction
PortalException
public void updateFileTransformation(SessionConfig sessionConfig, FileTransformation fileTransformation, ITransaction transaction) throws PortalException
IFileTransformationManager
updateFileTransformation
in interface IFileTransformationManager
sessionConfig
- the current session configuration.fileTransformation
- the file transformation to be updatedtransaction
- the current transaction
PortalException
public void addTransformedFileConfig(TransformedFileConfig fileTransformedConfig, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
addTransformedFileConfig
in interface IFileTransformationManagerSPI
fileTransformedConfig
- the transformed file to be persistedtransaction
- the current transaction
PortalException
public TransformedFileConfig getTransformedFileConfig(String transformedFileId, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
getTransformedFileConfig
in interface IFileTransformationManagerSPI
transformedFileId
- the file id of the generated file.transaction
- the current transaction
PortalException
public Collection<TransformedFileConfig> getTransformedFileConfigByOriginalId(String originalFileId, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
getTransformedFileConfigByOriginalId
in interface IFileTransformationManagerSPI
originalFileId
- the original file of the transformed config persistedtransaction
- the current transaction
PortalException
public void removeTransformedFileConfig(TransformedFileConfig transformedFileConfig, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
removeTransformedFileConfig
in interface IFileTransformationManagerSPI
transformedFileConfig
- the transformed file config to be deleted.transaction
- the current transaction
PortalException
public void removeTransformedFileConfig(TransformedFileConfig transformedFileConfig, IWebRootPortalBaseFolder webRootBaseFolder, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
removeTransformedFileConfig
in interface IFileTransformationManagerSPI
transformedFileConfig
- the transformed file config to be deleted.webRootBaseFolder
- base folder for the website.transaction
- in which the deletion should occur.
PortalException
public FileTransformation getFileTransformation(String fileTransformationId, ITransaction transaction) throws PortalException
IFileTransformationManager
getFileTransformation
in interface IFileTransformationManager
fileTransformationId
- the wished transformation id.transaction
- the transaction for persistence access.
PortalException
public File getFile(SessionConfig sessionConfig, TransformedFileConfig transformedFileConfig, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
TransformedFileConfig
indicated.
getFile
in interface IFileTransformationManagerSPI
sessionConfig
- identifier for the session.transformedFileConfig
- the transformedfileConfig of the asked file.transaction
- the transaction for persistence access.
PortalException
public IServiceInterfaceUrl getFileHref(SessionConfig sessionConfig, TransformedFileConfig transformedFileConfig, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
getFileHref
in interface IFileTransformationManagerSPI
sessionConfig
- user session information.transformedFileConfig
- the transformed file.transaction
- the transaction for persistence access.
PortalException
public void updateMetadata(String transformedFileConfigId, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
updateMetadata
in interface IFileTransformationManagerSPI
transformedFileConfigId
- file that the metadata information will be updatedtransaction
- the transaction for persistence access.
PortalException
- if any error updating occurspublic void changeFilename(SessionConfig sessionConfig, String tranformedFileId, String newFilename, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
changeFilename
in interface IFileTransformationManagerSPI
sessionConfig
- identifier for the session.tranformedFileId
- the file id.newFilename
- the new filename for the file.transaction
- the transaction for persistence access.
PortalException
public void moveTransformedFiles(FileConfig fileConfig, IWebRootPortalBaseFolder oldWebRoot) throws PortalException
IFileTransformationManagerSPI
moveTransformedFiles
in interface IFileTransformationManagerSPI
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.
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |