Class AgentJsonConverter
java.lang.Object
com.flowable.agent.engine.impl.deployer.AgentJsonConverter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<String, Class<? extends AgentDefinitionModel.AgentModelSettings>> protected Supplier<tools.jackson.databind.ObjectMapper> -
Constructor Summary
ConstructorsConstructorDescriptionAgentJsonConverter(Supplier<tools.jackson.databind.ObjectMapper> objectMapperSupplier) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidaddModelSettingsClass(String vendorName, Class<? extends AgentDefinitionModel.AgentModelSettings> modelSettingsClass) convertAgentResourceToModel(byte[] agentResourceBytes) convertAgentResourceToModel(InputStream agentResourceStream) convertToModel(tools.jackson.databind.JsonNode modelNode) convertToModelSettings(String aiVendor, tools.jackson.databind.JsonNode modelSettingsNode) protected Class<? extends AgentDefinitionModel.AgentModelSettings> determineModelSettingsClass(String vendorName) protected voidmigrateLegacyApiKeyToAuthentication(AgentDefinitionModel.AgentModelSettings modelSettings, String aiVendor) If the model has only the legacyapiKeyfield (noauthentication), synthesise anAgentAuthenticationthat produces the historical per-vendor header.protected AgentDefinitionModelprocessModel(AgentDefinitionModel model)
-
Field Details
-
objectMapperSupplier
-
modelSettingsClasses
protected final Map<String, Class<? extends AgentDefinitionModel.AgentModelSettings>> modelSettingsClasses
-
-
Constructor Details
-
AgentJsonConverter
-
-
Method Details
-
addDefaultModelSettingsClasses
protected void addDefaultModelSettingsClasses() -
convertAgentResourceToModel
-
convertAgentResourceToModel
-
convertToModel
-
convertToModelSettings
public AgentDefinitionModel.AgentModelSettings convertToModelSettings(String aiVendor, tools.jackson.databind.JsonNode modelSettingsNode) -
processModel
-
determineModelSettingsClass
protected Class<? extends AgentDefinitionModel.AgentModelSettings> determineModelSettingsClass(String vendorName) -
addModelSettingsClass
public void addModelSettingsClass(String vendorName, Class<? extends AgentDefinitionModel.AgentModelSettings> modelSettingsClass) -
migrateLegacyApiKeyToAuthentication
protected void migrateLegacyApiKeyToAuthentication(AgentDefinitionModel.AgentModelSettings modelSettings, String aiVendor) If the model has only the legacyapiKeyfield (noauthentication), synthesise anAgentAuthenticationthat produces the historical per-vendor header. After this step, runtime resolution always readsauthentication.
-