public interface ComponentModel
MutableComponentModel
Modifier and Type | Method and Description |
---|---|
Resource |
getBaseResource()
Returns the resource corresponding to the class file for this component.
|
String |
getComponentClassName()
The fully qualified class name of the component.
|
List<String> |
getDeclaredParameterNames()
Returns an alphabetically sorted list of the names of all formal parameters defined by this specific class
(parameters inherited from base classes are not identified).
|
List<String> |
getEmbeddedComponentIds()
Returns the ids of all embedded components defined within the component class (via the
Component annotation), including those defined by any super-class. |
EmbeddedComponentModel |
getEmbeddedComponentModel(String componentId)
Returns an embedded component defined by this component or by a super-class.
|
String |
getFieldPersistenceStrategy(String fieldName)
Returns the persistent strategy associated with the field.
|
Set<Class> |
getHandledRenderPhases()
Returns a set of all the render phases that this model (including parent models) that are handled.
|
String |
getLibraryName()
Returns the name of the library that defines this component; this may be the empty string for
an application page or component, or will be a name of a library (possibly including "core" for built-in
components).
|
org.slf4j.Logger |
getLogger()
Returns object that will be used to log warnings and errors related to this component.
|
String |
getMeta(String key)
Gets a meta value identified by the given key.
|
List<String> |
getMixinClassNames()
Returns a list of the class names of mixins that are part of the component's implementation.
|
String[] |
getOrderForMixin(String mixinClassName) |
ParameterModel |
getParameterModel(String parameterName)
Return a single parameter model by parameter name, or null if the parameter is not defined (is not
a formal parameter).
|
List<String> |
getParameterNames()
Returns an alphabetically sorted list of the names of all formal parameters.
|
ComponentModel |
getParentModel()
Returns the component model for this component's super-class, if it exists.
|
List<String> |
getPersistentFieldNames()
Returns a list of the names of all persistent fields (within this class, or any super-class).
|
boolean |
getSupportsInformalParameters()
Returns true if the model indicates that informal parameters, additional parameters beyond the formal parameter
defined for the component, are supported.
|
boolean |
handleActivationEventContext()
Relevant for pages only, indicates that the component handle the
EventConstants.ACTIVATE
events with a catch all rules |
boolean |
handlesEvent(String eventType)
Determines if the component has an event handler for the indicated event name (case insensitive).
|
boolean |
isFormalParameter(String parameterName)
Returns true if the named parameter is formally defined (there's a ParameterModel).
|
boolean |
isMixinAfter()
Relevant for component mixins only.
|
boolean |
isPage()
Is this a model of a page (rather than a component, mixin, or base-class)?
|
boolean |
isRootClass()
Returns true if the modeled component is a root class, a component class whose parent class is not a component
class.
|
String getLibraryName()
LibraryMapping
contributions
to the ComponentClassResolver
service.boolean isPage()
Resource getBaseResource()
String getComponentClassName()
List<String> getEmbeddedComponentIds()
Component
annotation), including those defined by any super-class.EmbeddedComponentModel getEmbeddedComponentModel(String componentId)
componentId
- the id of the embedded componentString getFieldPersistenceStrategy(String fieldName)
fieldName
- IllegalArgumentException
- if the named field is not marked as persistentorg.slf4j.Logger getLogger()
Log
List<String> getMixinClassNames()
ParameterModel getParameterModel(String parameterName)
parameterName
- the name of the parameter (case is ignored)boolean isFormalParameter(String parameterName)
parameterName
- name of the parameter (case is ignored)List<String> getParameterNames()
List<String> getDeclaredParameterNames()
List<String> getPersistentFieldNames()
Persist
boolean isRootClass()
boolean getSupportsInformalParameters()
SupportsInformalParameters
annotation is present, or inherited from a super-class).ComponentModel getParentModel()
boolean isMixinAfter()
MixinAfter
annotation.String getMeta(String key)
key
- identifies the value to be accessedSet<Class> getHandledRenderPhases()
BeginRender
, AfterRender
, etc.).boolean handlesEvent(String eventType)
eventType
- name of event to check (case insensitive)String[] getOrderForMixin(String mixinClassName)
mixinClassName
- class name of the mixin for which the ordering is desiredboolean handleActivationEventContext()
EventConstants.ACTIVATE
events with a catch all rulesMutableComponentModel.doHandleActivationEventContext()
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.