Interface OutputContentHelper
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumTransactional semantics for importing output files. -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteOutputContent(List<String> contentNames) Deletes the output content from the content store for the request.Exports all previously imported output content to files in the request output directory.exportOutputContent(List<String> contentNames) Exports the specified previously imported output content to files in the request output directory.Gets the request output directory as resolved to the current server.Gets the request work directory as resolved to the current server.importOutputFiles(List<String> fileNames, OutputContentHelper.CommitSemantics semantics) Imports the specified files from the resolved output directory.Imports all files from the resolved output directory.booleanGets an indication whether the request file directory is shared.booleanoutputContentExists(String contentName) Checks whether the specified output content exists in the content store for the request.booleanDetermines if the request's output directory exists.Gets the detailed information for all existing output content in the content store.queryOutputContent(String contentName) Gets the detailed information for the output content in the content store, if it exists.booleanDetermines if the request's work directory exists.
-
Method Details
-
workDirectoryExists
boolean workDirectoryExists()Determines if the request's work directory exists. Allows the job at any stage to determine if the work directory exists before it attempts to create temporary files.The job must define a system property to cause ESS to create the work directory.
- Returns:
trueif the work directory exists;falseif the work directory does not exist.
-
outputDirectoryExists
boolean outputDirectoryExists()Determines if the request's output directory exists. Allows the job at any stage, such as update, to determine if the output directory exists before it attempts to create output files.The job must define a system property to cause ESS to create the output directory.
- Returns:
trueif the output directory exists;falseif the output directory does not exist.
-
getResolvedWorkDirectory
String getResolvedWorkDirectory()Gets the request work directory as resolved to the current server.The job may create temporary files in the work directory, and ESS will automatically delete the work directory at the end of request execution if the RequestFileDirectory is shared, or at the end of each stage (pre-processing, execution, update, post-processing) if the RequestFileDirectory is local.
- Returns:
- request work directory, or
nullif the job does not define the necessary system property.
-
getResolvedOutputDirectory
String getResolvedOutputDirectory()Gets the request output directory as resolved to the current server.The job may create output files in the output directory that can be autmoatically or manually imported to the ESS content store.
- Returns:
- request output directory, or null if the job does not define the necessary system property.
-
importOutputFiles
ImportExportResult importOutputFiles(List<String> fileNames, OutputContentHelper.CommitSemantics semantics) Imports the specified files from the resolved output directory. Imported content overwrites existing content of the same name, unless the existing content was created using the API. In that case, the file will not be imported.- Parameters:
fileNames- aList<String>of output file names to be imported, where the name is the simple name of the file name.semantics- commit semantics for the import.Transactionalis not valid for a user-provided handle.- Returns:
- result of the operation.
-
importOutputFiles
Imports all files from the resolved output directory. Imported content overwrites existing content of the same name, unless the existing content was created using the API. In that case, the file will not be imported.- Parameters:
semantics- commit semantics for the import.Transactionalis not valid for a user-provided handle.- Returns:
- result of the operation.
-
exportOutputContent
Exports the specified previously imported output content to files in the request output directory. The exported files will overwrite any existing files of the same names.Output content created using the API can not be exported.
- Parameters:
contentNames- aList<String>of names of previously imported output content.- Returns:
- result of the operation.
-
exportOutputContent
ImportExportResult exportOutputContent()Exports all previously imported output content to files in the request output directory. The exported files will overwrite any existing files of the same names.Output content created using the API can not be exported.
- Returns:
- result of the operation.
-
queryOutputContent
Gets the detailed information for all existing output content in the content store.This returns information on both output content that was imported and output content created using the API.
- Returns:
- a
List<ContentDetail>of content details. - Throws:
RuntimeServiceException- if runtime subsystem error.
-
queryOutputContent
Gets the detailed information for the output content in the content store, if it exists.This returns information on both output content that was imported and output content created using the API.
- Returns:
- Content detail for the content, or
nullif the content does not exist. - Throws:
RuntimeServiceException- if runtime subsystem error.
-
outputContentExists
Checks whether the specified output content exists in the content store for the request.This returns information on output content that was imported and output content created using the API.
- Parameters:
contentName- name of the output content to check.- Returns:
trueif the output content exists in the content store;falseotherwise.- Throws:
RuntimeServiceException- if runtime subsystem error.
-
deleteOutputContent
Deletes the output content from the content store for the request.This can delete output content that was imported and output content created using the API.
- Parameters:
contentNames- aList<String>of names of output content to delete.- Throws:
RuntimeServiceException- if runtime subsystem error.
-