Documentation of 'org.freehep.util.template.PropertiesValueProvider' Java class
PropertiesValueProvider
org.freehep.util.template

Class PropertiesValueProvider

  • All Implemented Interfaces:
    ValueProvider


    public class PropertiesValueProvider
    extends java.lang.Object
    implements ValueProvider
    A value provider that returns values based on a properties object.

    Example of use:

     Hello {v:user.name}
     
    • Constructor Summary

      Constructors 
      Constructor and Description
      PropertiesValueProvider()
      Builds a PropertiesValueProvider which takes its values from the system properties.
      PropertiesValueProvider(java.util.Properties props)
      Builds a PropertiesValueProvider which takes its values from the specified Properties object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getValue(java.lang.String name)
      Get a single value
      java.util.List getValues(java.lang.String name)
      Get a list of value providers.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PropertiesValueProvider

        public PropertiesValueProvider()
        Builds a PropertiesValueProvider which takes its values from the system properties.
        See Also:
        System.getProperties()
      • PropertiesValueProvider

        public PropertiesValueProvider(java.util.Properties props)
        Builds a PropertiesValueProvider which takes its values from the specified Properties object.
        Parameters:
        props - The properties to use.
    • Method Detail

      • getValue

        public java.lang.String getValue(java.lang.String name)
        Description copied from interface: ValueProvider
        Get a single value
        Specified by:
        getValue in interface ValueProvider
        Parameters:
        name - The name whose value is to be returned
        Returns:
        The value, or null if undefined.
      • getValues

        public java.util.List getValues(java.lang.String name)
        Description copied from interface: ValueProvider
        Get a list of value providers. Each item in the returned list must itself be a ValueProvider.
        Specified by:
        getValues in interface ValueProvider
        Parameters:
        name - The template name of the list to be returned.
        Returns:
        The list of value providers, or null if no template is defined.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.