001/*
002 * **** BEGIN LICENSE BLOCK *****
003 *  Version: MPL 1.1/GPL 2.0/LGPL 2.1
004 *
005 *  The contents of this file are subject to the Mozilla Public License Version
006 *  1.1 (the "License"); you may not use this file except in compliance with
007 *  the License. You may obtain a copy of the License at
008 *  http://www.mozilla.org/MPL/
009 *
010 *  Software distributed under the License is distributed on an "AS IS" basis,
011 *  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
012 *  for the specific language governing rights and limitations under the
013 *  License.
014 *
015 *  The Original Code is part of dcm4che, an implementation of DICOM(TM) in
016 *  Java(TM), hosted at https://github.com/gunterze/dcm4che.
017 *
018 *  The Initial Developer of the Original Code is
019 *  Agfa Healthcare.
020 *  Portions created by the Initial Developer are Copyright (C) 2014
021 *  the Initial Developer. All Rights Reserved.
022 *
023 *  Contributor(s):
024 *  See @authors listed below
025 *
026 *  Alternatively, the contents of this file may be used under the terms of
027 *  either the GNU General Public License Version 2 or later (the "GPL"), or
028 *  the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
029 *  in which case the provisions of the GPL or the LGPL are applicable instead
030 *  of those above. If you wish to allow use of your version of this file only
031 *  under the terms of either the GPL or the LGPL, and not to allow others to
032 *  use your version of this file under the terms of the MPL, indicate your
033 *  decision by deleting the provisions above and replace them with the notice
034 *  and other provisions required by the GPL or the LGPL. If you do not delete
035 *  the provisions above, a recipient may use your version of this file under
036 *  the terms of any one of the MPL, the GPL or the LGPL.
037 *
038 *  ***** END LICENSE BLOCK *****
039 */
040package org.dcm4che3.conf.core;
041
042import org.dcm4che3.conf.core.api.Configuration;
043import org.dcm4che3.conf.core.api.ConfigurationException;
044import org.dcm4che3.conf.core.api.Path;
045
046import java.util.Iterator;
047import java.util.Map;
048
049/**
050 * @author Roman K
051 */
052public class DelegatingConfiguration implements Configuration {
053
054    protected Configuration delegate;
055
056    public DelegatingConfiguration() {
057    }
058
059    public DelegatingConfiguration(Configuration delegate) {
060        this.delegate = delegate;
061    }
062
063    @Override
064    public Map<String, Object> getConfigurationRoot() throws ConfigurationException {
065        return delegate.getConfigurationRoot();
066    }
067
068    @Override
069    public Object getConfigurationNode(Path path, Class configurableClass) throws ConfigurationException {
070        return delegate.getConfigurationNode(path, configurableClass);
071    }
072
073    @Override
074    public boolean nodeExists(Path path) throws ConfigurationException {
075        return delegate.nodeExists(path);
076    }
077
078    @Override
079    public void persistNode(Path path, Map<String, Object> configNode, Class configurableClass) throws ConfigurationException {
080        delegate.persistNode(path, configNode, configurableClass);
081    }
082
083    @Override
084    public void refreshNode(Path path) throws ConfigurationException {
085        delegate.refreshNode(path);
086    }
087
088    @Override
089    public void removeNode(Path path) throws ConfigurationException {
090        delegate.removeNode(path);
091    }
092
093    @Override
094    public Path getPathByUUID(String uuid) {
095        return delegate.getPathByUUID(uuid);
096    }
097
098    @Override
099    public Iterator search(String liteXPathExpression) throws IllegalArgumentException, ConfigurationException {
100        return delegate.search(liteXPathExpression);
101    }
102
103    @Override
104    public void lock() {
105        delegate.lock();
106    }
107
108    @Override
109    public void runBatch(Batch batch) {
110        delegate.runBatch(batch);
111    }
112
113}