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

API for a property definition manager \(PDM\). 

 PDMs can be chained to form a hierarchy of property namespaces. Each PDM defines a region, and properties are registered within those regions.

## Static Field: FLAG_ALLOW_LOOK_UP
Type: `int`

Constant value: `1`
Description: Allow hierarchical property lookups to search parent namespaces when a local value is absent.

## 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: the property name
parameter: type: the property type
parameter: description: an optional description string
parameter: flags: property flags, using [IPropertyDefinition#FLAG_INTERNAL](IPropertyDefinition#FLAG_INTERNAL) and related constants
return: the newly created property definition

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

Description: Create a group.
parameter: name: non\-empty group name
return: the newly created group

## 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: Get a human\-readable description of this namespace.
return: the description, or `null`

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

Description: Get the PDM flags.
return: a combination of `FLAG_*` constants

## 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: the matching group, or `null` if none exists

## 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: the groups of this manager

## 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: Determine whether this PDM has child regions.
return: `true` if child regions are registered

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

Description: Determine whether this PDM defines local properties.
return: `true` if local property definitions exist

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

Description: Determine if this PDM is a root manager.
return: `true` if this manager has no parent region

## 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

