Class LogbookLifeCyclesClientFactory
- java.lang.Object
-
- fr.gouv.vitam.common.client.VitamClientFactory<LogbookLifeCyclesClient>
-
- fr.gouv.vitam.logbook.lifecycles.client.LogbookLifeCyclesClientFactory
-
- All Implemented Interfaces:
VitamClientFactoryInterface<LogbookLifeCyclesClient>
public class LogbookLifeCyclesClientFactory extends VitamClientFactory<LogbookLifeCyclesClient>
Logbook lifecycles client factory
Use to get a logbook lifecycles client in function of its type. Example of lifecycle creation:{ @code // Retrieve default lifecycles client LogbookLifeCycleClient client = LogbookClientFactory.getInstance().getLogbookLifeCyclesClient(); // Retrieve lifecycles parameters class (checkExample for update lifecycles:LogbookParameterHelperfor more informations) LogbookParameters parameters = LogbookParameterHelper.newLogbookLifeCyclesParameters(); // Use setters parameters.setParameterValue(LogbookParameterName.eventTypeProcess, LogbookParameterName.eventTypeProcess .name()).setParameterValue(LogbookParameterName.outcome, StatusCode.STARTED.name()); client.create(parameters); }{ @code // Retrieve default lifecycles client LogbookLifeCycleClient client = LogbookClientFactory.getInstance().getLogbookLifeCyclesClient(); // Retrieve lifecycles parameters class (checkLogbookParameterHelperfor more informations) LogbookParameters parameters = LogbookParameterHelper.newLogbookLifeCyclesParameters(); // Event GUID parameters.setParameterValue(LogbookParameterName.eventIdentifier, GUIDFactory.newLifeCyclesIdGUID(tenantId).toString()); // Event type parameters.setParameterValue(LogbookParameterName.eventType, "UNZIP"); parameters.setParameterValue(LogbookParameterName.outcome, StatusCode.STARTED.name()); client.update(parameters); }
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface fr.gouv.vitam.common.client.VitamClientFactoryInterface
VitamClientFactoryInterface.VitamClientType
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringRESOURCE_PATHRESOURCE PATH-
Fields inherited from class fr.gouv.vitam.common.client.VitamClientFactory
clientConfiguration
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidchangeMode(ClientConfiguration configuration)LogbookLifeCyclesClientgetClient()Get the default type logbook clientstatic LogbookLifeCyclesClientFactorygetInstance()Get the LogbookClientFactory instance-
Methods inherited from class fr.gouv.vitam.common.client.VitamClientFactory
changeResourcePath, changeServerPort, disableUseAuthorizationFilter, enableUseAuthorizationFilter, getClientConfiguration, getDefaultConfigCient, getDefaultConfigCient, getHttpClient, getHttpClient, getResourcePath, getServiceUrl, getVitamClientType, getVitamThreadPoolExecutor, initialisation, isAllowGzipDecoded, isAllowGzipEncoded, resetConnections, resume, setGzipdecoded, setGzipEncoded, setVitamClientType, shutdown, toString
-
-
-
-
Field Detail
-
RESOURCE_PATH
public static final java.lang.String RESOURCE_PATH
RESOURCE PATH- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static final LogbookLifeCyclesClientFactory getInstance()
Get the LogbookClientFactory instance- Returns:
- the instance
-
getClient
public LogbookLifeCyclesClient getClient()
Get the default type logbook client- Returns:
- the default logbook client
-
changeMode
public static final void changeMode(ClientConfiguration configuration)
- Parameters:
configuration- null for MOCK
-
-