public abstract class ControllerAdapterImpl extends Object implements ControllerAdapter
| Constructor and Description |
|---|
ControllerAdapterImpl()
Instantiates a new ControllerAdapterImpl.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
addComponent(View view,
Object component)
Adds the component.
|
Object |
addComponent(View view,
Object component,
long behavior)
Adds the component using behavior modifier.
|
void |
addControllerAdapters(View view)
Registers itself in the view and initializes MVC.
|
Object |
convertForDisplay(Controller controller,
String attributeName,
Object input)
Converts value before sending it to the view.
|
Object |
convertForDisplayAnnotation(Controller controller,
String attributeName,
Object input)
Converts value before sending it to the view.
|
Object |
convertForStorage(Controller controller,
String attributeName,
Object input)
Converts value before sending it to the model.
|
Object |
convertForStorageAnnotation(Controller controller,
String attributeName,
Object input)
Converts value before sending it to the model.
|
Map<String,Object> |
getAttributes()
Gets the attributes.
|
boolean |
isEnabled()
Checks if ControllerAdapter is enabled.
|
boolean |
isInitializing()
Checks if controller is in process of initialization.
|
void |
removeComponent(View view,
Object component)
Removes the component.
|
void |
removeControllerAdapters(View view)
Removes the controller adapter.
|
void |
replaceAttrNames(String suffix)
Replaces attribute names using adapre's substitution map and a suffix.
|
void |
replaceAttrNames(String suffix,
Map<String,String> map,
boolean exclude)
Replaces attribute names using given substitution map, suffix and a
exclude flag.
|
void |
setEnabled(boolean enabled)
Sets the enabled flag.
|
void |
setIsInitializing(boolean value)
Sets the checks if is initializing.
|
boolean |
supportsActionAnnotation(String attributeName)
Returns true if ViewAction annotation is supported for the attribute.
|
boolean |
supportsConvertForDisplayAnnotation(String attributeName)
Returns true if ConvertForDisplay annotation is supported for the attribute.
|
boolean |
supportsConvertForStorageAnnotation(String attributeName)
Returns true if ConvertForStorage annotation is supported for the attribute.
|
boolean |
viewAction(Controller controller,
Object source,
String attributeName)
This is an event handler for all action events.
|
boolean |
viewAnnotationAction(Controller controller,
Object source,
String attributeName)
Event handler for the particular action event.
|
public ControllerAdapterImpl()
public Object addComponent(View view, Object component)
view - the viewcomponent - the componentpublic Object addComponent(View view, Object component, long behavior)
view - the viewcomponent - the componentbehavior - the behavior modifierpublic void addControllerAdapters(View view)
view - the viewpublic Object convertForDisplay(Controller controller, String attributeName, Object input)
ControllerAdapterconvertForDisplay in interface ControllerAdaptercontroller - the controllerattributeName - the attribute nameinput - the inputpublic final Object convertForDisplayAnnotation(Controller controller, String attributeName, Object input)
ControllerAdapterconvertForDisplayAnnotation in interface ControllerAdaptercontroller - the controllerattributeName - the attribute nameinput - the inputpublic Object convertForStorage(Controller controller, String attributeName, Object input)
ControllerAdapterconvertForStorage in interface ControllerAdaptercontroller - the controllerattributeName - the attribute nameinput - the inputpublic final Object convertForStorageAnnotation(Controller controller, String attributeName, Object input)
ControllerAdapterconvertForStorageAnnotation in interface ControllerAdaptercontroller - the controllerattributeName - the attribute nameinput - the inputpublic Map<String,Object> getAttributes()
ControllerAdaptergetAttributes in interface ControllerAdapterpublic boolean isEnabled()
ControllerAdapterisEnabled in interface ControllerAdapterpublic boolean isInitializing()
ControllerAdapterisInitializing in interface ControllerAdapterpublic void removeComponent(View view, Object component)
view - the viewcomponent - the componentpublic void removeControllerAdapters(View view)
view - the viewpublic void replaceAttrNames(String suffix)
suffix - the suffixpublic void replaceAttrNames(String suffix,
Map<String,String> map,
boolean exclude)
suffix - the suffixmap - the substitution mapexclude - the exclude flagpublic void setEnabled(boolean enabled)
ControllerAdaptersetEnabled in interface ControllerAdapterenabled - the new enabledpublic void setIsInitializing(boolean value)
ControllerAdaptersetIsInitializing in interface ControllerAdaptervalue - the new checks if is initializingpublic final boolean supportsActionAnnotation(String attributeName)
ControllerAdaptersupportsActionAnnotation in interface ControllerAdapterattributeName - the attribute namepublic final boolean supportsConvertForDisplayAnnotation(String attributeName)
ControllerAdaptersupportsConvertForDisplayAnnotation in interface ControllerAdapterattributeName - the attribute namepublic final boolean supportsConvertForStorageAnnotation(String attributeName)
ControllerAdaptersupportsConvertForStorageAnnotation in interface ControllerAdapterattributeName - the attribute namepublic boolean viewAction(Controller controller, Object source, String attributeName)
ControllerAdapterviewAction in interface ControllerAdaptercontroller - the controllersource - the sourceattributeName - the attribute namepublic final boolean viewAnnotationAction(Controller controller, Object source, String attributeName)
ControllerAdapterviewAnnotationAction in interface ControllerAdaptercontroller - the controllersource - the sourceattributeName - the attribute nameCopyright © 2010-2020 Toolsverse. All Rights Reserved.