ariba.ui.aribaweb.core
Class AWComponentDefinition

java.lang.Object
  extended by ariba.ui.aribaweb.util.AWBaseObject
      extended by ariba.ui.aribaweb.core.AWComponentDefinition
All Implemented Interfaces:
AWObject

public class AWComponentDefinition
extends AWBaseObject


Nested Class Summary
 class AWComponentDefinition.ComponentReferenceLocation
           
 class AWComponentDefinition.EmpiricalApiData
           
static interface AWComponentDefinition.ScriptClassProvider
           
 
Field Summary
 
Fields inherited from class ariba.ui.aribaweb.util.AWBaseObject
AribaHashtableClass, AribaVectorClass, ClassClass, EmptyHashtable, EmptyMap, EmptyVector, False, IntegerClass, JavaHashtableClass, JavaMapClass, JavaVectorClass, LogHandling, NullObject, ObjectClass, StringClass, True, UndefinedObject, UndefinedString, UninitializedRealNumber
 
Constructor Summary
AWComponentDefinition()
           
 
Method Summary
 void addBindingReference(AWComponent component, java.lang.String bindingName)
           
 void addEmpiricalBinding(java.lang.String bindingName, AWComponent parent)
          AWApi not defined for element so collect all bindings
 void addInvalidComponentApiAlternate(AWValidationContext validationContext, java.lang.String bindingName, java.lang.String alternateBindingName)
          Called when a binding Api has an alternate specified and the alternate does not have an Api defined.
 void addInvalidComponentApiBindingDefinition(AWValidationContext validationContext, java.lang.String key, int type)
           
 void addInvalidValueForBinding(AWValidationContext validationContext, AWComponent component, java.lang.String bindingName, java.lang.String errorMessage)
           
 void addMismatchedComponentApiAlternates(AWValidationContext validationContext, java.lang.String bindingName, java.lang.String alternateBindingName)
          Called when a binding Api has an alternate specified and the alternate binding Api does not have the same alternate list.
 void addMissingRequiredBinding(AWValidationContext validationContext, AWComponent component, java.lang.String bindingName)
           
 void addPassThroughBinding(AWValidationContext validationContext, AWComponent component, java.lang.String bindingName)
           
 void addReferencedBy(AWComponent component)
          Track the components that reference this component.
 void addUnknownTag(AWValidationContext validationContext, java.lang.String tagName, java.lang.String templateName, int currentLine)
          Strict tag naming is enabled and a tag was found whose name starts with an uppercase character and no corresponding component was found.
 void addUnsupportedBinding(AWValidationContext validationContext, AWComponent component, java.lang.String bindingName)
           
 java.util.List bindingErrorList()
           
 java.util.Map bindingFields()
           
 void checkInSharedComponentInstance(AWComponent componentInstance)
           
 AWApi componentApi()
           
 int componentApiErrorCount()
           
 java.lang.Class componentClass()
           
 int componentDefinitionId()
           
 java.lang.String componentName()
           
 java.lang.String componentNamePath()
           
 java.lang.String componentPackageName()
           
static java.lang.String computeClassNameFromTemplate(java.lang.String templateName)
          Given a template name, compute the associated class name.
static java.lang.String computeTemplateName(java.lang.Class componentClass)
           
static java.lang.String computeTemplateName(java.lang.Class componentClass, java.lang.String extension)
           
static java.lang.String computeTemplateName(java.lang.String className, java.lang.String extension)
           
 AWComponent createComponent(AWComponentReference componentReference, AWComponent parent, AWRequestContext requestContext)
           
 AWTemplate defaultTemplate()
           
 java.util.Map empiricalApiTable()
           
 boolean hasValidationErrors()
           
 void init(java.lang.String componentName, java.lang.Class componentClass)
           
 java.util.List invalidComponentBindingApiAlternates()
           
 boolean isClassless()
          Check whether this component is classless.
 boolean isPageLevel()
           
 boolean isStateless()
           
 void logReloadString(java.lang.String s)
           
 java.util.List mismatchedComponentBindingApiAlternates()
           
 java.util.List missingSupportedBindingDefinitions()
           
 java.lang.String printComponentApiErrors()
           
 java.util.List referencedBy()
           
 java.util.List referencedByLocations()
           
static void registerScriptProvider(java.lang.String tagName, AWComponentDefinition.ScriptClassProvider provider)
           
 void resetValidationData()
           
 java.lang.String resourceClassName(AWComponent componentInstance)
          Get the name of the class where we get our resources from.
 void setIsPageLevel(boolean flag)
           
 void setTemplateName(java.lang.String templateName)
           
 AWComponent sharedComponentInstance()
           
 AWComponentReference sharedComponentReference()
           
 java.lang.String[] supportedBindingNames()
           
 java.lang.String templateName()
           
 java.util.List templateParsingErrors()
          Template Parsing errors
 java.lang.String toString()
           
 java.util.List unsupportedBindingDefinitions()
           
 boolean usesOwnTemplate(AWComponent component)
          Weird method to check if the class has overriden templateName() to return a different template than .awl.
 int validationErrorCount()
           
 
Methods inherited from class ariba.ui.aribaweb.util.AWBaseObject
debugString, ensureFieldValuesClear, getFieldValue, init, isKindOfClass, localizedJavaString, logString, logWarning, setFieldValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AWComponentDefinition

public AWComponentDefinition()
Method Detail

registerScriptProvider

public static void registerScriptProvider(java.lang.String tagName,
                                          AWComponentDefinition.ScriptClassProvider provider)

computeTemplateName

public static java.lang.String computeTemplateName(java.lang.String className,
                                                   java.lang.String extension)

computeTemplateName

