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 interface
DefaultProfile.ProfileChangeListener
A 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 void
addProfileChangeListener(DefaultProfile.ProfileChangeListener l)
Adds a listener to be notified if a profile value changedboolean
getBool(PDFCProperty<?> property)
Returns the value of the specifiedPDFCProperty
as a boolean.boolean
getBool(java.lang.String propertyName)
Returns the value of the specifiedPDFCProperty
as a boolean.double
getDouble(PDFCProperty<?> property)
Returns the value of the specifiedPDFCProperty
as a double.double
getDouble(java.lang.String propertyName)
Returns the value of the specifiedPDFCProperty
as a double.int
getInt(PDFCProperty<?> property)
Returns the value of the specifiedPDFCProperty
as an int.int
getInt(java.lang.String propertyName)
Returns the value of the specifiedPDFCProperty
as an int.java.lang.Object
getObject(PDFCProperty<?> property)
Returns the value of the specifiedPDFCProperty
as anObject
.java.lang.Object
getObject(java.lang.String propertyName)
Returns the value of the specifiedPDFCProperty
as anObject
.java.util.Properties
getProperties()
Returns set of properties defined in this configurationjava.lang.String
getString(PDFCProperty<?> property)
Returns the value of the specifiedPDFCProperty
as aString
.java.lang.String
getString(java.lang.String propertyName)
Returns the value of the specifiedPDFCProperty
as aString
.void
putValue(PDFCProperty<?> property, java.lang.String value)
Stores a property in the current configuration.void
putValue(java.lang.String propertyName, java.lang.String value)
Stores a property in the current configuration.void
putValues(java.util.Properties values)
Stores all properties in the current configuration.void
removeProfileChangeListener(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 specifiedPDFCProperty
as 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 specifiedPDFCProperty
as 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 specifiedPDFCProperty
as 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 specifiedPDFCProperty
as 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 specifiedPDFCProperty
as 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 specifiedPDFCProperty
as 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 specifiedPDFCProperty
as 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 specifiedPDFCProperty
as 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 specifiedPDFCProperty
as 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 specifiedPDFCProperty
as a boolean. If it was not specified in the configuration file, the default value will be returned.
-
-