public class LogbookLifeCyclesClientHelper extends Object
Constructor and Description |
---|
LogbookLifeCyclesClientHelper()
Constructor
|
Modifier and Type | Method and Description |
---|---|
static String |
checkLogbookParameters(LogbookLifeCycleParameters parameters)
Check validity of the input and add default date and ServerIdentity
|
void |
clear()
Clear the underlying data structures
|
boolean |
containsCreate(String key) |
boolean |
containsUpdate(String key) |
static LogbookLifeCycleParameters |
copy(LogbookLifeCycleParameters source)
Create a copy in order to allow reuse on client side
|
void |
createDelegate(LogbookLifeCycleParameters parameters)
Create logbook entry using delegation
To be used ONLY once at top level of process startup (where objectIdentifier is set for the first time). |
Set<Map.Entry<String,Queue<LogbookLifeCycleParameters>>> |
getAllCreations() |
Set<Map.Entry<String,Queue<LogbookLifeCycleParameters>>> |
getAllUpdates() |
Queue<LogbookLifeCycleParameters> |
removeCreateDelegate(String key) |
Queue<LogbookLifeCycleParameters> |
removeUpdateDelegate(String key) |
void |
updateDelegate(LogbookLifeCycleParameters parameters)
Update logbook entry using delegation
To be used everywhere except very first time if creation (when objectIdentifier already used once) |
public static final String checkLogbookParameters(LogbookLifeCycleParameters parameters)
parameters
- to checkpublic static final LogbookLifeCycleParameters copy(LogbookLifeCycleParameters source)
source
- to copy and reusepublic void createDelegate(LogbookLifeCycleParameters parameters) throws LogbookClientAlreadyExistsException
parameters
- the entry parameters (can be reused and modified after without impacting the one created)LogbookClientAlreadyExistsException
- if the element already existsIllegalArgumentException
- if some mandatories parameters are empty or nullpublic void updateDelegate(LogbookLifeCycleParameters parameters) throws LogbookClientNotFoundException
parameters
- the entry parameters (can be reused and modified after without impacting the one updated)LogbookClientNotFoundException
- if the element does not yet exists (createDeletage not called before)IllegalArgumentException
- if some mandatories parameters are empty or nullpublic Queue<LogbookLifeCycleParameters> removeCreateDelegate(String key)
key
- of element to removepublic Queue<LogbookLifeCycleParameters> removeUpdateDelegate(String key)
key
- of element to removepublic boolean containsUpdate(String key)
key
- of element to removepublic boolean containsCreate(String key)
public Set<Map.Entry<String,Queue<LogbookLifeCycleParameters>>> getAllCreations()
public Set<Map.Entry<String,Queue<LogbookLifeCycleParameters>>> getAllUpdates()
public void clear()
Copyright © 2018 Vitam. All rights reserved.