Class Renditions
- java.lang.Object
-
- com.saperion.connector.renditions.Renditions
-
public final class Renditions extends java.lang.ObjectUtility class with methods to create and work with renditions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<Rendition>create(java.lang.String originalFilename, TargetFormat target, WrappedFile file)Creates a list of renditions.static java.util.List<Rendition>create(java.lang.String originalFilename, TargetFormat target, WrappedFile... files)Creates a list of renditions.static java.lang.StringtransformFileName(java.lang.String originalFilename, int page, TargetFormat target)Transforms the file name by replacing the original extension (if present) with the extension and adding the page number (_pagex).static java.lang.StringtransformFileName(java.lang.String originalFilename, TargetFormat target)Transforms the file name by replacing the original extension (if present) with the extension of the target format.
-
-
-
Method Detail
-
create
public static java.util.List<Rendition> create(java.lang.String originalFilename, TargetFormat target, WrappedFile... files) throws java.io.FileNotFoundException
Creates a list of renditions.- Parameters:
originalFilename- the original filenametarget- the target formatfiles- the files that will contain the pages of the rendered document- Returns:
- the list or renditions
- Throws:
java.io.FileNotFoundException- file was not found
-
create
public static java.util.List<Rendition> create(java.lang.String originalFilename, TargetFormat target, WrappedFile file) throws java.io.FileNotFoundException
Creates a list of renditions.- Parameters:
originalFilename- the original filenametarget- the target formatfile- the file that will contain the rendered content- Returns:
- the list of renditions
- Throws:
java.io.FileNotFoundException- if the file was not found
-
transformFileName
public static java.lang.String transformFileName(java.lang.String originalFilename, TargetFormat target)Transforms the file name by replacing the original extension (if present) with the extension of the target format.- Parameters:
originalFilename- the original filenametarget- the target format- Returns:
- the transformed name
-
transformFileName
public static java.lang.String transformFileName(java.lang.String originalFilename, int page, TargetFormat target)Transforms the file name by replacing the original extension (if present) with the extension and adding the page number (_pagex).- Parameters:
originalFilename- the original filenamepage- the page numbertarget- the target format- Returns:
- the transformed name
-
-