|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl
public class ComponentPageElementResourcesImpl
Constructor Summary | |
---|---|
ComponentPageElementResourcesImpl(ComponentResourceSelector selector,
ComponentMessagesSource componentMessagesSource,
TypeCoercer typeCoercer,
ComponentClassCache componentClassCache,
ContextValueEncoder contextValueEncoder,
LinkSource linkSource,
RequestPageCache requestPageCache,
ComponentClassResolver componentClassResolver,
LoggerSource loggerSource,
OperationTracker tracker,
PerthreadManager perThreadManager)
|
Method Summary | ||
---|---|---|
|
coerce(S input,
Class<T> targetType)
Performs a coercion from an input type to a desired output type. |
|
Link |
createComponentEventLink(ComponentResources resources,
String eventType,
boolean forForm,
Object... context)
Creates a link on behalf of a component. |
|
Link |
createPageRenderLink(Class pageClass,
boolean override,
Object... context)
Creates a page render request link to render a specific page. |
|
Link |
createPageRenderLink(String pageName,
boolean override,
Object... context)
Creates a page render request link to render a specific page. |
|
|
createPerThreadValue()
Wrapper around PerthreadManager.createValue() . |
|
org.slf4j.Logger |
getEventLogger(org.slf4j.Logger componentLogger)
Returns the event logger for the provided component logger. |
|
Messages |
getMessages(ComponentModel componentModel)
Used to obtain a Messages instance for a particular component. |
|
ComponentResourceSelector |
getSelector()
Returns the selector associated with this resources. |
|
|
invoke(String description,
Invokable<T> operation)
Executes the operation, returning its value. |
|
void |
run(String description,
Runnable operation)
Executes the operation. |
|
Class |
toClass(String className)
Gets the Class instance for then give name. |
|
String |
toClient(Object value)
Converts a context value into a client-side string (that will ultimately be encoded into a URL). |
|
|
toValue(Class<T> requiredType,
String clientValue)
Converts a client value back into a server-side object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ComponentPageElementResourcesImpl(ComponentResourceSelector selector, ComponentMessagesSource componentMessagesSource, TypeCoercer typeCoercer, ComponentClassCache componentClassCache, ContextValueEncoder contextValueEncoder, LinkSource linkSource, RequestPageCache requestPageCache, ComponentClassResolver componentClassResolver, LoggerSource loggerSource, OperationTracker tracker, PerthreadManager perThreadManager)
Method Detail |
---|
public ComponentResourceSelector getSelector()
ComponentPageElementResources
getSelector
in interface ComponentPageElementResources
public Messages getMessages(ComponentModel componentModel)
ComponentPageElementResources
Messages
instance for a particular component. If the component
extends from another component, then its localized properties will merge with its parent's properties (with the
subclass overriding the super class on any conflicts).
getMessages
in interface ComponentPageElementResources
ComponentMessagesSource
public <S,T> T coerce(S input, Class<T> targetType)
ComponentPageElementResources
coerce
in interface ComponentPageElementResources
S
- source type (input)T
- target type (output)targetType
- defines the target type
TypeCoercer
public Class toClass(String className)
ComponentPageElementResources
toClass
in interface ComponentPageElementResources
className
- fully qualified class name
ComponentClassCache
public Link createComponentEventLink(ComponentResources resources, String eventType, boolean forForm, Object... context)
ComponentPageElementResources
createComponentEventLink
in interface ComponentPageElementResources
resources
- resources for the componenteventType
- type of event to createforForm
- true if generating for a form submissioncontext
- additional event context associated with the link
public Link createPageRenderLink(String pageName, boolean override, Object... context)
ComponentPageElementResources
createPageRenderLink
in interface ComponentPageElementResources
pageName
- the logical name of the page to link tooverride
- if true, the context is used even if empty (normally, the target page is allowed to passivate,
providing a context, when the provided context is empty)context
- the activation context for the page. If omitted, the activation context is obtained from the
target page
public Link createPageRenderLink(Class pageClass, boolean override, Object... context)
ComponentPageElementResources
createPageRenderLink
in interface ComponentPageElementResources
pageClass
- identifies the page to link tooverride
- if true, the context is used even if empty (normally, the target page is allowed to passivate,
providing a context, when the provided context is empty)context
- the activation context for the page. If omitted, the activation context is obtained from the
target page
public org.slf4j.Logger getEventLogger(org.slf4j.Logger componentLogger)
ComponentPageElementResources
getEventLogger
in interface ComponentPageElementResources
componentLogger
- provides base name for logger
public String toClient(Object value)
ContextValueEncoder
toClient
in interface ContextValueEncoder
value
- to convert (may not be null)
ValueEncoder.toClient(Object)
public <T> T toValue(Class<T> requiredType, String clientValue)
ContextValueEncoder
toValue
in interface ContextValueEncoder
requiredType
- required type to convert the string toclientValue
- value obtained from context passed from client
ValueEncoder.toValue(String)
public <T> T invoke(String description, Invokable<T> operation)
OperationTracker
invoke
in interface OperationTracker
description
- used if there is an exceptionoperation
- to invoke
public void run(String description, Runnable operation)
OperationTracker
run
in interface OperationTracker
description
- used if there is an exceptionoperation
- to executepublic <T> PerThreadValue<T> createPerThreadValue()
ComponentPageElementResources
PerthreadManager.createValue()
.
createPerThreadValue
in interface ComponentPageElementResources
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |