2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig;
11 import java.util.EnumSet;
14 //FIXME: make thread safe
15 public enum EditStrategyType {
18 // additional per element
21 private static final Set<EditStrategyType> defaultStrats = EnumSet.of(merge, replace, none);
23 public static EditStrategyType getDefaultStrategy() {
27 public boolean isEnforcing() {
38 throw new IllegalStateException("Default edit strategy can be only of value " + defaultStrats + " but was "
43 public EditConfigStrategy getFittingStrategy() {
46 return new MergeEditConfigStrategy();
48 return new ReplaceEditConfigStrategy();
50 return new DeleteEditConfigStrategy();
52 return new RemoveEditConfigStrategy();
54 return new NoneEditConfigStrategy();
56 throw new UnsupportedOperationException("Unimplemented edit config strategy" + this);