public static java.lang.String computeTemplateName(java.lang.Class componentClass,
                                                   java.lang.String extension)

computeTemplateName

public static java.lang.String computeTemplateName(java.lang.Class componentClass)

computeClassNameFromTemplate

public static java.lang.String computeClassNameFromTemplate(java.lang.String templateName)
Given a template name, compute the associated class name.

Parameters:
templateName - - a template name, calculated according to computeTemplateName
Returns:
a fully qualified class name

init

public void init(java.lang.String componentName,
                 java.lang.Class componentClass)

setTemplateName

public void setTemplateName(java.lang.String templateName)

isStateless

public boolean isStateless()

componentName

public java.lang.String componentName()

componentNamePath

public java.lang.String componentNamePath()

isClassless

public boolean isClassless()
Check whether this component is classless. A classless component only has an awl file - no java class.

Returns:
true if this component is classless

componentClass

public java.lang.Class componentClass()

templateName

public java.lang.String templateName()

componentPackageName

public java.lang.String componentPackageName()

resourceClassName

public java.lang.String resourceClassName(AWComponent componentInstance)
Get the name of the class where we get our resources from. This is the class in which we resolve AWLocal references.

Parameters:
componentInstance - - the component whose resource class we're fetching
Returns:
the full class name of the resource class

supportedBindingNames

public java.lang.String[] supportedBindingNames()

sharedComponentReference

public AWComponentReference sharedComponentReference()

componentDefinitionId

public int componentDefinitionId()

componentApi

public AWApi componentApi()

createComponent

public AWComponent createComponent(AWComponentReference componentReference,
                                   AWComponent parent,
                                   AWRequestContext requestContext)

sharedComponentInstance

public AWComponent sharedComponentInstance()

checkInSharedComponentInstance

public void checkInSharedComponentInstance(AWComponent componentInstance)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

defaultTemplate

public AWTemplate defaultTemplate()

bindingFields

public java.util.Map bindingFields()

logReloadString

public void logReloadString(java.lang.String s)

resetValidationData

public void resetValidationData()

bindingErrorList

public java.util.List bindingErrorList()

hasValidationErrors

public boolean hasValidationErrors()

empiricalApiTable

public java.util.Map empiricalApiTable()

validationErrorCount

public int validationErrorCount()

componentApiErrorCount

public int componentApiErrorCount()

addReferencedBy

public void addReferencedBy(AWComponent component)
Track the components that reference this component.

Parameters:
component -

referencedBy

public java.util.List referencedBy()

referencedByLocations

public java.util.List referencedByLocations()

setIsPageLevel

public void setIsPageLevel(boolean flag)

isPageLevel

public boolean isPageLevel()

unsupportedBindingDefinitions

public java.util.List unsupportedBindingDefinitions()

missingSupportedBindingDefinitions

public java.util.List missingSupportedBindingDefinitions()

addInvalidComponentApiBindingDefinition

public void addInvalidComponentApiBindingDefinition(AWValidationContext validationContext,
                                                    java.lang.String key,
                                                    int type)

invalidComponentBindingApiAlternates

public java.util.List invalidComponentBindingApiAlternates()

mismatchedComponentBindingApiAlternates

public java.util.List mismatchedComponentBindingApiAlternates()

addInvalidComponentApiAlternate

public void addInvalidComponentApiAlternate(AWValidationContext validationContext,
                                            java.lang.String bindingName,
                                            java.lang.String alternateBindingName)
Called when a binding Api has an alternate specified and the alternate does not have an Api defined.

Parameters:
validationContext -
bindingName - binding on which an alternate is defined
alternateBindingName - alternate binding name

addMismatchedComponentApiAlternates

public void addMismatchedComponentApiAlternates(AWValidationContext validationContext,
                                                java.lang.String bindingName,
                                                java.lang.String alternateBindingName)
Called when a binding Api has an alternate specified and the alternate binding Api does not have the same alternate list.

Parameters:
validationContext -
bindingName - binding on which an alternate is defined
alternateBindingName - alternate binding name

templateParsingErrors

public java.util.List templateParsingErrors()
Template Parsing errors


addUnknownTag

public void addUnknownTag(AWValidationContext validationContext,
                          java.lang.String tagName,
                          java.lang.String templateName,
                          int currentLine)
Strict tag naming is enabled and a tag was found whose name starts with an uppercase character and no corresponding component was found.

Parameters:
validationContext -
tagName -
templateName -
currentLine -

addUnsupportedBinding

public void addUnsupportedBinding(AWValidationContext validationContext,
                                  AWComponent component,
                                  java.lang.String bindingName)

addInvalidValueForBinding

public void addInvalidValueForBinding(AWValidationContext validationContext,
                                      AWComponent component,
                                      java.lang.String bindingName,
                                      java.lang.String errorMessage)

addMissingRequiredBinding

public void addMissingRequiredBinding(AWValidationContext validationContext,
                                      AWComponent component,
                                      java.lang.String bindingName)

addEmpiricalBinding

public void addEmpiricalBinding(java.lang.String bindingName,
                                AWComponent parent)
AWApi not defined for element so collect all bindings

Parameters:
bindingName - bindind used
parent - component in which the binding is used

addPassThroughBinding

public void addPassThroughBinding(AWValidationContext validationContext,
                                  AWComponent component,
                                  java.lang.String bindingName)

addBindingReference

public void addBindingReference(AWComponent component,
                                java.lang.String bindingName)

printComponentApiErrors

public java.lang.String printComponentApiErrors()

usesOwnTemplate

public boolean usesOwnTemplate(AWComponent component)
Weird method to check if the class has overriden templateName() to return a different template than .awl. (e.g. AWVTextField). In this case, we don't force full AWApi documentation.



AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.