blob: 333d73c609620e0474ec143b6a9b9cba7ce271e7 [file] [log] [blame]
Stuart McCulloch26e7a5a2011-10-17 10:31:43 +00001/*
2 * Copyright (c) OSGi Alliance (2011). All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.osgi.service.component.annotations;
18
19/**
20 * Configuration Policy for the {@link Component} annotation.
21 *
22 * <p>
23 * Controls whether component configurations must be satisfied depending on the
24 * presence of a corresponding Configuration object in the OSGi Configuration
25 * Admin service. A corresponding configuration is a Configuration object where
26 * the PID is the name of the component.
27 *
28 * @version $Id$
29 */
30public enum ConfigurationPolicy {
31 /**
32 * Use the corresponding Configuration object if present but allow the
33 * component to be satisfied even if the corresponding Configuration object
34 * is not present.
35 */
36 OPTIONAL,
37 /**
38 * There must be a corresponding Configuration object for the component
39 * configuration to become satisfied.
40 */
41 REQUIRE,
42 /**
43 * Always allow the component configuration to be satisfied and do not use
44 * the corresponding Configuration object even if it is present.
45 */
46 IGNORE;
47}