public interface

IPropertyManager

implements IEventSource
com.pnfsoftware.jeb.core.properties.IPropertyManager
Known Indirect Subclasses

Class Overview

Define a property manager (PM). Implementations of this class connect an optional IPropertyDefinitionManager and an IConfiguration together to offer clients a single point of entry to set and get legal properties.

Summary

Constants
int DEPTH_CONFIGURATION_ONLY
int DEPTH_FULL
int DEPTH_MASTER
Public Methods
abstract void dispose()
Release resources used by this manager.
abstract boolean getBoolean(String name, boolean defaultOnNull)
Safely retrieve a boolean property.
abstract boolean getBoolean(String name)
Safely retrieve a boolean property.
abstract Boolean getBooleanUnsafe(String name)
Retrieve a boolean property.
abstract IConfiguration getConfiguration()
Get the configuration object.
abstract int getInteger(String name)
Safely retrieve an integer property.
abstract int getInteger(String name, int defaultOnNull)
Safely retrieve an integer property.
abstract Integer getIntegerUnsafe(String name)
Retrieve an integer property.
abstract IPropertyDefinitionManager getPropertyDefinitionManager()
Get the PDM.
abstract String getString(String name)
Safely retrieve a string property.
abstract String getString(String name, String defaultOnNull)
Safely retrieve a string property.
abstract String getStringUnsafe(String name)
Retrieve a string property.
abstract Object getValue(String name)
Get a property value.
abstract Object getValue(String name, int checkingDepth, boolean validateValue)
Get a property value with optional control on depth search and property validation.
abstract boolean setBoolean(String name, Boolean value)
Set a boolean property.
abstract boolean setBoolean(String name, Boolean value, PropertyChangeObject co)
abstract boolean setInteger(String name, Integer value, PropertyChangeObject co)
abstract boolean setInteger(String name, Integer value)
Set an integer property value
abstract boolean setString(String name, String value, PropertyChangeObject co)
abstract boolean setString(String name, String value)
Get a string property value.
abstract boolean setValue(String name, Object value)
Set a property value.
abstract boolean setValue(String name, Object value, boolean validateValue, PropertyChangeObject co)
Set a property value with optional control on property validation.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.util.events.IEventSource

Constants

public static final int DEPTH_CONFIGURATION_ONLY

Constant Value: 0 (0x00000000)

public static final int DEPTH_FULL

Constant Value: 3 (0x00000003)

public static final int DEPTH_MASTER

Constant Value: 1 (0x00000001)

Public Methods

public abstract void dispose ()

Release resources used by this manager.

public abstract boolean getBoolean (String name, boolean defaultOnNull)

Safely retrieve a boolean property.

public abstract boolean getBoolean (String name)

Safely retrieve a boolean property. On error, false is returned.

Parameters
name the property name
Returns
  • the property value

public abstract Boolean getBooleanUnsafe (String name)

Retrieve a boolean property. This method may throw or return null.

public abstract IConfiguration getConfiguration ()

Get the configuration object.

Returns
  • the configuration object

public abstract int getInteger (String name)

Safely retrieve an integer property. On error, zero is returned.

Parameters
name the property name
Returns
  • the property value

public abstract int getInteger (String name, int defaultOnNull)

Safely retrieve an integer property.

public abstract Integer getIntegerUnsafe (String name)

Retrieve an integer property. This method may throw or return null.

public abstract IPropertyDefinitionManager getPropertyDefinitionManager ()

Get the PDM. Implementations may not provide a definition manager.

Returns
  • the PDM, null if none

public abstract String getString (String name)

Safely retrieve a string property. On error, the empty string is returned.

Parameters
name the property name
Returns
  • the property value

public abstract String getString (String name, String defaultOnNull)

Safely retrieve a string property.

public abstract String getStringUnsafe (String name)

Retrieve a string property.

public abstract Object getValue (String name)

Get a property value.

Parameters
name the property name
Returns
  • the property value

public abstract Object getValue (String name, int checkingDepth, boolean validateValue)

Get a property value with optional control on depth search and property validation. By default, property getters do a maximum depth search and validate values.

Parameters
name the property name
checkingDepth one of the DEPTH_* constant
validateValue validate the property value against its definition
Returns
  • the property value object (Boolean, Integer, or String), null on error

public abstract boolean setBoolean (String name, Boolean value)

Set a boolean property.

Parameters
name the property name
value the property value

public abstract boolean setBoolean (String name, Boolean value, PropertyChangeObject co)

public abstract boolean setInteger (String name, Integer value, PropertyChangeObject co)

public abstract boolean setInteger (String name, Integer value)

Set an integer property value

Parameters
name the property name
value the property value

public abstract boolean setString (String name, String value, PropertyChangeObject co)

public abstract boolean setString (String name, String value)

Get a string property value.

Parameters
name the property name
value the property value

public abstract boolean setValue (String name, Object value)

Set a property value.

Parameters
name the property name
value the property value
Returns
  • true on success

public abstract boolean setValue (String name, Object value, boolean validateValue, PropertyChangeObject co)

Set a property value with optional control on property validation. By default, property setters validate values.

Parameters
name the property name
value the property value
validateValue validate the property value against its definition
Returns
  • true on success