Interface IFileTransformationManagerSPI

    • 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,
                                     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
      • 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
      • 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