# Interface: com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager

API for a property definition manager \(PDM\). PDMs can be chained to form a hierarchy of properties. Each PDM defines a region. PDM regions are standard lower case identifiers. Properties are camel case identifiers. Naming convention should be enforced, not optional. Member methods should throw a RuntimeException on failure. 

 PDM support the definition of boolean, integer, and string properties.

## Static Field: FLAG_ALLOW_LOOK_UP
Type: `int`

Constant value: `1`
Description: 

## Static Field: FLAG_MAY_ALPHASORT_CHILDREN
Type: `int`

Constant value: `16`
Description: If this flag is set, it indicates to clients that children PDM are in no particular order and may be sorted.

## Static Field: FLAG_SHOULD_NOT_ALPHASORT_CHILDREN
Type: `int`

Constant value: `32`
Description: If this flag is set, it indicates to clients that children PDM are in a specific order and should be sorted.

## Static Field: pdmGroupDefault
Type: `java.lang.String`

Constant value: ``
Description: The default \(anonymous\) group name: an empty string.

## Method: addDefinition
- parameter: `name`, type: `java.lang.String`
- parameter: `type`, type: `com.pnfsoftware.jeb.core.properties.IPropertyType`
- parameter: `description`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinition`

Description: Add a property definition.
parameter: name: the property name
parameter: type: the property type
parameter: description: an optional description string
return: the newly created property definition

## Method: addDefinition
- parameter: `name`, type: `java.lang.String`
- parameter: `type`, type: `com.pnfsoftware.jeb.core.properties.IPropertyType`
- parameter: `description`, type: `java.lang.String`
- parameter: `flags`, type: `int`
- return type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinition`

Description: Add a property definition.
parameter: name: 
parameter: type: 
parameter: description: 
parameter: flags: 
return: 

## Method: addGroup
- parameter: `name`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionGroup`

Description: Create a group.
parameter: name: 
return: 

## Method: addInternalDefinition
- parameter: `name`, type: `java.lang.String`
- parameter: `type`, type: `com.pnfsoftware.jeb.core.properties.IPropertyType`
- return type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinition`

Description: Add an internal property definition.
parameter: name: the property name
parameter: type: the property type
return: the newly created property definition

## Method: addInternalDefinition
- parameter: `name`, type: `java.lang.String`
- parameter: `type`, type: `com.pnfsoftware.jeb.core.properties.IPropertyType`
- parameter: `description`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinition`

Description: Add an internal property definition.
parameter: name: the property name
parameter: type: the property type
parameter: description: optional description
return: the newly created property definition

## Method: attachToParent
- parameter: `parent`, type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager`

Description: Attach this PDM a parent PDM. The region name within the parent's children namespace must be available.
parameter: parent: a parent PDM

## Method: getChild
- parameter: `name`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager`

Description: Get a child PDM by region name.
parameter: name: the region name
return: the child, null if does not exist

## Method: getChildren
- return type: `java.util.Collection<com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager>`

Description: Get the children of this PDM.
return: a list of children, potentially empty \(never null\)

## Method: getDefinition
- parameter: `name`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinition`

Description: Retrieve a property definition.
parameter: name: the simple \(local\) property name \(of a property managed by this manager\)
return: the definition of null

## Method: getDefinitions
- return type: `java.util.Collection<com.pnfsoftware.jeb.core.properties.IPropertyDefinition>`

Description: Get the list of definitions within this PDM. Hierarchies are not navigated, only the current level properties are returned.
return: never null

## Method: getDescription
- return type: `java.lang.String`

Description: 
return: 

## Method: getFlags
- return type: `int`

Description: 
return: 

## Method: getGroup
- parameter: `name`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionGroup`

Description: Retrieve an existing group.
parameter: name: a non\-empty name
return: 

## Method: getGroups
- return type: `java.util.Collection<com.pnfsoftware.jeb.core.properties.IPropertyDefinitionGroup>`

Description: Retrieve all groups in this PDM. Note that the default group \(whose name is empty\) always exists and is returned as first element of the collection.
return: 

## Method: getNamespace
- return type: `java.lang.String`

Description: Fully qualified namespace of this PDM, eg ".com.pnfsoftware.foo"
return: the FQNS

## Method: getParent
- return type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager`

Description: Get the parent of this PDM.
return: the parent, null if this PDM is a root

## Method: getRegion
- return type: `java.lang.String`

Description: Region name \(lower case\), never null. A root region is the empty\-string.
return: the region name

## Method: hasChildren
- return type: `boolean`

Description: 
return: 

## Method: hasDefinitions
- return type: `boolean`

Description: 
return: 

## Method: isRoot
- return type: `boolean`

Description: Determine if this PDM is a root manager.
return: 

## Method: registerChild
- parameter: `child`, type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager`
- return type: `boolean`

Description: Register a PDM as a child region. To be used in conjunction with attachToParent.
parameter: child: the child PDM
return: success indicator

## Method: removeDefinition
- parameter: `name`, type: `java.lang.String`

Description: Remove a property.
parameter: name: the property name

## Method: removeGroup
- parameter: `name`, type: `java.lang.String`
- return type: `boolean`

Description: Remove a group. When a group is removed, all its property definitions are added to the default group.
parameter: name: non\-empty group name \(the default group cannot be removed\)
return: success indicator

