Class LogbookOperationsClientHelper
- java.lang.Object
-
- fr.gouv.vitam.logbook.common.parameters.LogbookOperationsClientHelper
-
public class LogbookOperationsClientHelper extends java.lang.Object
Helper implementation of LogbookOperationsClient
-
-
Constructor Summary
Constructors Constructor Description LogbookOperationsClientHelper()
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
checkLogbookParameters(LogbookOperationParameters parameters)
Check validity of the input and add default date and ServerIdentityvoid
clear()
Clear the underlying data structuresstatic LogbookOperationParameters
copy(LogbookOperationParameters source)
Create a copy in order to allow reuse on client sidevoid
createDelegate(LogbookOperationParameters parameters)
Create logbook entry using delegation
To be used ONLY once at top level of process startup (where eventIdentifierProcess is set for the first time).java.util.Queue<LogbookOperationParameters>
removeCreateDelegate(java.lang.String key)
java.util.Queue<LogbookOperationParameters>
removeUpdateDelegate(java.lang.String key)
void
updateDelegate(LogbookOperationParameters parameters)
Update logbook entry using delegation
To be used everywhere except very first time (when eventIdentifierProcess already used once)
-
-
-
Method Detail
-
checkLogbookParameters
public static final java.lang.String checkLogbookParameters(LogbookOperationParameters parameters)
Check validity of the input and add default date and ServerIdentity- Parameters:
parameters
- to check- Returns:
- the primary key
-
copy
public static final LogbookOperationParameters copy(LogbookOperationParameters source)
Create a copy in order to allow reuse on client side- Parameters:
source
- to copy and reuse- Returns:
- the copy of the source
-
createDelegate
public void createDelegate(LogbookOperationParameters parameters) throws LogbookClientAlreadyExistsException
Create logbook entry using delegation
To be used ONLY once at top level of process startup (where eventIdentifierProcess is set for the first time).- Parameters:
parameters
- the entry parameters (can be reused and modified after without impacting the one created)- Throws:
LogbookClientAlreadyExistsException
- if the element already existsjava.lang.IllegalArgumentException
- if some mandatories parameters are empty or null
-
updateDelegate
public void updateDelegate(LogbookOperationParameters parameters) throws LogbookClientNotFoundException
Update logbook entry using delegation
To be used everywhere except very first time (when eventIdentifierProcess already used once)- Parameters:
parameters
- the entry parameters (can be reused and modified after without impacting the one updated)- Throws:
LogbookClientNotFoundException
- if the element does not yet exists (createDeletage not called before)java.lang.IllegalArgumentException
- if some mandatories parameters are empty or null
-
removeCreateDelegate
public java.util.Queue<LogbookOperationParameters> removeCreateDelegate(java.lang.String key)
- Parameters:
key
- of element to remove- Returns:
- the associated finalize Delegate Queue for creation
-
removeUpdateDelegate
public java.util.Queue<LogbookOperationParameters> removeUpdateDelegate(java.lang.String key)
- Parameters:
key
- of element to remove- Returns:
- the associated finalize Delegate Queue for update
-
clear
public void clear()
Clear the underlying data structures
-
-