You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by oh...@apache.org on 2012/10/03 21:15:52 UTC
svn commit: r1393691 -
/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderParameters.java
Author: oheger
Date: Wed Oct 3 19:15:51 2012
New Revision: 1393691
URL: http://svn.apache.org/viewvc?rev=1393691&view=rev
Log:
Added BuilderParameters interface.
Added:
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderParameters.java (with props)
Added: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderParameters.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderParameters.java?rev=1393691&view=auto
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderParameters.java (added)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderParameters.java Wed Oct 3 19:15:51 2012
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.configuration.builder;
+
+import java.util.Map;
+
+/**
+ * <p>
+ * An interface to be implemented by objects which can be used to parameterize a
+ * {@link ConfigurationBuilder}.
+ * </p>
+ * <p>
+ * This interface is part of a Java DSL for creating and initializing builders
+ * for specific {@code Configuration} classes. Concrete implementations
+ * typically collect a set of related properties for the builder. There will be
+ * specific set methods for providing values for these properties. Then, this
+ * interface requires a generic {@code getParameters()} method which has to
+ * return all property values as a map. When constructing the builder the map is
+ * evaluated to define properties of the {@code Configuration} objects to be
+ * constructed.
+ * </p>
+ *
+ * @version $Id$
+ * @since 2.0
+ */
+public interface BuilderParameters
+{
+ /**
+ * Returns a map with all parameters defined by this objects. The keys of
+ * the map correspond to concrete properties supported by the
+ * {@code Configuration} implementation class the builder produces. The
+ * values are the corresponding property values. The return value must not
+ * be <b>null</b>.
+ *
+ * @return a map with builder parameters
+ */
+ Map<String, Object> getParameters();
+}
Propchange: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderParameters.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderParameters.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/BuilderParameters.java
------------------------------------------------------------------------------
svn:mime-type = text/plain