Package com.inet.pdfc.config
Class DefaultProfile
- java.lang.Object
-
- com.inet.pdfc.config.DefaultProfile
-
- All Implemented Interfaces:
IProfile,java.io.Serializable
- Direct Known Subclasses:
SourceProfile
@JsonData public class DefaultProfile extends java.lang.Object implements IProfile
The class contains the default i-net PDFC profile.- Since:
- 4.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDefaultProfile.ProfileChangeListenerA listener that can be registered to be notified if a value in the profile changed
-
Field Summary
-
Fields inherited from interface com.inet.pdfc.config.IProfile
KEY_DESCRIPTION, KEY_NAME
-
-
Constructor Summary
Constructors Constructor Description DefaultProfile()Default constructor with empty propertiesDefaultProfile(IProfile sourceProfile)Creates a new profile as copy of another profile
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProfileChangeListener(DefaultProfile.ProfileChangeListener l)Adds a listener to be notified if a profile value changedbooleangetBool(PDFCProperty<?> property)Returns the value of the specifiedPDFCPropertyas a boolean.booleangetBool(java.lang.String propertyName)Returns the value of the specifiedPDFCPropertyas a boolean.doublegetDouble(PDFCProperty<?> property)Returns the value of the specifiedPDFCPropertyas a double.doublegetDouble(java.lang.String propertyName)Returns the value of the specifiedPDFCPropertyas a double.intgetInt(PDFCProperty<?> property)Returns the value of the specifiedPDFCPropertyas an int.intgetInt(java.lang.String propertyName)Returns the value of the specifiedPDFCPropertyas an int.java.lang.ObjectgetObject(PDFCProperty<?> property)Returns the value of the specifiedPDFCPropertyas anObject.java.lang.ObjectgetObject(java.lang.String propertyName)Returns the value of the specifiedPDFCPropertyas anObject.java.util.PropertiesgetProperties()Returns set of properties defined in this configurationjava.lang.StringgetString(PDFCProperty<?> property)Returns the value of the specifiedPDFCPropertyas aString.java.lang.StringgetString(java.lang.String propertyName)Returns the value of the specifiedPDFCPropertyas aString.voidputValue(PDFCProperty<?> property, java.lang.String value)Stores a property in the current configuration.voidputValue(java.lang.String propertyName, java.lang.String value)Stores a property in the current configuration.voidputValues(java.util.Properties values)Stores all properties in the current configuration.voidremoveProfileChangeListener(DefaultProfile.ProfileChangeListener l)Removes a listener to be no more notified
-
-
-
Constructor Detail
-
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 benull- Since:
- 4.0
-
-
Method Detail
-
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(java.lang.String propertyName)
Returns the value of the specifiedPDFCPropertyas a boolean. If it was not specified in the configuration file, the default value will be returned.
-
getInt
public int getInt(java.lang.String propertyName)
Returns the value of the specifiedPDFCPropertyas an int. If it was not specified in the configuration file, the default value will be returned.
-
getDouble
public double getDouble(java.lang.String propertyName)
Returns the value of the specifiedPDFCPropertyas a double. If it was not specified in the configuration file, the default value will be returned.
-
getObject
public java.lang.Object getObject(java.lang.String propertyName)
Returns the value of the specifiedPDFCPropertyas anObject. If it was not specified in the configuration file, the default value will be returned.
-
getString
public java.lang.String getString(java.lang.String propertyName)
Returns the value of the specifiedPDFCPropertyas aString. If it was not specified in the configuration file, the default value will be returned.
-
putValue
public void putValue(PDFCProperty<?> property, java.lang.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.
-
putValue
public void putValue(java.lang.String propertyName, java.lang.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.
-
putValues
public void putValues(java.util.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.
-
getProperties
public java.util.Properties getProperties()
Returns set of properties defined in this configuration- Returns:
- the profile properties
- Since:
- 1.0
-
getObject
public java.lang.Object getObject(PDFCProperty<?> property)
Returns the value of the specifiedPDFCPropertyas anObject. If it was not specified in the configuration file, the default value will be returned.
-
getString
public java.lang.String getString(PDFCProperty<?> property)
Returns the value of the specifiedPDFCPropertyas aString. If it was not specified in the configuration file, the default value will be returned.
-
getInt
public int getInt(PDFCProperty<?> property)
Returns the value of the specifiedPDFCPropertyas an int. If it was not specified in the configuration file, the default value will be returned.
-
getDouble
public double getDouble(PDFCProperty<?> property)
Returns the value of the specifiedPDFCPropertyas a double. If it was not specified in the configuration file, the default value will be returned.
-
getBool
public boolean getBool(PDFCProperty<?> property)
Returns the value of the specifiedPDFCPropertyas a boolean. If it was not specified in the configuration file, the default value will be returned.
-
-