Interface PersistenceHandlerIfc
- All Known Implementing Classes:
FileBasedPersistenceHandler
public interface PersistenceHandlerIfc
The PersistenceHandlerIfc interface defines methods for handling persistence operations related to imports.
Implementations of this interface provide functionality for accessing and storing import-related data.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
-
Method Summary
Modifier and TypeMethodDescriptionboolean
createTask
(String importId, ImportTaskItem item) Creates an import task for the specified import ID with the given task item.boolean
deleteImport
(String importId) Deletes the import data associated with the specified import ID.Retrieves the configuration file content for the specified import ID.byte[]
Retrieves the customization file content for the specified import ID.Retrieves the import metadata for the specified import ID.getImportTask
(String importId, String importTaskId) Retrieves the import task for the specified import ID and task ID.void
saveConfiguration
(String importId, String fileContent) Saves the configuration file content for the specified import ID.void
saveCustomization
(String id, byte[] fileContent) Saves the customization file content for the specified import ID.void
saveImportMetadata
(String id, ImportMetadata importMetadata) Saves the import metadata for the specified import ID.void
updateTask
(String importId, String importTaskId, PersistenceHandlerIfc.ImportTaskUpdateCallback callback) Updates the import task for the specified import ID and task ID using the provided callback.
-
Method Details
-
getCustomization
Retrieves the customization file content for the specified import ID.- Parameters:
id
- The unique identifier for the import.- Returns:
- The byte array representing the customization file content.
- Throws:
ImportDetailNotFoundException
- If the import detail is not found.
-
getConfiguration
Retrieves the configuration file content for the specified import ID.- Parameters:
id
- The unique identifier for the import.- Returns:
- The string representing the configuration file content.
- Throws:
ImportDetailNotFoundException
- If the import detail is not found.
-
getImportMetadata
Retrieves the import metadata for the specified import ID.- Parameters:
id
- The unique identifier for the import.- Returns:
- The ImportMetadata object representing the import metadata.
- Throws:
ImportDetailNotFoundException
- If the import detail is not found.
-
saveConfiguration
Saves the configuration file content for the specified import ID.- Parameters:
importId
- The unique identifier for the import.fileContent
- The content of the configuration file to be saved.- Throws:
IOException
- If an I/O error occurs while saving the configuration.
-
saveCustomization
Saves the customization file content for the specified import ID.- Parameters:
id
- The unique identifier for the import.fileContent
- The content of the customization file to be saved.- Throws:
IOException
- If an I/O error occurs while saving the customization.
-
saveImportMetadata
Saves the import metadata for the specified import ID.- Parameters:
id
- The unique identifier for the import.importMetadata
- The ImportMetadata object representing the import metadata to be saved.- Throws:
IOException
- If an I/O error occurs while saving the import metadata.
-
createTask
Creates an import task for the specified import ID with the given task item.- Parameters:
importId
- The unique identifier for the import.item
- The ImportTaskItem representing the import task to be created.- Returns:
- True if the task is successfully created, false otherwise.
- Throws:
IOException
- If an I/O error occurs while creating the import task.
-
updateTask
void updateTask(String importId, String importTaskId, PersistenceHandlerIfc.ImportTaskUpdateCallback callback) throws IOException Updates the import task for the specified import ID and task ID using the provided callback.- Parameters:
importId
- The unique identifier for the import.importTaskId
- The unique identifier for the import task.callback
- The callback function to update the import task item.- Throws:
IOException
- If an I/O error occurs while updating the import task.
-
getImportTask
Retrieves the import task for the specified import ID and task ID.- Parameters:
importId
- The unique identifier for the import.importTaskId
- The unique identifier for the import task.- Returns:
- An optional ImportTaskItem if found, otherwise empty.
- Throws:
IOException
- If an I/O error occurs while retrieving the import task.
-
deleteImport
Deletes the import data associated with the specified import ID.- Parameters:
importId
- The unique identifier for the import.- Returns:
- True if the import data is successfully deleted, false otherwise.
- Throws:
IOException
- If an I/O error occurs while deleting the import data.
-