com.ibm.designer.domino.xsp.registry
Class DesignerExtensionUtil

java.lang.Object
  extended by com.ibm.designer.domino.xsp.registry.DesignerExtensionUtil

public class DesignerExtensionUtil
extends java.lang.Object

A utility class that allows Domino Designer to retrieve component/property information from the FacesRegistry.


Constructor Summary
DesignerExtensionUtil()
           
 
Method Summary
static void dump(DesignerExtension ext, java.lang.StringBuffer buf, int level)
          Debug method - not part of the official API.
static java.lang.String findPropertyCategoryLabelFromId(java.lang.String categoryId)
          This should only be used by the parser for the property designer-extension.
 java.lang.String getComplexCategory(FacesDefinition def)
          If the argument is a FacesComplexDefinition and its ComplexDesignerExtension is not null, returns its categoryId, else returns null.
static ComplexDesignerExtension getComplexExtension(FacesComplexDefinition node)
          Returns the design time information relating to the provided FacesComplexDefinition (e.g.
static ComponentDesignerExtension getComponentExtension(FacesComponentDefinition node)
          Returns the design time information relating to the provided FacesComponentDefinition (custom control).
static CompositeComponentDesignerExtension getCompositeComponentExtension(FacesCompositeComponentDefinition node)
           
static DefinitionDesignerExtension getDefinitionExtension(FacesDefinition node)
          Returns the design time information relating to the provided FacesDefinition (component).
static DesignerExtension getExtension(FacesExtensibleNode node)
          Returns the basic DesignerExtension information relating to the specified registry node.
static java.lang.String getPropertyCategoryId(FacesDefinition def, FacesProperty property)
          The unlocalized category ID.
static java.lang.String getPropertyCategoryLabel(FacesDefinition def, FacesProperty property)
          Provides the localized property category.
static PropertyDesignerExtension getPropertyExtension(FacesProperty property)
          Returns the design time information relating to the provided FacesProperty (property).
static java.lang.String getSelectedEvent(FacesDefinition node)
          Returns the name of event associated with the provided component that should be selected by defualt in the Events view in Domino Designer.
static java.lang.String getSinceVersion(FacesDefinition def, FacesProperty prop)
          Returns when the property or tag was introduced.
static boolean isInPalette(FacesComponentDefinition def)
          Returns whether or not the provided component should be visible in the XPages editor's palette.
static boolean isVisible(FacesDefinition node)
          Returns whether or not the provided component should be visible within the tooling.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DesignerExtensionUtil

public DesignerExtensionUtil()
Method Detail

getPropertyExtension

public static PropertyDesignerExtension getPropertyExtension(FacesProperty property)
Returns the design time information relating to the provided FacesProperty (property).

Parameters:
property - the FacesProperty that is being inspected
Returns:
design time meta deta as defined relating to the provided property
See Also:
FacesProperty

getDefinitionExtension

public static DefinitionDesignerExtension getDefinitionExtension(FacesDefinition node)
Returns the design time information relating to the provided FacesDefinition (component).

Parameters:
node - the FacesDefinition that is being inspected
Returns:
design time meta data as defined relating to the component provided
See Also:
FacesDefinition

getComponentExtension

public static ComponentDesignerExtension getComponentExtension(FacesComponentDefinition node)
Returns the design time information relating to the provided FacesComponentDefinition (custom control).

Parameters:
node - the FacesComponentDefinition that is being inspected
Returns:
design time meta data as defined relating to the custom control provided

getCompositeComponentExtension

public static CompositeComponentDesignerExtension getCompositeComponentExtension(FacesCompositeComponentDefinition node)
Parameters:
node -
Returns:

getComplexExtension

public static ComplexDesignerExtension getComplexExtension(FacesComplexDefinition node)
Returns the design time information relating to the provided FacesComplexDefinition (e.g. data source. simple action etc).

Parameters:
node - the FacesComplexDefinition that is being inspected.
Returns:
design time meta data as defined relating to the complex type provided

getExtension

public static DesignerExtension getExtension(FacesExtensibleNode node)
Returns the basic DesignerExtension information relating to the specified registry node.

Parameters:
node - the FacesExtensibleNode that is being inspected.
Returns:
the basic design time information that is defined for the given registry node

dump

public static void dump(DesignerExtension ext,
                        java.lang.StringBuffer buf,
                        int level)
Debug method - not part of the official API. Implementation may change in a future release

Parameters:
ext -
buf -
level -

getPropertyCategoryLabel

public static java.lang.String getPropertyCategoryLabel(FacesDefinition def,
                                                        FacesProperty property)
Provides the localized property category. This method should be used instead of PropertyDesignerExtension.getCategoryLabel() because it provides a default category for composite-component properties.

Parameters:
def - if a category is not provided for the property, then the component's category will be returned
property - if a category is not provided for the property, then the component's category will be returned
Returns:
a localized category label

getPropertyCategoryId

public static java.lang.String getPropertyCategoryId(FacesDefinition def,
                                                     FacesProperty property)
The unlocalized category ID. This method should be used instead of PropertyDesignerExtension.getCategoryId() because it provides a default category for composite-component properties.

Parameters:
def - if a category is not provided for the property, then the component's category will be returned
property - if a category is not provided for the property, then the component's category will be returned
Returns:
a non localized category id

findPropertyCategoryLabelFromId

public static java.lang.String findPropertyCategoryLabelFromId(java.lang.String categoryId)
This should only be used by the parser for the property designer-extension. Checks if the given category ID is one of the hard-coded categories, and if so, returns the translated label for that category.

Parameters:
categoryId -
Returns:

isVisible

public static boolean isVisible(FacesDefinition node)
Returns whether or not the provided component should be visible within the tooling.

Parameters:
node - the component whose visibility is being tested
Returns:
true if the item is visible, true by default

isInPalette

public static boolean isInPalette(FacesComponentDefinition def)
Returns whether or not the provided component should be visible in the XPages editor's palette.

Parameters:
def - the component whose palette visibility is being sought
Returns:
true if the component should be displayed in the palette, true by default

getComplexCategory

public java.lang.String getComplexCategory(FacesDefinition def)
If the argument is a FacesComplexDefinition and its ComplexDesignerExtension is not null, returns its categoryId, else returns null.

Parameters:
def - a definition of a faces component
Returns:
the category id of the provided definition (only if the definition is a complex one)

getSelectedEvent

public static java.lang.String getSelectedEvent(FacesDefinition node)
Returns the name of event associated with the provided component that should be selected by defualt in the Events view in Domino Designer. May be null!

Parameters:
node - the node whose events are being inspected
Returns:
the event that should be selected by default

getSinceVersion

public static java.lang.String getSinceVersion(FacesDefinition def,
                                               FacesProperty prop)
Returns when the property or tag was introduced. If the property is null the 'since' version is returned for the tag.

Parameters:
def - the tag whose since verion will be returned if a since version does not exist for the property
prop - the property whose 'since' version is being sought
Returns:
the version that the property/tag was introduced in