public abstract class

AbstractUnitPlugin

extends AbstractPlugin
implements IUnitPlugin
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.AbstractPlugin
     ↳ com.pnfsoftware.jeb.core.units.AbstractUnitPlugin
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Skeleton implementation.

Summary

Fields
protected IPropertyDefinitionManager pdm
protected IPropertyManager pm
protected double priority
protected String type
Public Constructors
AbstractUnitPlugin(String type, double priority)
Create a new native code plugin.
Public Methods
String getFormatType()
Retrieve the identity of the unit type.
double getPriority()
Get the identifier priority.
IPropertyDefinitionManager getPropertyDefinitionManager()
Retrieve the property definition manager (PDM) used by this plugin.
ITypeIdProvider getTypeIdProvider()
The type-id provider for this type of units.
void initialize(IPropertyDefinitionManager parentPdm)
Create and initialize the property manager for this identifier.
[Expand]
Inherited Methods
From class com.pnfsoftware.jeb.core.AbstractPlugin
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.IPlugin
From interface com.pnfsoftware.jeb.core.units.IUnitPlugin

Fields

protected IPropertyManager pm

protected double priority

protected String type

Public Constructors

public AbstractUnitPlugin (String type, double priority)

Create a new native code plugin.

Parameters
type mandatory type, which will be used as the sub-region type when the identifier is initialized. The type should be a valid region name, please see PropertyDefinitionManager
priority mandatory priority

Public Methods

public String getFormatType ()

Retrieve the identity of the unit type. The type should be unique across all units.

Returns
  • the non-null type

public double getPriority ()

Get the identifier priority. Priority can be negative. Priorities are used by identifier managers (eg, Processors) to ensure that identifiers are called in a (partially) predictable order, if need be. The higher the number, the higher the priority.

Recommendation: typical priority is zero. Relying on priority for proper identification should be used as a last resort measure.

Returns
  • the identifier priority

public IPropertyDefinitionManager getPropertyDefinitionManager ()

Retrieve the property definition manager (PDM) used by this plugin.

Returns
  • the PDM

public ITypeIdProvider getTypeIdProvider ()

The type-id provider for this type of units. Currently, This method is not intended to use by third-party clients.

Returns
  • a type-id provider, null if none

public void initialize (IPropertyDefinitionManager parentPdm)

Create and initialize the property manager for this identifier. This method is usually called after construction on the identifier.

Overrides are allowed if a plugin needs to define its own properties, but a call to the superclass method should take place first. If not, the implementor is responsible for creating the plugins' PDM.

Parameters
parentPdm the parent PDM