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)
ControllerAdapter
convertForDisplay
in interface ControllerAdapter
controller
- the controllerattributeName
- the attribute nameinput
- the inputpublic final Object convertForDisplayAnnotation(Controller controller, String attributeName, Object input)
ControllerAdapter
convertForDisplayAnnotation
in interface ControllerAdapter
controller
- the controllerattributeName
- the attribute nameinput
- the inputpublic Object convertForStorage(Controller controller, String attributeName, Object input)
ControllerAdapter
convertForStorage
in interface ControllerAdapter
controller
- the controllerattributeName
- the attribute nameinput
- the inputpublic final Object convertForStorageAnnotation(Controller controller, String attributeName, Object input)
ControllerAdapter
convertForStorageAnnotation
in interface ControllerAdapter
controller
- the controllerattributeName
- the attribute nameinput
- the inputpublic Map<String,Object> getAttributes()
ControllerAdapter
getAttributes
in interface ControllerAdapter
public boolean isEnabled()
ControllerAdapter
isEnabled
in interface ControllerAdapter
public boolean isInitializing()
ControllerAdapter
isInitializing
in interface ControllerAdapter
public 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)
ControllerAdapter
setEnabled
in interface ControllerAdapter
enabled
- the new enabledpublic void setIsInitializing(boolean value)
ControllerAdapter
setIsInitializing
in interface ControllerAdapter
value
- the new checks if is initializingpublic final boolean supportsActionAnnotation(String attributeName)
ControllerAdapter
supportsActionAnnotation
in interface ControllerAdapter
attributeName
- the attribute namepublic final boolean supportsConvertForDisplayAnnotation(String attributeName)
ControllerAdapter
supportsConvertForDisplayAnnotation
in interface ControllerAdapter
attributeName
- the attribute namepublic final boolean supportsConvertForStorageAnnotation(String attributeName)
ControllerAdapter
supportsConvertForStorageAnnotation
in interface ControllerAdapter
attributeName
- the attribute namepublic boolean viewAction(Controller controller, Object source, String attributeName)
ControllerAdapter
viewAction
in interface ControllerAdapter
controller
- the controllersource
- the sourceattributeName
- the attribute namepublic final boolean viewAnnotationAction(Controller controller, Object source, String attributeName)
ControllerAdapter
viewAnnotationAction
in interface ControllerAdapter
controller
- the controllersource
- the sourceattributeName
- the attribute nameCopyright © 2010-2020 Toolsverse. All Rights Reserved.