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
8 package org.opendaylight.controller.config.api;
12 import javax.management.InstanceAlreadyExistsException;
13 import javax.management.InstanceNotFoundException;
14 import javax.management.ObjectName;
17 * Represents functionality provided by configuration transaction.
19 public interface ConfigTransactionController extends LookupRegistry, ServiceReferenceWritableRegistry {
22 * Create new configuration bean.
26 * @return ObjectName of newly created module
27 * @throws InstanceAlreadyExistsException
28 * if given ifcName and instanceName is already registered
30 ObjectName createModule(String moduleName, String instanceName)
31 throws InstanceAlreadyExistsException;
34 * Destroy existing module.
37 * can be either read-only module name that can be obtained using
38 * {@link ConfigRegistry#lookupConfigBean(String, String)} or
39 * writable module name that must contain current transaction
41 * @throws InstanceNotFoundException
42 * if module is not found
43 * @throws IllegalArgumentException
44 * if object name contains wrong transaction name or domain
46 void destroyModule(ObjectName objectName) throws InstanceNotFoundException;
49 * Destroy current transaction.
54 * This method can be called multiple times, has no side effects.
56 * @throws ValidationException
59 void validateConfig() throws ValidationException;
63 * @return transactionName
65 String getTransactionName();
68 * @return all known module factory names as reported by {@link org.opendaylight.controller.config.spi.ModuleFactory#getImplementationName()}
70 Set<String> getAvailableModuleNames();