com.ibm.xsp.registry
Interface FacesDefinition

All Superinterfaces:
FacesExtensibleNode
All Known Subinterfaces:
FacesComplexDefinition, FacesComponentDefinition, FacesCompositeComponentDefinition, FacesConverterDefinition, FacesGroupDefinition, FacesPropertyType, FacesRendererDefinition, FacesValidatorDefinition

public interface FacesDefinition
extends FacesExtensibleNode

A FacesDefinition represents a tag which belongs to a particular namespace.


Method Summary
 FacesProperty getDefaultFacesProperty()
          The FacesProperty referenced by the getDefaultProperty() property name.
 java.lang.String getDefaultProperty()
          Specifies which property is the default when none is specified.
 java.util.Collection<java.lang.String> getDefinedInlinePropertyNames()
          Same as getDefinedPropertyNames(), except without those properties referenced by the getGroupTypeRefs().
 java.util.Collection<java.lang.String> getDefinedPropertyNames()
          Those properties defined within this FacesDefinition.
 FacesLibraryFragment getFile()
          The file this definition is defined in.
 java.lang.String getFirstDefaultPrefix()
          This redundant method uses the namespaceUri and the registry where this tag was defined to look up FacesLibrary.getFirstDefaultPrefix().
 java.util.Collection<java.lang.String> getGroupTypeRefs()
          A collection of references to FacesGroupDefinitions containing multiple properties, to resolved as defined properties.
 java.lang.String getId()
          This will not be null.
 java.lang.Class<?> getJavaClass()
          This is usually the class or interface that the runtime object created from this definition will be or be assignable to.
 java.lang.String getNamespaceUri()
          This redundant method returns the file's namespaceUri.
 FacesDefinition getParent()
          The parent definition, or null, from which FacesPropertys and other values may be inherited.
 FacesProperty getProperty(java.lang.String name)
          Note this is allowed to be backed by a reference, so it should be assumed that it may return null initially and later return a value (or may never return a value).
 java.util.Collection<java.lang.String> getPropertyNames()
          Note this may be backed by a reference that may change, so it should be assumed that it may return an empty or short list initially and later return a longer list (or may never return a value).
 java.lang.String getReferenceId()
          The id used by other controls to reference this definition - for components it is the component-type, for complex-types, the complex-id.
 java.lang.String getSince()
          The version number when this definition was added to the registry.
 java.lang.String getTagName()
          If isTag() this'll return the tag's name.
 boolean isDefinedProperty(java.lang.String propertyName)
           
 boolean isGroupProperty(java.lang.String propertyName)
           
 boolean isProperty(java.lang.String propertyName)
           
 boolean isTag()
          If true this definition corresponds to a tag in the .xsp config files.
 
Methods inherited from interface com.ibm.xsp.registry.FacesExtensibleNode
getExtension, setExtension
 

Method Detail

getTagName

java.lang.String getTagName()
If isTag() this'll return the tag's name. Otherwise the behavior is undefined - sometimes it will be null.


getNamespaceUri

java.lang.String getNamespaceUri()
This redundant method returns the file's namespaceUri. (See getFile() and FacesLibraryFragment.getNamespaceUri().)


getFirstDefaultPrefix

java.lang.String getFirstDefaultPrefix()
This redundant method uses the namespaceUri and the registry where this tag was defined to look up FacesLibrary.getFirstDefaultPrefix().

Returns:
null or a suggested xmlns prefix to be used as an alias for the namespace in xsp files.

getFile

FacesLibraryFragment getFile()
The file this definition is defined in.


getParent

FacesDefinition getParent()
The parent definition, or null, from which FacesPropertys and other values may be inherited.

Note this is allowed to be backed by a reference, so it should be assumed that it may return null initially and later return a value (or may never return a value). Hence code that calls this should never cache results that depend on the value of the parent.


getId

java.lang.String getId()
This will not be null. It must be unique to the container FacesLibraryFragment file, or FacesRenderKitFragment set of renderer definitions.


getJavaClass

java.lang.Class<?> getJavaClass()
This is usually the class or interface that the runtime object created from this definition will be or be assignable to. If isTag() then it must be a non-abstract class with public, zero-arguments constructor. Otherwise it may be an interface or an abstract class. (See Class.isAssignableFrom(java.lang.Class).)

It must not be null, but it does not have to be unique to this FacesDefinition.

Note, if this FacesDefinition is a FacesComponentDefinition and this class class is a FacesDefinitionClass, then the object created at runtime will not be an instance of this class. (See FacesDefinitionClass for details)


getProperty

FacesProperty getProperty(java.lang.String name)
Note this is allowed to be backed by a reference, so it should be assumed that it may return null initially and later return a value (or may never return a value). Hence code that calls this should never cache results that depend on the value of the parent.


isProperty

boolean isProperty(java.lang.String propertyName)
Parameters:
propertyName -
Returns:

isDefinedProperty

boolean isDefinedProperty(java.lang.String propertyName)
Parameters:
propertyName -
Returns:

isTag

boolean isTag()
If true this definition corresponds to a tag in the .xsp config files. Some definitions only correspond to an xml definition group, and shouldn't have a corresponding tag.


getDefaultProperty

java.lang.String getDefaultProperty()
Specifies which property is the default when none is specified. If a property value is specified directly under this definition's tag, with no this.something tag, then that property value will be stored in the default property (if it's of the correct type). It may return null, if no property has been set as the default.


getDefaultFacesProperty

FacesProperty getDefaultFacesProperty()
The FacesProperty referenced by the getDefaultProperty() property name. This may be null, if there is no property name, or if the property name does not resolve to a known property.

Returns:
null or the default FacesProperty.

getDefinedPropertyNames

java.util.Collection<java.lang.String> getDefinedPropertyNames()
Those properties defined within this FacesDefinition. There may or may not be corresponding properties with the same name in the parent.


getDefinedInlinePropertyNames

java.util.Collection<java.lang.String> getDefinedInlinePropertyNames()
Same as getDefinedPropertyNames(), except without those properties referenced by the getGroupTypeRefs().

Returns:

getPropertyNames

java.util.Collection<java.lang.String> getPropertyNames()
Note this may be backed by a reference that may change, so it should be assumed that it may return an empty or short list initially and later return a longer list (or may never return a value). Hence code that calls this should never cache results that depend on the returned value. This includes both the defined properties and properties inherited from the parent and ancestors. The same property name will not appear more than once.


getGroupTypeRefs

java.util.Collection<java.lang.String> getGroupTypeRefs()
A collection of references to FacesGroupDefinitions containing multiple properties, to resolved as defined properties.


isGroupProperty

boolean isGroupProperty(java.lang.String propertyName)

getSince

java.lang.String getSince()
The version number when this definition was added to the registry.


getReferenceId

java.lang.String getReferenceId()
The id used by other controls to reference this definition - for components it is the component-type, for complex-types, the complex-id. The value returned from getId() is usually either this value or the getTagName(). This may be null, e.g. FacesRendererDefinitions and FacesPropertyTypes do not have a reference id.