Package org.openmuc.jeebus.spine.utils
Class Filters
- java.lang.Object
-
- org.openmuc.jeebus.spine.utils.Filters
-
public class Filters extends java.lang.ObjectUtility class for working withFilterTypes.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.openmuc.jeebus.spine.xsd.v1.FilterTypegetDeleteFilter(org.openmuc.jeebus.spine.xsd.v1.CmdType cmd)Get the Delete Filter of a given command.static <ELEMENTS> ELEMENTSgetElementsObject(org.openmuc.jeebus.spine.xsd.v1.FilterType filter, java.lang.Class<ELEMENTS> elementsType)Finds the elements object of the given type for a givenFilterType.static org.openmuc.jeebus.spine.xsd.v1.FilterTypegetPartialWriteFilter(org.openmuc.jeebus.spine.xsd.v1.CmdType cmd)Get the Partial Write Filter of a given command.static <SELECTOR> java.util.List<SELECTOR>getSelectors(org.openmuc.jeebus.spine.xsd.v1.FilterType filter, java.lang.Class<SELECTOR> selectorType)Finds the selectors list of the given type for a given selector type.
-
-
-
Method Detail
-
getDeleteFilter
public static org.openmuc.jeebus.spine.xsd.v1.FilterType getDeleteFilter(org.openmuc.jeebus.spine.xsd.v1.CmdType cmd) throws SpineExceptionGet the Delete Filter of a given command. Throws Spine Exception if there is more than one Delete Filter.- Parameters:
cmd- given command- Returns:
- the Partial Filter
- Throws:
SpineException
-
getPartialWriteFilter
public static org.openmuc.jeebus.spine.xsd.v1.FilterType getPartialWriteFilter(org.openmuc.jeebus.spine.xsd.v1.CmdType cmd) throws SpineExceptionGet the Partial Write Filter of a given command. Throws Spine Exception if there is more than one Partial Filter.- Parameters:
cmd- given command- Returns:
- the Partial Filter
- Throws:
SpineException- if there is more than one filter
-
getSelectors
public static <SELECTOR> java.util.List<SELECTOR> getSelectors(org.openmuc.jeebus.spine.xsd.v1.FilterType filter, java.lang.Class<SELECTOR> selectorType)Finds the selectors list of the given type for a given selector type.- Type Parameters:
SELECTOR- the type of selector to look for- Parameters:
filter- filter to get the selectors fromselectorType- class object forFilters- Returns:
- the list of selectors of the given type
-
getElementsObject
public static <ELEMENTS> ELEMENTS getElementsObject(org.openmuc.jeebus.spine.xsd.v1.FilterType filter, java.lang.Class<ELEMENTS> elementsType)Finds the elements object of the given type for a givenFilterType. Can be null.- Type Parameters:
ELEMENTS- the type of elements to look for- Parameters:
filter- the filter to search inelementsType- class object forFilters- Returns:
- the elements object of the given type, can be null
-
-