org.richfaces.cdk
Class RichFacesConventions

java.lang.Object
  extended by org.richfaces.cdk.RichFacesConventions
All Implemented Interfaces:
NamingConventions

public final class RichFacesConventions
extends java.lang.Object
implements NamingConventions

Author:
asmirnov@exadel.com

Constructor Summary
RichFacesConventions()
           
 
Method Summary
protected  java.lang.String getBaseName()
          

 ClassName inferBehaviorClass(FacesId id)
          

Infer name for generated behavior class by type

 FacesId inferBehaviorType(ClassName targetClass)
          

Infer behavior type by class name

 FacesId inferComponentType(ClassName componentClass)
          

Calculates component type from class name.

 ClassName inferRendererClass(FacesId id)
          

Infer Java class name by renderer type.

 FacesId inferRendererFamily(FacesId type)
          

Infer renderer family by renderer type

 FacesId inferRendererType(ClassName targetClass)
          

Determine renderer type by Java class

 FacesId inferRendererType(FacesId id)
          

Infer renderer type by component type or family.

 FacesId inferRendererTypeByTemplatePath(java.lang.String templateName)
          

Infer renderer type from template file path

 ClassName inferTagHandlerClass(FacesId componentType, java.lang.String markup)
          

 java.lang.String inferTaglibName(java.lang.String uri)
          

Infer short taglib name from URI

 java.lang.String inferTaglibUri(ComponentLibrary library)
          

Determine default taglib uri from library model.

 java.lang.String inferTagName(FacesId componentType)
          

Infer VDL tag name by component type

 ClassName inferUIComponentClass(FacesId componentType)
          

Calculates concrete component class from explicit value or type.

 FacesId inferUIComponentFamily(FacesId componentType)
          

Infer component family by component type

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RichFacesConventions

public RichFacesConventions()
Method Detail

inferComponentType

public FacesId inferComponentType(ClassName componentClass)
                           throws InvalidNameException
Description copied from interface: NamingConventions

Calculates component type from class name.

Specified by:
inferComponentType in interface NamingConventions
Returns:
JSF component type.
Throws:
InvalidNameException - if className does not match naming conventions.

inferUIComponentClass

public ClassName inferUIComponentClass(FacesId componentType)
                                throws InvalidNameException
Description copied from interface: NamingConventions

Calculates concrete component class from explicit value or type.

Specified by:
inferUIComponentClass in interface NamingConventions
Parameters:
componentType - JSF component type.
Returns:
Descriptor of generated UIComponent class.
Throws:
InvalidNameException - if component type does not follow naming conventions.

inferUIComponentFamily

public FacesId inferUIComponentFamily(FacesId componentType)
Description copied from interface: NamingConventions

Infer component family by component type

Specified by:
inferUIComponentFamily in interface NamingConventions
Returns:

inferTagHandlerClass

public ClassName inferTagHandlerClass(FacesId componentType,
                                      java.lang.String markup)
Description copied from interface: NamingConventions

Specified by:
inferTagHandlerClass in interface NamingConventions
Returns:

inferTagName

public java.lang.String inferTagName(FacesId componentType)
Description copied from interface: NamingConventions

Infer VDL tag name by component type

Specified by:
inferTagName in interface NamingConventions
Returns:

getBaseName

protected java.lang.String getBaseName()

Returns:
the baseName

inferRendererTypeByTemplatePath

public FacesId inferRendererTypeByTemplatePath(java.lang.String templateName)
Description copied from interface: NamingConventions

Infer renderer type from template file path

Specified by:
inferRendererTypeByTemplatePath in interface NamingConventions
Returns:

inferBehaviorClass

public ClassName inferBehaviorClass(FacesId id)
Description copied from interface: NamingConventions

Infer name for generated behavior class by type

Specified by:
inferBehaviorClass in interface NamingConventions
Returns:

inferBehaviorType

public FacesId inferBehaviorType(ClassName targetClass)
Description copied from interface: NamingConventions

Infer behavior type by class name

Specified by:
inferBehaviorType in interface NamingConventions
Returns:

inferTaglibName

public java.lang.String inferTaglibName(java.lang.String uri)
                                 throws InvalidNameException
Description copied from interface: NamingConventions

Infer short taglib name from URI

Specified by:
inferTaglibName in interface NamingConventions
Returns:
Throws:
InvalidNameException

inferTaglibUri

public java.lang.String inferTaglibUri(ComponentLibrary library)
Description copied from interface: NamingConventions

Determine default taglib uri from library model.

Specified by:
inferTaglibUri in interface NamingConventions
Returns:

inferRendererClass

public ClassName inferRendererClass(FacesId id)
Description copied from interface: NamingConventions

Infer Java class name by renderer type.

Specified by:
inferRendererClass in interface NamingConventions
Returns:

inferRendererFamily

public FacesId inferRendererFamily(FacesId type)
Description copied from interface: NamingConventions

Infer renderer family by renderer type

Specified by:
inferRendererFamily in interface NamingConventions
Returns:

inferRendererType

public FacesId inferRendererType(ClassName targetClass)
Description copied from interface: NamingConventions

Determine renderer type by Java class

Specified by:
inferRendererType in interface NamingConventions
Returns:

inferRendererType

public FacesId inferRendererType(FacesId id)
Description copied from interface: NamingConventions

Infer renderer type by component type or family.

Specified by:
inferRendererType in interface NamingConventions
Returns:


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.