Package: AssetConstants

AssetConstants

nameinstructionbranchcomplexitylinemethod
AssetConstants(String, int, String)
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
static {...}
M: 0 C: 143
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 19
100%
M: 0 C: 1
100%
value()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2016, 2018 Eurotech and/or its affiliates and others
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License v1.0
6: * which accompanies this distribution, and is available at
7: * http://www.eclipse.org/legal/epl-v10.html
8: *
9: *******************************************************************************/
10: package org.eclipse.kura.asset.provider;
11:
12: /**
13: * This class contains constants related to the {@link BaseAsset} configuration persistence.
14: */
15:
16: public enum AssetConstants {
17:
18: /** Separator for channel configuration property. */
19: CHANNEL_PROPERTY_SEPARATOR("#"),
20:
21: /** Prefix for non driver specific properties. */
22: CHANNEL_DEFAULT_PROPERTY_PREFIX("+"),
23:
24: /** Prohibited characters for channel name */
25: CHANNEL_NAME_PROHIBITED_CHARS(CHANNEL_PROPERTY_SEPARATOR.value() + "/+, "),
26:
27: /** Asset Description Property to be used in the configuration. */
28: ASSET_DESC_PROP("asset.desc"),
29:
30: /** Driver PID Property to be used in the configuration. */
31: ASSET_DRIVER_PROP("driver.pid"),
32:
33: /** Enabled Property to be used in the configuration. */
34: ENABLED(CHANNEL_DEFAULT_PROPERTY_PREFIX.value() + "enabled"),
35:
36: /** Name Property to be used in the configuration. */
37: NAME(CHANNEL_DEFAULT_PROPERTY_PREFIX.value() + "name"),
38:
39: /** Type Property to be used in the configuration. */
40: TYPE(CHANNEL_DEFAULT_PROPERTY_PREFIX.value() + "type"),
41:
42: /** Value type Property to be used in the configuration. */
43: VALUE_TYPE(CHANNEL_DEFAULT_PROPERTY_PREFIX.value() + "value.type");
44:
45: /** The value. */
46: private String value;
47:
48: /**
49: * Instantiates a new asset constants.
50: *
51: * @param value
52: * the value
53: */
54: private AssetConstants(final String value) {
55: this.value = value;
56: }
57:
58: /**
59: * Returns the string representation of the constant
60: *
61: * @return the string representation
62: */
63: public String value() {
64: return this.value;
65: }
66:
67: }