org.directwebremoting.create
Class AbstractCreator
java.lang.Object
org.directwebremoting.create.AbstractCreator
- All Implemented Interfaces:
- Creator
- Direct Known Subclasses:
- BeanCreator, Ejb3Creator, JsfCreator, NewCreator, NullCreator, PageFlowCreator, ScriptedCreator, SingletonCreator, SpringCreator, StrutsCreator
public abstract class AbstractCreator
- extends java.lang.Object
- implements Creator
A simple implementation of the basic parts of Creator
- Author:
- Joe Walker [joe at getahead dot ltd dot uk]
|
Method Summary |
java.lang.String |
getJavascript()
How is this creator referred to in Javascript land? |
java.lang.String |
getScope()
Each Creator creates objects with a given scope. |
boolean |
isCacheable()
Is the class behind the Creator likely to change over time?
TODO: We should probably remove this. |
void |
setCacheable(boolean cacheable)
|
void |
setJavascript(java.lang.String javascript)
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.String> params)
DefaultConfiguration is done via access to the DOM Element. |
void |
setScope(java.lang.String scope)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractCreator
public AbstractCreator()
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.String> params)
throws java.lang.IllegalArgumentException
- Description copied from interface:
Creator
- DefaultConfiguration is done via access to the DOM Element.
This is not at all ideal, but it will do for the moment.
- Specified by:
setProperties in interface Creator
- Parameters:
params - The map of parameters to configure the creator
- Throws:
java.lang.IllegalArgumentException - If the config data in the Element is invalid
getJavascript
public java.lang.String getJavascript()
- Description copied from interface:
Creator
- How is this creator referred to in Javascript land?
- Specified by:
getJavascript in interface Creator
- Returns:
- Returns the javascript name.
setJavascript
public void setJavascript(java.lang.String javascript)
- Parameters:
javascript - The javascript name to set.
setScope
public void setScope(java.lang.String scope)
- Parameters:
scope - Set the scope.
getScope
public java.lang.String getScope()
- Description copied from interface:
Creator
- Each Creator creates objects with a given scope.
- Specified by:
getScope in interface Creator
- Returns:
- How long do we hold onto instances created by this Creator
isCacheable
public boolean isCacheable()
- Description copied from interface:
Creator
- Is the class behind the Creator likely to change over time?
TODO: We should probably remove this. I suspect that the reason we added
this was to handle ScriptCreator's ability to change things half way
through, and it feels dangerous given the number of caches around the
place.
- Specified by:
isCacheable in interface Creator
- Returns:
- Returns the reloadable variable
setCacheable
public void setCacheable(boolean cacheable)
- Parameters:
cacheable - Whether or not to cache the script.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object