Class MetadataPolicy.Builder

    • Field Detail

      • forcedValue

        private Object forcedValue
        The (forced) value for the claim.
      • add

        private Object add
        The value(s) to be added for the claim.
      • defaultValue

        private Object defaultValue
        The default value for the claim to be used in case none is specified.
      • oneOfValues

        private List<Object> oneOfValues
        The list of values from which the claim must be one of.
      • subsetOfValues

        private List<Object> subsetOfValues
        The list of value(s) from which the claim must be subset of.
      • supersetOfValues

        private List<Object> supersetOfValues
        The list of value(s) from which the claim must be superset of.
      • essential

        private Boolean essential
        The flag indicating that the claim must have a value.
      • regexp

        private String regexp
        The regular expression that the claim value must meet.
    • Constructor Detail

      • Builder

        public Builder()
        Constructor.
    • Method Detail

      • withValue

        public MetadataPolicy.Builder withValue​(Object value)
        Set the (forced) value for the claim.
        Parameters:
        value - What to set.
        Returns:
        The builder object with the new value set.
      • withAdd

        public MetadataPolicy.Builder withAdd​(Object value)
        Set the value(s) to be added for the claim.
        Parameters:
        value - What to set.
        Returns:
        The builder object with the new value set.
      • withDefaultValue

        public MetadataPolicy.Builder withDefaultValue​(Object value)
        Set the default value for the claim to be used in case none is specified.
        Parameters:
        value - What to set.
        Returns:
        The builder object with the new value set.
      • withOneOfValues

        public MetadataPolicy.Builder withOneOfValues​(List<Object> values)
        Set the list of values from which the claim must be one of.
        Parameters:
        values - What to set.
        Returns:
        The builder object with the new value set.
      • withSubsetOfValues

        public MetadataPolicy.Builder withSubsetOfValues​(List<Object> values)
        Set the list of value(s) from which the claim must be subset of.
        Parameters:
        values - What to set.
        Returns:
        The builder object with the new value set.
      • withSupersetOfValues

        public MetadataPolicy.Builder withSupersetOfValues​(List<Object> values)
        Set the list of value(s) from which the claim must be superset of.
        Parameters:
        values - What to set.
        Returns:
        The builder object with the new value set.
      • withEssential

        public MetadataPolicy.Builder withEssential​(Boolean isEssential)
        Set the flag indicating that the claim must have a value.
        Parameters:
        isEssential - What to set.
        Returns:
        The builder object with the new value set.
      • withRegexp

        public MetadataPolicy.Builder withRegexp​(String value)
        Set the regular expression that the claim value must meet.
        Parameters:
        value - What to set.
        Returns:
        The builder object with the new value set.
      • build

        public MetadataPolicy build()
        Build the metadata policy corresponding to the current builder state.
        Returns:
        The metadata policy corresponding to the current builder state.