Package de.xima.fc.workflow.data
Class GenericFormPersistFile
- java.lang.Object
 - 
- de.xima.fc.workflow.data.GenericFormPersistFile
 
 
- 
public final class GenericFormPersistFile extends Object
Describes the data of a generic form persist file, whose exact meaning has yet to be determined.- Since:
 - 7.0.0
 - Author:
 - XIMA MEDIA GmbH
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGenericFormPersistFile.PdfInfo 
- 
Constructor Summary
Constructors Constructor Description GenericFormPersistFile(String fileName, byte[] fileContent)Creates a new generic persist file with the given data. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetExtension()byte[]getFileContent()StringgetFileName()Optional<com.alibaba.fastjson.JSONObject>getJsonObject()Optional<GenericFormPersistFile.PdfInfo>getPdfInfo()Optional<String>getPlainText()Optional<Document>getXml()booleanisHasExtension(String extension)booleanisHasPdfSignature() 
 - 
 
- 
- 
Constructor Detail
- 
GenericFormPersistFile
public GenericFormPersistFile(String fileName, byte[] fileContent)
Creates a new generic persist file with the given data.- Parameters:
 fileName- Name of the file.fileContent- Byte content of the file.
 
 - 
 
- 
Method Detail
- 
getExtension
public String getExtension()
- Returns:
 - Extension of the file.
 
 
- 
getFileContent
public byte[] getFileContent()
- Returns:
 - Byte content of the file.
 
 
- 
getFileName
public String getFileName()
- Returns:
 - Name of the file.
 
 
- 
getJsonObject
public Optional<com.alibaba.fastjson.JSONObject> getJsonObject()
- Returns:
 - The file content as a JSON object, if it can be parsed as such.
 
 
- 
getPlainText
public Optional<String> getPlainText()
- Returns:
 - The file content as plain text, if it can be parsed as such.
 
 
- 
getXml
public Optional<Document> getXml()
- Returns:
 - The file content as XML, if it can be parsed as such.
 
 
- 
isHasExtension
public boolean isHasExtension(String extension)
- Parameters:
 extension- An extension to check, with or without a leading dot.- Returns:
 - Whether this file has the given extension.
 
 
- 
isHasPdfSignature
public boolean isHasPdfSignature()
 
- 
getPdfInfo
public Optional<GenericFormPersistFile.PdfInfo> getPdfInfo()
 
 - 
 
 -