|
||||||||||
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,
java.lang.String tranformedFileId,
java.lang.String newFilename,
ITransaction transaction)
Changes the filename of a tranformed file. |
java.io.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(java.lang.String fileTransformationId,
ITransaction transaction)
Return a given persisted transformation. |
java.util.Collection<FileTransformation> |
getFileTransformationsByServiceInstanceId(java.lang.String serviceInstanceId,
ITransaction transaction)
Returns all transformations for the given service instance. |
TransformedFileConfig |
getTransformedFileConfig(java.lang.String transformedFileId,
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 |
recreateFiles(SessionConfig sessionConfig,
FileTransformation fileTransformation,
ITransaction transaction)
Recreates all derived files of a given transformation. |
void |
recreateTransformations(SessionConfig sessionConfig,
java.lang.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,
ITransaction transaction)
Removes the specified transformation and all related files. |
void |
removeTransformedFileConfig(TransformedFileConfig transformedFileConfig,
boolean sync,
ITransaction transaction)
Deletes the persisted transformed file. |
void |
transformFile(SessionConfig sessionConfig,
java.lang.String fileId,
FileTransformation fileTransformation,
ITransaction transaction)
Transforms a given file. |
void |
updateFileTransformation(SessionConfig sessionConfig,
FileTransformation fileTransformation,
ITransaction transaction)
Updates a given transformation. |
void |
updateMetadata(java.lang.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 java.util.Collection<FileTransformation> getFileTransformationsByServiceInstanceId(java.lang.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, java.lang.String serviceInstanceId, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
recreateTransformations
in interface IFileTransformationManagerSPI
sessionConfig
- the current session configuration.serviceInstanceId
- the wished 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, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
removeFileTransformationInternal
in interface IFileTransformationManagerSPI
sessionConfig
- the current session configuration.fileTransformation
- the file transformation.transaction
- the transaction for persistence access.
PortalException
public void transformFile(SessionConfig sessionConfig, java.lang.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(java.lang.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 java.util.Collection<TransformedFileConfig> getTransformedFileConfigByOriginalId(java.lang.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, boolean sync, ITransaction transaction) throws PortalException
IFileTransformationManagerSPI
removeTransformedFileConfig
in interface IFileTransformationManagerSPI
transformedFileConfig
- the transformed file configsync
- true
if have to be a synchronous or false
if not.transaction
- the current transaction
PortalException
public FileTransformation getFileTransformation(java.lang.String fileTransformationId, ITransaction transaction) throws PortalException
IFileTransformationManager
getFileTransformation
in interface IFileTransformationManager
fileTransformationId
- the wished transformation id.transaction
- the transaction for persistence access.
PortalException
public java.io.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(java.lang.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, java.lang.String tranformedFileId, java.lang.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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |