Skip to content

Package: ServiceComponentConfiguration

ServiceComponentConfiguration

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2019, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.service.config;
14:
15: import javax.xml.bind.annotation.XmlAccessType;
16: import javax.xml.bind.annotation.XmlAccessorType;
17: import javax.xml.bind.annotation.XmlAttribute;
18: import javax.xml.bind.annotation.XmlElement;
19: import javax.xml.bind.annotation.XmlRootElement;
20: import javax.xml.bind.annotation.XmlType;
21: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
22: import java.util.Map;
23:
24: import org.eclipse.kapua.model.config.metatype.KapuaTocd;
25:
26: /**
27: * Service component configuration entity definition.
28: *
29: * @since 1.0
30: */
31: @XmlRootElement(name = "configuration")
32: @XmlAccessorType(XmlAccessType.PROPERTY)
33: @XmlType(propOrder = {
34: "id",
35: "name",
36: "definition",
37: "properties"
38: }, factoryClass = ServiceConfigurationXmlRegistry.class, factoryMethod = "newComponentConfiguration")
39: public interface ServiceComponentConfiguration {
40:
41: /**
42: * Get service configuration component identifier
43: *
44: * @return
45: */
46: @XmlElement(name = "id")
47: String getId();
48:
49: /**
50: * Set service configuration component identifier
51: *
52: * @param id
53: */
54: void setId(String id);
55:
56: /**
57: * Get service configuration component name
58: *
59: * @return
60: */
61: @XmlAttribute(name = "name")
62: String getName();
63:
64: /**
65: * Set service configuration component name
66: *
67: * @param unescapedComponentName
68: */
69: void setName(String unescapedComponentName);
70:
71: /**
72: * Get service configuration component definition
73: *
74: * @return
75: */
76: @XmlElement(name = "definition")
77: KapuaTocd getDefinition();
78:
79: /**
80: * Set service configuration component definition
81: *
82: * @param definition
83: */
84: void setDefinition(KapuaTocd definition);
85:
86: /**
87: * Get service configuration component properties
88: *
89: * @return
90: */
91: @XmlElement(name = "properties")
92: @XmlJavaTypeAdapter(ServiceXmlConfigPropertiesAdapter.class)
93: Map<String, Object> getProperties();
94:
95: /**
96: * Set service configuration component properties
97: *
98: * @param properties
99: */
100: void setProperties(Map<String, Object> properties);
101: }