001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019 020package org.apache.isis.core.commons.config; 021 022import org.apache.isis.core.commons.components.Injectable; 023import org.apache.isis.core.commons.resource.ResourceStreamSource; 024import org.apache.isis.core.commons.resource.ResourceStreamSourceChainOfResponsibility; 025 026/** 027 * Holds a mutable set of properties representing the configuration. 028 * 029 * <p> 030 * Mutable/immutable pair with the {@link IsisConfiguration}. To obtain the 031 * configuration, use {@link #getConfiguration()}. 032 * 033 * @see IsisConfiguration for more details on the mutable/immutable pair 034 * pattern. 035 */ 036public interface IsisConfigurationBuilder extends Injectable { 037 038 /** 039 * Returns a currently known {@link IsisConfiguration}. 040 */ 041 IsisConfiguration getConfiguration(); 042 043 void addDefaultConfigurationResources(); 044 045 void addConfigurationResource(final String installerName, final NotFoundPolicy notFoundPolicy); 046 047 void add(final String key, final String value); 048 049 /** 050 * The underlying {@link ResourceStreamSource} from which the configuration 051 * is being read. 052 * 053 * <p> 054 * Note that this may be a {@link ResourceStreamSourceChainOfResponsibility composite}. 055 */ 056 ResourceStreamSource getResourceStreamSource(); 057 058 /** 059 * Log a summary of resources found or not found. 060 */ 061 void dumpResourcesToLog(); 062 063 void lockConfiguration(); 064}