Package org.somda.sdc.glue.common
Class MdibVersionUtil
java.lang.Object
org.somda.sdc.glue.common.MdibVersionUtil
Utility functions for the
MdibVersion container.-
Method Summary
Modifier and TypeMethodDescriptiongetMdibVersion(org.somda.sdc.biceps.model.message.AbstractGetResponse msg) Extracts the MDIB version from a get response.getMdibVersion(org.somda.sdc.biceps.model.message.AbstractReport msg) Extracts the MDIB version from a report.voidsetMdibVersion(MdibVersion mdibVersion, org.somda.sdc.biceps.model.message.AbstractReport target) Sets MdibVersion for any abstract report.<T> voidsetMdibVersion(MdibVersion mdibVersion, T target) Stores MdibVersion attributes in any MDIB version supporting objects.
-
Method Details
-
setMdibVersion
public <T> void setMdibVersion(MdibVersion mdibVersion, T target) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException Stores MdibVersion attributes in any MDIB version supporting objects.- Type Parameters:
T- any type that supports setSequenceId, setInstanceId and setMdibVersion (e.g.,Mdib.- Parameters:
mdibVersion- theMdibVersionto store.target- the target where to store sequence id, instance id and version from givenMdibVersion.- Throws:
NoSuchMethodException- in case one of the methods setSequenceId, setInstanceId and setMdibVersion does not exist.InvocationTargetException- in case one of the methods setSequenceId, setInstanceId and setMdibVersion cannot be applied on target.IllegalAccessException- in case one of the methods setSequenceId, setInstanceId and setMdibVersion cannot be applied on target.
-
setMdibVersion
public void setMdibVersion(MdibVersion mdibVersion, org.somda.sdc.biceps.model.message.AbstractReport target) Sets MdibVersion for any abstract report.- Parameters:
mdibVersion- version to storetarget- report
-
getMdibVersion
Extracts the MDIB version from a report.- Parameters:
msg- the report to extract data from.- Returns:
- the converted MDIB version. Default values are transformed according to BICEPS's prose information.
-
getMdibVersion
Extracts the MDIB version from a get response.- Parameters:
msg- the get response to extract data from.- Returns:
- the converted MDIB version. Default values are transformed according to BICEPS's prose information.
-