Class TagProperty

  • All Implemented Interfaces:
    INFProperty<java.util.Collection<java.lang.String>,​java.lang.Void>

    public class TagProperty
    extends AbstractNFProperty<java.util.Collection<java.lang.String>,​java.lang.Void>
    Tagging a service with a string for searching specifically tagged services. Allows tagging with single tags and tag collections. a) allows for tagging via creation parameters b) allows for tagging by referencing an argument (which is read to get the tags)
    • Field Detail

      • NAME

        public static final java.lang.String NAME
        The name of the property.
        See Also:
        Constant Field Values
      • ARGUMENT

        public static final java.lang.String ARGUMENT
        The argument constant.
        See Also:
        Constant Field Values
      • SERVICE_PROPERTY_NAME

        public static final java.lang.String SERVICE_PROPERTY_NAME
        The key used to store the tags in the service property map.
        See Also:
        Constant Field Values
      • params

        protected java.util.Map<java.lang.String,​java.lang.Object> params
        The parameters.
    • Constructor Detail

      • TagProperty

        public TagProperty​(IInternalAccess comp,
                           IService service,
                           MethodInfo method,
                           java.util.Map<java.lang.String,​java.lang.Object> params)
        Creates the property.
    • Method Detail

      • getValue

        public IFuture<java.util.Collection<java.lang.String>> getValue​(java.lang.Void unit)
        Returns the current value of the property, performs unit conversion if necessary.
        Parameters:
        unit - Unit of the returned value.
        Returns:
        The current value of the property.
      • convertToCollection

        protected static java.util.Collection<java.lang.String> convertToCollection​(java.lang.Object obj)
        Convert user defined tag(s) to collection.
      • createRuntimeTags

        public static java.util.Collection<java.lang.String> createRuntimeTags​(java.lang.Object vals,
                                                                               IExternalAccess component)
        Create a collection of tags and replace the variable values.
      • checkReservedTags

        public static void checkReservedTags​(java.lang.String[] tags)
        Check if it is a reserved tag.
        Parameters:
        tag - The tag.
      • checkReservedTag

        public static void checkReservedTag​(java.lang.String tag)
        Check if it is a reserved tag.
        Parameters:
        tag - The tag.