1 /* 2 * Copyright (c) OSGi Alliance (2012, 2016). 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 17 package org.osgi.framework.namespace; 18 19 import org.osgi.framework.Constants; 20 import org.osgi.resource.Namespace; 21 22 /** 23 * Native Capability and Requirement Namespace. 24 * 25 * <p> 26 * This class defines the names for the attributes and directives for this 27 * namespace. All unspecified capability attributes are of type {@code String} 28 * and are used as arbitrary matching attributes for the capability. The values 29 * associated with the specified directive and attribute keys are of type 30 * {@code String}, unless otherwise indicated. 31 * 32 * @Immutable 33 * @since 1.1 34 * @author $Id: fc914204c1ce823696c0217acd24080d12377d1c $ 35 */ 36 public final class NativeNamespace extends Namespace { 37 38 /** 39 * Namespace name for native capabilities and requirements. 40 */ 41 public static final String NATIVE_NAMESPACE = "osgi.native"; 42 43 /** 44 * The capability attribute contains alias values of the 45 * {@link Constants#FRAMEWORK_OS_NAME org.osgi.framework.os.name} launching 46 * property value according to the 47 * <a href="https://www.osgi.org/developer/specifications/reference/">OSGi 48 * Specification References</a>. The value of this attribute must be of type 49 * {@code List<String>}. 50 */ 51 public final static String CAPABILITY_OSNAME_ATTRIBUTE = NATIVE_NAMESPACE + ".osname"; 52 53 /** 54 * The capability attribute contains a {@code Version} parsed from the 55 * {@link Constants#FRAMEWORK_OS_VERSION org.osgi.framework.os.version} 56 * launching property value. The value of this attribute must be of type 57 * {@code Version}. 58 */ 59 public final static String CAPABILITY_OSVERSION_ATTRIBUTE = NATIVE_NAMESPACE + ".osversion"; 60 61 /** 62 * The capability attribute contains alias values of the 63 * {@link Constants#FRAMEWORK_PROCESSOR org.osgi.framework.processor} 64 * launching property value according to the 65 * <a href="https://www.osgi.org/developer/specifications/reference/">OSGi 66 * Specification References</a>. The value of this attribute must be of type 67 * {@code List<String>}. 68 */ 69 public final static String CAPABILITY_PROCESSOR_ATTRIBUTE = NATIVE_NAMESPACE + ".processor"; 70 71 /** 72 * The capability attribute contains the 73 * {@link Constants#FRAMEWORK_LANGUAGE org.osgi.framework.language} 74 * launching property value. The value of this attribute must be of type 75 * {@code String}. 76 */ 77 public final static String CAPABILITY_LANGUAGE_ATTRIBUTE = NATIVE_NAMESPACE + ".language"; 78 NativeNamespace()79 private NativeNamespace() { 80 // empty 81 } 82 } 83