
Public Types | |
| enum | OptionType { ENV_VAR, EXEC_ARG, EXEC_ARG_LANG, CONT_ARG } |
Public Member Functions | |
| ContainerStartupOptionHelper (Logger logger) | |
| Collection < ContainerStartupOption > | convertFlagsString (Container container, String flags) |
| String | convertContainerStartupOptions (Collection< ContainerStartupOption > options) |
Static Public Attributes | |
| static final String | CONT_ARG_WRAPPER_OPTION = "--passthrough" |
| static final String | EXEC_ARG_LANG_WRAPPER_OPTION = "--passthroughProcessStart" |
| static final String | OPTION_NAME_LEGACY_CONCATENATED = "LegacyOptionsConcat" |
Private Attributes | |
| final Logger | logger |
Encapsulates the translation of Container parameters between
In the future this class may also be used to provide lists of available options to the TMCDB Explorer.
Perhaps move this class to module acsstartup if we refactor this class's API to not use TMCDB pojos.
| alma::acs::tmcdb::logic::ContainerStartupOptionHelper::ContainerStartupOptionHelper | ( | Logger | logger | ) | [inline] |
Ctor that takes a logger.
| String alma::acs::tmcdb::logic::ContainerStartupOptionHelper::convertContainerStartupOptions | ( | Collection< ContainerStartupOption > | options | ) | [inline] |
Converts a list of ContainerStartupOption to a flat option string that can be passed to the container daemon or used to satisfy DAL calls.
| options |
| IllegalArgumentException | if an option references a different container than the other options (all refs null is OK though) |
References CONT_ARG_WRAPPER_OPTION, EXEC_ARG_LANG_WRAPPER_OPTION, and logger.
Referenced by alma::TMCDB::maci::DeployInfo::getFlags(), and alma::acs::tmcdb::logic::ContainerStartupOptionHelperTest::testToOptionsString().
| Collection<ContainerStartupOption> alma::acs::tmcdb::logic::ContainerStartupOptionHelper::convertFlagsString | ( | Container | container, | |
| String | flags | |||
| ) | [inline] |
Converts a string of options to one or more ContainerStartupOption objects.
TODO: Parse out at least the wrapper options and create separate ContainerStartupOption instances for them. Or even parse other options into separate ContainerStartupOptions.
| container | The container whose flags we convert (will be set on the created ContainerStartupOption. | |
| flags | The flags string, as it comes from the CDB (Container.DeployInfo.Flags) or from the WDAL interface. May be null. |
References OPTION_NAME_LEGACY_CONCATENATED.
Referenced by com::cosylab::cdb::jdal::HibernateWDALImpl::loadXMLCDB(), and alma::acs::tmcdb::logic::ContainerStartupOptionHelperTest::testFromOptionsString().
final String alma::acs::tmcdb::logic::ContainerStartupOptionHelper::CONT_ARG_WRAPPER_OPTION = "--passthrough" [static] |
Referenced by convertContainerStartupOptions().
final String alma::acs::tmcdb::logic::ContainerStartupOptionHelper::EXEC_ARG_LANG_WRAPPER_OPTION = "--passthroughProcessStart" [static] |
Referenced by convertContainerStartupOptions().
final Logger alma::acs::tmcdb::logic::ContainerStartupOptionHelper::logger [private] |
Referenced by convertContainerStartupOptions().
final String alma::acs::tmcdb::logic::ContainerStartupOptionHelper::OPTION_NAME_LEGACY_CONCATENATED = "LegacyOptionsConcat" [static] |
Referenced by convertFlagsString().
1.6.2