Class FeatureBuilder


  • public class FeatureBuilder
    extends java.lang.Object
    • Constructor Detail

      • FeatureBuilder

        public FeatureBuilder()
    • Method Detail

      • setType

        public FeatureBuilder setType​(org.eebus.docs.spine.xsd.v1.FeatureTypeEnumType featureType)
        This method must be called before calling apply() or build()!
        Parameters:
        featureType - the type of the SPINE feature
        Returns:
        the updated FeatureBuilder
      • setRole

        public FeatureBuilder setRole​(org.eebus.docs.spine.xsd.v1.RoleType role)
        This method must be called before calling apply() or build()!
        Parameters:
        role - SERVER if this feature offers SPINE functions, CLIENT if this feature uses other features' functions, SPECIAL if both
        Returns:
        the updated FeatureBuilder
      • addFunction

        public FeatureBuilder addFunction​(FeatureFunction function)
        Parameters:
        function - the SPINE function to add
        Returns:
        the updated FeatureBuilder
      • setDescription

        public FeatureBuilder setDescription​(java.lang.String description)
        Parameters:
        description - a string describing the new SPINE feature
        Returns:
        the updated FeatureBuilder
      • setLabel

        public FeatureBuilder setLabel​(java.lang.String label)
        Parameters:
        label - a human-readable alias of the new SPINE feature
        Returns:
        the updated FeatureBuilder
      • setFeatureGroup

        public FeatureBuilder setFeatureGroup​(java.lang.String group)
        Parameters:
        group - the group this feature belongs to
        Returns:
        the updated FeatureBuilder
        Throws:
        java.lang.IllegalArgumentException - if group does not match pattern (#[1-9][0-9]*)*
      • setMinimumTrustLevel

        public FeatureBuilder setMinimumTrustLevel​(java.lang.String minimumTrustLevel)
        Parameters:
        minimumTrustLevel - the minimum trust level needed to access the feature
        Returns:
        the updated FeatureBuilder
      • setFeaturePermission

        public FeatureBuilder setFeaturePermission​(FeaturePermission featurePermission)
        Sets the permissions required to access, bind to and subscribe to the new SPINE feature.
        Parameters:
        featurePermission - the rules for binding and subscription requests
        Returns:
        the updated FeatureBuilder