blob: dfa21db37ca5ba2be4524dc8cbfa5adae20a8043 [file] [log] [blame]
Carsten Ziegeler3314f912014-07-30 07:22:32 +00001/*
2 * Copyright (c) OSGi Alliance (2012, 2014). 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.resource.dto;
18
19import java.util.Map;
20import org.osgi.dto.DTO;
21import org.osgi.resource.Requirement;
22
23/**
24 * Data Transfer Object for a Requirement.
25 *
26 * @author $Id$
27 * @NotThreadSafe
28 */
29public class RequirementDTO extends DTO {
30 /**
31 * The unique identifier of the requirement.
32 *
33 * <p>
34 * This identifier is transiently assigned and may vary across restarts.
35 */
36 public int id;
37
38 /**
39 * The namespace for the requirement.
40 *
41 * @see Requirement#getNamespace()
42 */
43 public String namespace;
44
45 /**
46 * The directives for the requirement.
47 *
48 * @see Requirement#getDirectives()
49 */
50 public Map<String, String> directives;
51
52 /**
53 * The attributes for the requirement.
54 *
55 * <p>
56 * The value type must be a numerical type, Boolean, String, DTO or an array
57 * of any of the former.
58 *
59 * @see Requirement#getAttributes()
60 */
61 public Map<String, Object> attributes;
62
63 /**
64 * The identifier of the resource declaring the requirement.
65 *
66 * @see ResourceDTO#id
67 * @see Requirement#getResource()
68 */
69 public int resource;
70}