Class Renditions
java.lang.Object
com.saperion.connector.renditions.Renditions
Utility class with methods to create and work with renditions.
-
Method Summary
Modifier and TypeMethodDescriptioncreate(String originalFilename, TargetFormat target, WrappedFile file) Creates a list of renditions.create(String originalFilename, TargetFormat target, WrappedFile... files) Creates a list of renditions.static StringtransformFileName(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 StringtransformFileName(String originalFilename, TargetFormat target) Transforms the file name by replacing the original extension (if present) with the extension of the target format.
-
Method Details
-
create
public static List<Rendition> create(String originalFilename, TargetFormat target, WrappedFile... files) throws 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:
FileNotFoundException- file was not found
-
create
public static List<Rendition> create(String originalFilename, TargetFormat target, WrappedFile file) throws 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:
FileNotFoundException- if the file was not found
-
transformFileName
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
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
-