public abstract class SchemaDocumentation extends Object
The component must be declared under the element
xs:schema/xs:annotation/xs:appinfo
:
where<xs:schema ...> <xs:annotation> <xs:appinfo> <osd:documentation class="com.foo.MySchemaDocumentation"/> </xs:appinfo> </xs:annotation> ... </xs:schema ...>
com.foo.MySchemaDocumentation
is
the fully qualified name of a class extending this abstract class.
The declaration may also pass parameters, as follows:
where<osd:documentation class="com.foo.MySchemaDocumentation"> <param1>...</param1> <param2>...</param2> </osd:documentation>
param1
and param2
are JavaBean properties
of com.foo.MySchemaDocumentation
class.
For more information, see Specification of JavaBeans.
setParam1(...)
and
setParam2(...)
);setup(SchemaDocumentationSetupContext)
is called for the new instance.getLabel(SchemaDocumentationContext)
and getDescription(SchemaDocumentationContext)
are called each time a node from the data model is to be displayed in the user interface.
The methods getLabel(SchemaDocumentationContext)
and getDescription(SchemaDocumentationContext)
are called every time a node in the data model is displayed in
the user interface, which means the code of these methods must be optimized as much as possible to avoid impacting
performance.
For example, given a table with N nodes, these methods will be called at least
N times when accessing a table record in the user interface.
Constructor and Description |
---|
SchemaDocumentation() |
Modifier and Type | Method and Description |
---|---|
abstract String |
getDescription(SchemaDocumentationContext aContext)
Returns the localized description of the node in the specified context.
|
abstract String |
getLabel(SchemaDocumentationContext aContext)
Returns the localized label of the node in the specified context.
|
abstract void |
setup(SchemaDocumentationSetupContext aContext)
Checks and prepares this instance when the data model is loaded.
|
public abstract String getLabel(SchemaDocumentationContext aContext)
SchemaNode.getLabel(Session)
and SchemaNode.getLabel(java.util.Locale)
to give the ability
to dynamically compute a label depending on the session or the repository.
If this method returns null
, the displayed label
will usually be the label statically defined in the data model,
or the node name if no static label is defined.
SchemaNode.getLabel(Session)
public abstract String getDescription(SchemaDocumentationContext aContext)
SchemaNode.getDescription(Session)
and SchemaNode.getDescription(java.util.Locale)
to give the ability
to dynamically compute a description depending on the session or the repository.
If this method returns null
the displayed description
will usually be the description statically defined in the data model.
SchemaNode.getDescription(Session)
public abstract void setup(SchemaDocumentationSetupContext aContext)