Class SchemaDocumentation
- java.lang.Object
- com.orchestranetworks.schema.SchemaDocumentation
 
 - public abstract class SchemaDocumentation extends Object Abstract class for dynamically computing the label and description of a node in the context of a data model.- Definition in the data model- 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.MySchemaDocumentationis 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>- param1and- param2are JavaBean properties of- com.foo.MySchemaDocumentationclass.- For more information, see Specification of JavaBeans. - Life cycle- When the data model is loaded:- the specified class is instantiated through its default constructor and the setters of the JavaBean properties are called (based on the example above, setParam1(...)andsetParam2(...));
- the method setup(SchemaDocumentationSetupContext)is called for the new instance.
 
- the specified class is instantiated through its default constructor and the setters of the JavaBean properties are called (based on the example above, 
- During the operational phase: the methods getLabel(SchemaDocumentationContext)andgetDescription(SchemaDocumentationContext)are called each time a node from the data model is to be displayed in the user interface.
 - Performance considerations- 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.
- When the data model is loaded:
-   Constructor SummaryConstructors Constructor Description SchemaDocumentation()
 -   Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract StringgetDescription (SchemaDocumentationContext aContext)Returns the localized description of the node in the specified context.abstract StringgetLabel (SchemaDocumentationContext aContext)Returns the localized label of the node in the specified context.abstract voidsetup (SchemaDocumentationSetupContext aContext)Checks and prepares this instance when the data model is loaded.
 
-   
-   Method Detail- getLabel- public abstract String getLabel(SchemaDocumentationContext aContext) Returns the localized label of the node in the specified context. This method is invoked by- 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.- See Also:
- SchemaNode.getLabel(Session)
 
 - getDescription- public abstract String getDescription(SchemaDocumentationContext aContext) Returns the localized description of the node in the specified context. This method is invoked by- 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 - nullthe displayed description will usually be the description statically defined in the data model.- See Also:
- SchemaNode.getDescription(Session)
 
 - setup- public abstract void setup(SchemaDocumentationSetupContext aContext) Checks and prepares this instance when the data model is loaded.- Do note that during this step, all models may not be properly loaded. Thus, the repository should not be accessed during this step. 
 
 
-