- public static TestOption getDefault() {
- return testThenSet;
- }
-
- }
-
- @VisibleForTesting
- static class EditConfigExecution {
- private final XmlElement editConfigXml;
- private final Map<String, Multimap<String, ModuleElementResolved>> resolvedXmlElements;
- private final TestOption testOption;
- private final EditStrategyType defaultEditStrategyType;
-
- EditConfigExecution(XmlElement xml, Config configResolver, XmlElement configElement, TestOption testOption, Set<ObjectName> instancesForFillingServiceRefMapping,
- EditStrategyType defaultStrategy) {
- this.editConfigXml = xml;
- this.resolvedXmlElements = configResolver.fromXml(configElement, instancesForFillingServiceRefMapping, defaultStrategy);
- this.testOption = testOption;
- this.defaultEditStrategyType = defaultStrategy;
- }
-
- boolean shouldTest() {
- return testOption == TestOption.testOnly || testOption == TestOption.testThenSet;
- }
-
- boolean shouldSet() {
- return testOption == TestOption.set || testOption == TestOption.testThenSet;
- }
-
- Map<String, Multimap<String, ModuleElementResolved>> getResolvedXmlElements() {
- return resolvedXmlElements;
- }
-
- EditStrategyType getDefaultStrategy() {
- return defaultEditStrategyType;
- }