filechampion4j 0.9.8.3
File validation library for Java
Loading...
Searching...
No Matches
dev.filechampion.filechampion4j.ValidationResponse Class Reference
Collaboration diagram for dev.filechampion.filechampion4j.ValidationResponse:
Collaboration graph

Public Member Functions

 ValidationResponse (boolean isValid, String resultsInfo, String resultsDetails, String cleanFileName, byte[] fileBytes, Map< String, String > fileChecksums, String... validFilePath)
 
boolean isValid ()
 
String resultsInfo ()
 
String resultsDetails ()
 
String getCleanFileName ()
 
byte[] getFileBytes ()
 
Map< String, String > getFileChecksums ()
 
String[] getValidFilePath ()
 

Private Attributes

final boolean isValid
 
final String resultsInfo
 
final String resultsDetails
 
final String cleanFileName
 
final byte[] fileBytes
 
final Map< String, String > fileChecksums
 
final String[] validFilePath
 

Detailed Description

This class is used to return the results of a file validation.

Definition at line 8 of file ValidationResponse.java.

Constructor & Destructor Documentation

◆ ValidationResponse()

dev.filechampion.filechampion4j.ValidationResponse.ValidationResponse ( boolean  isValid,
String  resultsInfo,
String  resultsDetails,
String  cleanFileName,
byte[]  fileBytes,
Map< String, String >  fileChecksums,
String...  validFilePath 
)

ValidationResponse is used to return the results of a file validation.

Parameters
isValid(Boolean) true if the file is valid, false otherwise
resultsInfo(String) a String containing the result summary of the validation
resultsDetails(String) a String containing the details of the validation
cleanFileName(String) the file name with all special characters replaced with underscores
fileBytes(bytes[]) the file bytes
fileChecksums(Map<String, String>) hash map containing the file checksums as 'algorithm' => 'checksum'
validFilePath(String) optional valid file path if outputDir was set in the filechampion4j constructor

Definition at line 27 of file ValidationResponse.java.

References dev.filechampion.filechampion4j.ValidationResponse.cleanFileName, dev.filechampion.filechampion4j.ValidationResponse.fileBytes, dev.filechampion.filechampion4j.ValidationResponse.fileChecksums, dev.filechampion.filechampion4j.ValidationResponse.isValid, dev.filechampion.filechampion4j.ValidationResponse.resultsDetails, dev.filechampion.filechampion4j.ValidationResponse.resultsInfo, and dev.filechampion.filechampion4j.ValidationResponse.validFilePath.

Member Function Documentation

◆ getCleanFileName()

String dev.filechampion.filechampion4j.ValidationResponse.getCleanFileName ( )

Returns the file name with all special characters replaced with underscores

Returns
(String) the file name with all special characters replaced with underscores

Definition at line 65 of file ValidationResponse.java.

65 {
66 return cleanFileName;
67 }

References dev.filechampion.filechampion4j.ValidationResponse.cleanFileName.

◆ getFileBytes()

byte[] dev.filechampion.filechampion4j.ValidationResponse.getFileBytes ( )

Returns the file bytes

Returns
(bytes[]) the file bytes of validated file

Definition at line 73 of file ValidationResponse.java.

73 {
74 return fileBytes;
75 }

References dev.filechampion.filechampion4j.ValidationResponse.fileBytes.

◆ getFileChecksums()

Map< String, String > dev.filechampion.filechampion4j.ValidationResponse.getFileChecksums ( )

Returns the file SHA-256 checksum

Returns
(String) the file checksum

Definition at line 81 of file ValidationResponse.java.

81 {
82 return fileChecksums;
83 }

References dev.filechampion.filechampion4j.ValidationResponse.fileChecksums.

◆ getValidFilePath()

String[] dev.filechampion.filechampion4j.ValidationResponse.getValidFilePath ( )

Returns the valid file path if outputDir was set in the filechampion4j constructor

Returns
(String) the valid file path if outputDir was set in the filechampion4j constructor

Definition at line 89 of file ValidationResponse.java.

89 {
90 return validFilePath != null ? validFilePath : new String[0];
91 }

References dev.filechampion.filechampion4j.ValidationResponse.validFilePath.

◆ isValid()

boolean dev.filechampion.filechampion4j.ValidationResponse.isValid ( )

Returns true if the file is valid, false otherwise

Returns
(Boolean) true if the file is valid, false otherwise

Definition at line 41 of file ValidationResponse.java.

41 {
42 return isValid;
43 }

References dev.filechampion.filechampion4j.ValidationResponse.isValid.

◆ resultsDetails()

String dev.filechampion.filechampion4j.ValidationResponse.resultsDetails ( )

Returns a String containing the details of the validation

Returns
(String) a String containing the details of the validation

Definition at line 57 of file ValidationResponse.java.

57 {
58 return resultsDetails;
59 }

References dev.filechampion.filechampion4j.ValidationResponse.resultsDetails.

◆ resultsInfo()

String dev.filechampion.filechampion4j.ValidationResponse.resultsInfo ( )

Returns a String containing the result sammery of the validation

Returns
(String) a String containing the result sammery of the validation

Definition at line 49 of file ValidationResponse.java.

49 {
50 return resultsInfo;
51 }

References dev.filechampion.filechampion4j.ValidationResponse.resultsInfo.

Member Data Documentation

◆ cleanFileName

final String dev.filechampion.filechampion4j.ValidationResponse.cleanFileName
private

◆ fileBytes

final byte [] dev.filechampion.filechampion4j.ValidationResponse.fileBytes
private

◆ fileChecksums

final Map<String, String> dev.filechampion.filechampion4j.ValidationResponse.fileChecksums
private

◆ isValid

final boolean dev.filechampion.filechampion4j.ValidationResponse.isValid
private

◆ resultsDetails

final String dev.filechampion.filechampion4j.ValidationResponse.resultsDetails
private

◆ resultsInfo

final String dev.filechampion.filechampion4j.ValidationResponse.resultsInfo
private

◆ validFilePath

final String [] dev.filechampion.filechampion4j.ValidationResponse.validFilePath
private

The documentation for this class was generated from the following file: