org.apache.myfaces.buildtools.maven2.plugin.builder.trinidad.parse
Class ComponentBean

java.lang.Object
  extended by org.apache.myfaces.buildtools.maven2.plugin.builder.trinidad.parse.ObjectBean
      extended by org.apache.myfaces.buildtools.maven2.plugin.builder.trinidad.parse.AbstractTagBean
          extended by org.apache.myfaces.buildtools.maven2.plugin.builder.trinidad.parse.ComponentBean

public class ComponentBean
extends AbstractTagBean

ComponentBean is a Java representation of the faces-config component XML element.


Constructor Summary
ComponentBean()
          Creates a new ComponentBean.
 
Method Summary
 void addComponentClassModifier(int modifier)
          Adds a Java Language class modifier to the component class.
 void addEvent(EventRefBean eventRef)
          Adds an event to this component.
 void addFacet(FacetBean facet)
          Adds a facet to this component.
 void addProperty(PropertyBean property)
          Adds a property to this component.
 void addTagClassModifier(int modifier)
          Adds a Java Language class modifier to the tag class.
protected  void attach(FacesConfigBean owner)
          Attaches the component and all event references.
 Iterator<EventRefBean> events()
          Returns an iterator for all events on this component only.
 Iterator<EventRefBean> events(boolean flatten)
          Returns an iterator for events on this component.
 Iterator<FacetBean> facets()
          Returns an iterator for all facets on this component only.
 Iterator<FacetBean> facets(boolean flatten)
          Returns an iterator for facets on this component.
 ComponentBean findBehavioralComponent()
          Finds the behavioral component component inheritance hierarchy.
protected  String findComponentClass()
          Finds the component class in the component inheritance hierarchy.
 String findComponentFamily()
          Finds the component family in the component inheritance hierarchy.
 String findComponentSuperclass()
          Finds the component superclass in the component inheritance hierarchy.
 EventRefBean findEvent(String eventName)
          Returns the event for this event name.
 EventRefBean findEvent(String eventName, boolean flatten)
           
 FacetBean findFacet(String facetName)
          Returns the facet for this facet name.
 FacetBean findFacet(String facetName, boolean flatten)
           
protected  String findJspTagClass()
          Finds the tag class in the component inheritance hierarchy.
 String findJspTagSuperclass()
          Finds the tag superclass in the component inheritance hierarchy.
 PropertyBean findProperty(String propertyName)
          Returns the property for this property name.
 PropertyBean findProperty(String propertyName, boolean flatten)
          Returns the property for this property name.
 String findRendererType()
          Finds the renderer type in the component inheritance hierarchy.
 String getComponentClass()
          Returns the component class for this component.
 int getComponentClassModifiers()
          Returns the Java Language class modifiers for the component class.
 String getComponentFamily()
          Returns the component family for this component.
 String getComponentSuperclass()
          Returns the component super class for this component.
 String getComponentSupertype()
          Returns the component supertype for this component.
 String getComponentType()
          Returns the component type for this component.
 String getDefaultEventName()
           
 String getDefaultRendererType()
          Returns the default renderer type for this component.
 String getDescription()
          Returns the description of this property.
 String[] getEventNames()
           
protected  Map getFlattenedFacets()
           
protected  Map getFlattenedProperties()
           
 String getImplementationType()
           
 String getJsComponentClass()
          Returns the JavaScript component class for this component.
 String getLocalName()
          Returns the UIX2 local name for this component.
 String getLongDescription()
          Returns the long description of this property.
 String getNodeClass()
          Returns the UIX2 node class for this component.
 String getRendererType()
          Returns the renderer type for this component.
 int getTagClassModifiers()
          Returns the Java Language class modifiers for the tag class.
 String getTagHandler()
          Returns the Facelets tag handler for this component
 String getTagSuperclass()
          Returns the JSP tag handler superclass for this component.
 String[] getUnsupportedAgents()
          Returns unsupported agents for this component.
 boolean hasChildren()
          Returns true if the component can have children.
 boolean hasComponentFamily()
          Returns true if the component family exists for this component.
 boolean hasEvents()
          Returns true if this component has any events.
 boolean hasEvents(boolean flatten)
          Returns true if this component or any component supertype has any events.
 boolean hasFacets()
          Returns true if this component has any facets.
 boolean hasFacets(boolean flatten)
          Returns true if this component or any component supertype has any facets.
 boolean hasProperties()
          Returns true if this component has any properties.
 boolean hasProperties(boolean flatten)
          Returns true if this component or any component supertype has any properties.
 boolean hasRequiredAncestorContracts()
          Returns true if this component has any required ancestor contracts.
 boolean hasSatisfiedContracts()
          Returns true if this component has any satisfied contracts.
 boolean isClientBehaviorHolder()
           
 boolean isNamingContainer()
          Returns namingContainer flag of this component.
 boolean isTrinidadComponent()
          Checks if any of the component superclasses is UIXComponentBase
 void parseComponentClassModifier(String modifier)
           
 void parseEventNames(String value)
           
 void parseRequiredAncestorContracts(String requiredAncestorContracts)
          Parses the string of required ancestor contracts into a String array using space as the separator between values.
 void parseSatisfiedContracts(String satisfiedContracts)
          Parses the string of satisfied contracts into a String array using space as the separator between values.
 void parseTagClassModifier(String modifier)
           
 void parseUnsupportedAgents(String unsupportedAgents)
          Parses the unsupported agents for this component into a String array using space as the separator between values.
 Iterator<PropertyBean> properties()
          Returns an iterator for all properties on this component only.
 Iterator<PropertyBean> properties(boolean flatten)
          Returns an iterator for properties on this component.
 int propertiesSize()
          Number of properties for this component
 Iterator<String> requiredAncestorContracts()
          Returns the required ancestor contracts for this component.
 ComponentBean resolveSupertype()
          Returns the component supertype instance.
 Iterator<String> satisfiedContracts()
          Returns an iterator of the satisfied contracts for this component.
 void setChildren(boolean children)
          Specifies if the component can have children.
 void setComponentClass(String componentClass)
          Sets the component class for this component.
 void setComponentFamily(String componentFamily)
          Sets the component family for this component.
 void setComponentSuperclass(String componentSuperclass)
          Sets the component super class for this component.
 void setComponentSupertype(String componentSupertype)
          Sets the component supertype for this component.
 void setComponentType(String componentType)
          Sets the component type for this component.
 void setDefaultEventName(String defaultEventName)
           
 void setDescription(String description)
          Sets the description of this property.
 void setEventNames(String[] eventNames)
           
 void setImplementationType(String implementationType)
           
 void setJsComponentClass(String jsComponentClass)
          Sets the Java Script component class for this component.
 void setLocalName(String localName)
          Deprecated. remove when "ui" package is gone
 void setLongDescription(String longDescription)
          Sets the long description of this property.
 void setNamingContainer(boolean namingContainer)
          Sets the namingContainer flag of this property.
 void setNodeClass(String nodeClass)
          Deprecated. remove when "ui" package is gone
 void setRendererType(String rendererType)
          Sets the renderer type for this component.
 void setRequiredAncestorContracts(String[] requiredAncestorContracts)
          Sets the possible values for this property.
 void setSatisfiedContracts(String[] satisfiedContracts)
          Sets the possible values for this property.
 void setTagHandler(String tagHandler)
          Sets the Facelets tag handler (component handler) this component.
 void setTagSuperclass(String tagSuperclass)
          Sets the JSP tag handler superclass for this component.
 void setUnsupportedAgents(String[] unsupportedAgents)
          Sets the unsupported agents for this component.
 
Methods inherited from class org.apache.myfaces.buildtools.maven2.plugin.builder.trinidad.parse.AbstractTagBean
_parseModifier, accessibilityGuidelines, addAccessibilityGuideline, addExample, addScreenshot, examples, findExample, findScreenshot, getTagClass, getTagName, hasAccessibilityGuidelines, hasExamples, hasScreenshots, screenshots, setTagClass, setTagName
 
Methods inherited from class org.apache.myfaces.buildtools.maven2.plugin.builder.trinidad.parse.ObjectBean
getOwner, isModifiedSince
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentBean

public ComponentBean()
Creates a new ComponentBean.

Method Detail

setLocalName

public void setLocalName(String localName)
Deprecated. remove when "ui" package is gone

Sets the UIX2 local name for this component.

Parameters:
localName - the local name

getLocalName

public String getLocalName()
Returns the UIX2 local name for this component.

Returns:
the local name

setNodeClass

public void setNodeClass(String nodeClass)
Deprecated. remove when "ui" package is gone

Sets the UIX2 node class for this component.

Parameters:
nodeClass - the node class

getNodeClass

public String getNodeClass()
Returns the UIX2 node class for this component.

Returns:
the node class

setComponentType

public void setComponentType(String componentType)
Sets the component type for this component.

Parameters:
componentType - the component type

getComponentType

public String getComponentType()
Returns the component type for this component.

Returns:
the component type

setComponentFamily

public void setComponentFamily(String componentFamily)
Sets the component family for this component.

Parameters:
componentFamily - the component family

getComponentFamily

public String getComponentFamily()
Returns the component family for this component.

Returns:
the component family

hasComponentFamily

public boolean hasComponentFamily()
Returns true if the component family exists for this component.

Returns:
true if the component family exists, false otherwise

setComponentClass

public void setComponentClass(String componentClass)
Sets the component class for this component.

Parameters:
componentClass - the component class

getComponentClass

public String getComponentClass()
Returns the component class for this component.

Returns:
the component class

setJsComponentClass

public void setJsComponentClass(String jsComponentClass)
Sets the Java Script component class for this component.

Parameters:
jsComponentClass - the JavaScript component class

getJsComponentClass

public String getJsComponentClass()
Returns the JavaScript component class for this component.

Returns:
the Java Script component class

setDescription

public void setDescription(String description)
Sets the description of this property.

Overrides:
setDescription in class AbstractTagBean
Parameters:
description - the property description

getDescription

public String getDescription()
Returns the description of this property.

Overrides:
getDescription in class AbstractTagBean
Returns:
the property description

setLongDescription

public void setLongDescription(String longDescription)
Sets the long description of this property.

Overrides:
setLongDescription in class AbstractTagBean
Parameters:
longDescription - the long property description

getLongDescription

public String getLongDescription()
Returns the long description of this property.

Overrides:
getLongDescription in class AbstractTagBean
Returns:
the long property description

setUnsupportedAgents

public void setUnsupportedAgents(String[] unsupportedAgents)
Sets the unsupported agents for this component.

Parameters:
unsupportedAgents - the unsupported agents

getUnsupportedAgents

public String[] getUnsupportedAgents()
Returns unsupported agents for this component.

Returns:
the unsupported agents

setTagSuperclass

public void setTagSuperclass(String tagSuperclass)
Sets the JSP tag handler superclass for this component.

Parameters:
tagSuperclass - the JSP tag handler superclass

getTagSuperclass

public String getTagSuperclass()
Returns the JSP tag handler superclass for this component.

Returns:
the JSP tag handler superclass

setTagHandler

public void setTagHandler(String tagHandler)
Sets the Facelets tag handler (component handler) this component.

Parameters:
tagHandler - the Facelets tag handler class

getTagHandler

public String getTagHandler()
Returns the Facelets tag handler for this component

Returns:
the Facelets tag handler

setNamingContainer

public void setNamingContainer(boolean namingContainer)
Sets the namingContainer flag of this property.

Parameters:
namingContainer - the component namingContainer flag

isNamingContainer

public boolean isNamingContainer()
Returns namingContainer flag of this component.

Returns:
the component namingContainer flag

isClientBehaviorHolder

public boolean isClientBehaviorHolder()

setDefaultEventName

public void setDefaultEventName(String defaultEventName)

getDefaultEventName

public String getDefaultEventName()

setEventNames

public void setEventNames(String[] eventNames)

getEventNames

public String[] getEventNames()

parseEventNames

public void parseEventNames(String value)

setComponentSupertype

public void setComponentSupertype(String componentSupertype)
Sets the component supertype for this component.

Parameters:
componentSupertype - the component super type

getComponentSupertype

public String getComponentSupertype()
Returns the component supertype for this component.

Returns:
the component supertype

setComponentSuperclass

public void setComponentSuperclass(String componentSuperclass)
Sets the component super class for this component.

Parameters:
componentSuperclass - the component super class

getComponentSuperclass

public String getComponentSuperclass()
Returns the component super class for this component.

Returns:
the component super class

setRendererType

public void setRendererType(String rendererType)
Sets the renderer type for this component.

Parameters:
rendererType - the renderer type

getRendererType

public String getRendererType()
Returns the renderer type for this component.

Returns:
the renderer type

getDefaultRendererType

public String getDefaultRendererType()
Returns the default renderer type for this component.

Returns:
the default renderer type

getImplementationType

public String getImplementationType()

setImplementationType

public void setImplementationType(String implementationType)

addProperty

public void addProperty(PropertyBean property)
Adds a property to this component.

Overrides:
addProperty in class AbstractTagBean
Parameters:
property - the property to add

findProperty

public PropertyBean findProperty(String propertyName)
Returns the property for this property name.

Overrides:
findProperty in class AbstractTagBean
Parameters:
propertyName - the property name to find

findProperty

public PropertyBean findProperty(String propertyName,
                                 boolean flatten)
Returns the property for this property name.

Parameters:
propertyName - the property name to find

hasProperties

public boolean hasProperties()
Returns true if this component has any properties.

Overrides:
hasProperties in class AbstractTagBean
Returns:
true if this component has any properties, false otherwise

hasProperties

public boolean hasProperties(boolean flatten)
Returns true if this component or any component supertype has any properties.

Returns:
true if this component or any supertype has any properties, false otherwise

properties

public Iterator<PropertyBean> properties()
Returns an iterator for all properties on this component only.

Overrides:
properties in class AbstractTagBean
Returns:
the property iterator

properties

public Iterator<PropertyBean> properties(boolean flatten)
Returns an iterator for properties on this component.

Parameters:
flatten - true if the iterator should be a combined list of properties of this component and its supertype, false otherwise
Returns:
the property iterator

getFlattenedProperties

protected Map getFlattenedProperties()

propertiesSize

public int propertiesSize()
Number of properties for this component

Overrides:
propertiesSize in class AbstractTagBean
Returns:
num of properties

addFacet

public void addFacet(FacetBean facet)
Adds a facet to this component.

Parameters:
facet - the facet to add

findFacet

public FacetBean findFacet(String facetName)
Returns the facet for this facet name.

Parameters:
facetName - the facet name to find

findFacet

public FacetBean findFacet(String facetName,
                           boolean flatten)

hasFacets

public boolean hasFacets()
Returns true if this component has any facets.

Returns:
true if this component has any facets, false otherwise

hasFacets

public boolean hasFacets(boolean flatten)
Returns true if this component or any component supertype has any facets.

Returns:
true if this component or any supertype has any facets, false otherwise

facets

public Iterator<FacetBean> facets()
Returns an iterator for all facets on this component only.

Returns:
the facet iterator

facets

public Iterator<FacetBean> facets(boolean flatten)
Returns an iterator for facets on this component.

Parameters:
flatten - true if the iterator should be a combined list of facets of this component and its supertype, false otherwise
Returns:
the facet iterator

getFlattenedFacets

protected Map getFlattenedFacets()

setChildren

public void setChildren(boolean children)
Specifies if the component can have children.

Parameters:
children - true if the component can have children. false otherwise

hasChildren

public boolean hasChildren()
Returns true if the component can have children.

Returns:
true if the component can have children. false otherwise

addComponentClassModifier

public void addComponentClassModifier(int modifier)
Adds a Java Language class modifier to the component class.

Parameters:
modifier - the modifier to be added

getComponentClassModifiers

public int getComponentClassModifiers()
Returns the Java Language class modifiers for the component class. By default, these modifiers include Modifier.PUBLIC.

Returns:
the Java Language class modifiers for the component class

parseComponentClassModifier

public void parseComponentClassModifier(String modifier)

parseTagClassModifier

public void parseTagClassModifier(String modifier)
Overrides:
parseTagClassModifier in class AbstractTagBean

parseUnsupportedAgents

public void parseUnsupportedAgents(String unsupportedAgents)
Parses the unsupported agents for this component into a String array using space as the separator between values.

Parameters:
unsupportedAgents - the unsupported agents

parseSatisfiedContracts

public void parseSatisfiedContracts(String satisfiedContracts)
Parses the string of satisfied contracts into a String array using space as the separator between values. In the component metadata file, the satisfied contracts are noted with satisfied-contracts markup. As an example, af:popup (oracle.adf.view.rich.component.rich.RichPopup) supports oracle-adf-richmenu-holder, oracle-adf-richdialog-holder, oracle-adf-richnotewindow-holder, and oracle-adf-richpanelwindow-holder contracts. The satisfied contracts of a given component are matched with the required ancestor contracts of other components to determine if a component hierarchy is legally assembled.

Parameters:
satisfiedContracts - a space delimited string of satisifed contracts

setSatisfiedContracts

public void setSatisfiedContracts(String[] satisfiedContracts)
Sets the possible values for this property. In the component metadata file, the satisfied contracts are noted with satisfied-contracts markup. As an example, af:popup (oracle.adf.view.rich.component.rich.RichPopup) supports oracle-adf-richmenu-holder, oracle-adf-richdialog-holder, oracle-adf-richnotewindow-holder, and oracle-adf-richpanelwindow-holder contracts. The satisfied contracts of a given component are matched with the required ancestor contracts of other components to determine if a component hierarchy is legally assembled.

Parameters:
satisfiedContracts - a string array of the satisfied contracts

satisfiedContracts

public Iterator<String> satisfiedContracts()
Returns an iterator of the satisfied contracts for this component. In the component metadata file, the satisfied contracts are noted with satisfied-contracts markup. As an example, af:popup (oracle.adf.view.rich.component.rich.RichPopup) supports oracle-adf-richmenu-holder, oracle-adf-richdialog-holder, oracle-adf-richnotewindow-holder, and oracle-adf-richpanelwindow-holder contracts. The satisfied contracts of a given component are matched with the required ancestor contracts of other components to determine if a component hierarchy is legally assembled.

Returns:
a java.util.Iterator of Strings, where each string is the name of a satisfied contract

hasSatisfiedContracts

public boolean hasSatisfiedContracts()
Returns true if this component has any satisfied contracts.

Returns:
true if this component has any satisfied contracts, false otherwise

parseRequiredAncestorContracts

public void parseRequiredAncestorContracts(String requiredAncestorContracts)
Parses the string of required ancestor contracts into a String array using space as the separator between values. In the component metadata file, the required ancestors are noted with required-ancestor-contracts markup. This indicates that an ancestor (e.g. parent or grandparent) tag must be have satisfied-contracts metadata matching the required-ancestor-contracts metadata of this tag. As an example, af:dialog (oracle.adf.view.rich.component.rich.RichDialog) lists oracle-adf-richdialog-holder as a required ancestor contract, and af:popup (oracle.adf.view.rich.component.rich.RichPopup) lists oracle-adf-richdialog-holder as a satisified contract.

Parameters:
requiredAncestorContracts - a space delimited string of required ancestor contracts

setRequiredAncestorContracts

public void setRequiredAncestorContracts(String[] requiredAncestorContracts)
Sets the possible values for this property. In the component metadata file, the required ancestors are noted with required-ancestor-contracts markup. This indicates that an ancestor (e.g. parent or grandparent) tag must be have satisfied-contracts metadata matching the required-ancestor-contracts metadata of this tag. As an example, af:dialog (oracle.adf.view.rich.component.rich.RichDialog) lists oracle-adf-richdialog-holder as a required ancestor contract, and af:popup (oracle.adf.view.rich.component.rich.RichPopup) lists oracle-adf-richdialog-holder as a satisified contract.

