Class DefaultProfile

java.lang.Object
com.inet.pdfc.config.DefaultProfile
All Implemented Interfaces:
IProfile, Serializable
Direct Known Subclasses:
SourceProfile

@JsonData public class DefaultProfile extends Object implements IProfile
The class contains the default i-net PDFC profile.
Since:
4.0
See Also:
  • Constructor Details

    • DefaultProfile

      public DefaultProfile()
      Default constructor with empty properties
      Since:
      4.0
    • DefaultProfile

      public DefaultProfile(IProfile sourceProfile)
      Creates a new profile as copy of another profile
      Parameters:
      sourceProfile - the config to copy from, must not be null
      Since:
      4.0
  • Method Details

    • addProfileChangeListener

      public void addProfileChangeListener(DefaultProfile.ProfileChangeListener l)
      Adds a listener to be notified if a profile value changed
      Parameters:
      l - the listener to be added
      Since:
      3.0
    • removeProfileChangeListener

      public void removeProfileChangeListener(DefaultProfile.ProfileChangeListener l)
      Removes a listener to be no more notified
      Parameters:
      l - the listener to be removed
      Since:
      3.0
    • getBool

      public boolean getBool(String propertyName)
      Returns the value of the specified PDFCProperty as a boolean. If it was not specified in the configuration file, the default value will be returned.
      Specified by:
      getBool in interface IProfile
      Parameters:
      propertyName - the name of the property to get the value for
      Returns:
      the value as a boolean
      Since:
      1.08
    • getInt

      public int getInt(String propertyName)
      Returns the value of the specified PDFCProperty as an int. If it was not specified in the configuration file, the default value will be returned.
      Specified by:
      getInt in interface IProfile
      Parameters:
      propertyName - the name of the property to get the value for
      Returns:
      the value as an integer
      Since:
      1.08
    • getDouble

      public double getDouble(String propertyName)
      Returns the value of the specified PDFCProperty as a double. If it was not specified in the configuration file, the default value will be returned.
      Specified by:
      getDouble in interface IProfile
      Parameters:
      propertyName - the name of the property to get the value for
      Returns:
      the value as a double
      Since:
      1.08
    • getObject

      public Object getObject(String propertyName)
      Returns the value of the specified PDFCProperty as an Object. If it was not specified in the configuration file, the default value will be returned.
      Specified by:
      getObject in interface IProfile
      Parameters:
      propertyName - the name of the property to get the value for
      Returns:
      the value as a Object
      My be null if there is no value for the key and the key does not provide a default value.
      Since:
      1.08
    • getString

      public String getString(String propertyName)
      Returns the value of the specified PDFCProperty as a String. If it was not specified in the configuration file, the default value will be returned.
      Specified by:
      getString in interface IProfile
      Parameters:
      propertyName - the name of the property to get the value for
      Returns:
      the value as a String
      never null, but may be empty
      Since:
      1.08
    • putValue

      public void putValue(PDFCProperty<?> property, String value)
      Stores a property in the current configuration. This value will NOT be saved in the file system but rather is used for the currently running VM instance.
      Specified by:
      putValue in interface IProfile
      Parameters:
      property - the property to be stored
      value - the value of the property
    • putValue

      public void putValue(String propertyName, String value)
      Stores a property in the current configuration. This value will NOT be saved in the file system but rather is used for the currently running VM instance.
      Specified by:
      putValue in interface IProfile
      Parameters:
      propertyName - the name of the property to get the value for
      value - the value of the property, must not be null
    • putValues

      public void putValues(Properties values)
      Stores all properties in the current configuration. This value will NOT be saved in the file system but rather is used for the currently running VM instance. Change events will only be fired for values that have changed.
      Specified by:
      putValues in interface IProfile
      Parameters:
      values - the instance of values
    • getProperties

      public Properties getProperties()
      Returns set of properties defined in this configuration
      Returns:
      the profile properties
      Since:
      1.0
    • getObject

      public Object getObject(PDFCProperty<?> property)
      Returns the value of the specified PDFCProperty as an Object. If it was not specified in the configuration file, the default value will be returned.
      Specified by:
      getObject in interface IProfile
      Parameters:
      property - the property to get the value for
      Returns:
      the value as an Object
      My be null if there is no value for the key and the key does not provide a default value.
      Since:
      1.0
    • getString

      public String getString(PDFCProperty<?> property)
      Returns the value of the specified PDFCProperty as a String. If it was not specified in the configuration file, the default value will be returned.
      Specified by:
      getString in interface IProfile
      Parameters:
      property - the property to get the value for
      Returns:
      the value as a String
      never null, but may be empty
      Since:
      1.0
    • getInt

      public int getInt(PDFCProperty<?> property)
      Returns the value of the specified PDFCProperty as an int. If it was not specified in the configuration file, the default value will be returned.
      Specified by:
      getInt in interface IProfile
      Parameters:
      property - the property to get the value for
      Returns:
      the value as integer
      Since:
      1.0
    • getDouble

      public double getDouble(PDFCProperty<?> property)
      Returns the value of the specified PDFCProperty as a double. If it was not specified in the configuration file, the default value will be returned.
      Specified by:
      getDouble in interface IProfile
      Parameters:
      property - the property to get the value for
      Returns:
      the value as a double
      Since:
      1.0
    • getBool

      public boolean getBool(PDFCProperty<?> property)
      Returns the value of the specified PDFCProperty as a boolean. If it was not specified in the configuration file, the default value will be returned.
      Specified by:
      getBool in interface IProfile
      Parameters:
      property - the property to get the value for
      Returns:
      the value as a boolean.
      Since:
      1.0