Class RestConfConfigUtils
- java.lang.Object
-
- io.lighty.modules.northbound.restconf.community.impl.util.RestConfConfigUtils
-
public final class RestConfConfigUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringRESTCONF_CONFIG_ROOT_ELEMENT_NAMEstatic Set<org.opendaylight.yangtools.yang.binding.YangModuleInfo>YANG_MODELS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RestConfConfigurationgetDefaultRestConfConfiguration()Get default RestConf configuration, Lighty services are not populated in this configuration.static RestConfConfigurationgetDefaultRestConfConfiguration(LightyServices lightyServices)Get default RestConf configuration using provided Lighty services.static RestConfConfigurationgetRestConfConfiguration(RestConfConfiguration restConfConfiguration, LightyServices lightyServices)Copy existing RestConf configuration and use provided lightyServices to populate references to necessary Lighty services.static RestConfConfigurationgetRestConfConfiguration(InputStream jsonConfigInputStream)Load restconf configuration from InputStream containing JSON data.static RestConfConfigurationgetRestConfConfiguration(InputStream jsonConfigInputStream, LightyServices lightyServices)Load restconf configuration from InputStream containing JSON data and use lightyServices to get references to necessary Lighty services.
-
-
-
Field Detail
-
RESTCONF_CONFIG_ROOT_ELEMENT_NAME
public static final String RESTCONF_CONFIG_ROOT_ELEMENT_NAME
- See Also:
- Constant Field Values
-
YANG_MODELS
public static final Set<org.opendaylight.yangtools.yang.binding.YangModuleInfo> YANG_MODELS
-
-
Method Detail
-
getRestConfConfiguration
public static RestConfConfiguration getRestConfConfiguration(InputStream jsonConfigInputStream) throws ConfigurationException
Load restconf configuration from InputStream containing JSON data.- Parameters:
jsonConfigInputStream- InputStream containing RestConf configuration data in JSON format.- Returns:
- Object representation of configuration data.
- Throws:
ConfigurationException- In case InputStream does not contain valid JSON data or cannot bind Json tree to type.
-
getRestConfConfiguration
public static RestConfConfiguration getRestConfConfiguration(InputStream jsonConfigInputStream, LightyServices lightyServices) throws ConfigurationException
Load restconf configuration from InputStream containing JSON data and use lightyServices to get references to necessary Lighty services.- Parameters:
jsonConfigInputStream- InputStream containing RestConf configuration data in JSON format.lightyServices- This object instace contains references to initialized Lighty services required for RestConf.- Returns:
- Object representation of configuration data.
- Throws:
ConfigurationException- In case InputStream does not contain valid JSON data or cannot bind Json tree to type.
-
getDefaultRestConfConfiguration
public static RestConfConfiguration getDefaultRestConfConfiguration(LightyServices lightyServices)
Get default RestConf configuration using provided Lighty services.- Parameters:
lightyServices- This object instace contains references to initialized Lighty services required for RestConf.- Returns:
- Object representation of configuration data.
-
getDefaultRestConfConfiguration
public static RestConfConfiguration getDefaultRestConfConfiguration()
Get default RestConf configuration, Lighty services are not populated in this configuration.- Returns:
- Object representation of configuration data.
-
getRestConfConfiguration
public static RestConfConfiguration getRestConfConfiguration(RestConfConfiguration restConfConfiguration, LightyServices lightyServices)
Copy existing RestConf configuration and use provided lightyServices to populate references to necessary Lighty services.- Parameters:
restConfConfiguration- Object representation of configuration data.lightyServices- This object instace contains references to initialized Lighty services required for RestConf.- Returns:
- Object representation of configuration data.
-
-