Parameters:
requiredAncestorContracts - a string array of the required ancestor contracts

requiredAncestorContracts

public Iterator<String> requiredAncestorContracts()
Returns the required ancestor contracts for this component. In the component metadata file, the required ancestors are noted with required-ancestor-contracts markup. This indicates that an ancestor (e.g. parent or grandparent) tag must be have satisfied-contracts metadata matching the required-ancestor-contracts metadata of this tag. As an example, af:dialog (oracle.adf.view.rich.component.rich.RichDialog) lists oracle-adf-richdialog-holder as a required ancestor contract, and af:popup (oracle.adf.view.rich.component.rich.RichPopup) lists oracle-adf-richdialog-holder as a satisified contract.

Returns:
a java.util.Iterator of strings, where each string is the name of a required ancestor contract

hasRequiredAncestorContracts

public boolean hasRequiredAncestorContracts()
Returns true if this component has any required ancestor contracts.

Returns:
true if this component has any required ancestor contracts, false otherwise

addTagClassModifier

public void addTagClassModifier(int modifier)
Adds a Java Language class modifier to the tag class.

Overrides:
addTagClassModifier in class AbstractTagBean
Parameters:
modifier - the modifier to be added

getTagClassModifiers

public int getTagClassModifiers()
Returns the Java Language class modifiers for the tag class. By default, these modifiers include Modifier.PUBLIC.

Overrides:
getTagClassModifiers in class AbstractTagBean
Returns:
the Java Language class modifiers for the tag class

addEvent

public void addEvent(EventRefBean eventRef)
Adds an event to this component.

Parameters:
eventRef - the event to add

hasEvents

public boolean hasEvents()
Returns true if this component has any events.

Returns:
true if this component has any events, false otherwise

hasEvents

public boolean hasEvents(boolean flatten)
Returns true if this component or any component supertype has any events.

Returns:
true if this component or any supertype has any events, false otherwise

findEvent

public EventRefBean findEvent(String eventName)
Returns the event for this event name.

Parameters:
eventName - the event name to find

findEvent

public EventRefBean findEvent(String eventName,
                              boolean flatten)

events

public Iterator<EventRefBean> events()
Returns an iterator for all events on this component only.

Returns:
the event iterator

events

public Iterator<EventRefBean> events(boolean flatten)
Returns an iterator for events on this component.

Parameters:
flatten - true if the iterator should be a combined list of events of this component and its supertype, false otherwise
Returns:
the event iterator

findComponentFamily

public String findComponentFamily()
Finds the component family in the component inheritance hierarchy.

Returns:
the component family

findBehavioralComponent

public ComponentBean findBehavioralComponent()
Finds the behavioral component component inheritance hierarchy.

Returns:
the behavioral component

findRendererType

public String findRendererType()
Finds the renderer type in the component inheritance hierarchy.

Returns:
the renderer type

findComponentSuperclass

public String findComponentSuperclass()
Finds the component superclass in the component inheritance hierarchy.

Returns:
the component superclass

findJspTagSuperclass

public String findJspTagSuperclass()
Finds the tag superclass in the component inheritance hierarchy.

Returns:
the tag superclass

resolveSupertype

public ComponentBean resolveSupertype()
Returns the component supertype instance.

Returns:
the component supertype instance

isTrinidadComponent

public boolean isTrinidadComponent()
Checks if any of the component superclasses is UIXComponentBase


findComponentClass

protected String findComponentClass()
Finds the component class in the component inheritance hierarchy.

Returns:
the component class

findJspTagClass

protected String findJspTagClass()
Finds the tag class in the component inheritance hierarchy.

Returns:
the tag class

attach

protected void attach(FacesConfigBean owner)
Attaches the component and all event references.

Overrides:
attach in class ObjectBean
Parameters:
owner - the faces config owner


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.