org.directwebremoting.spring
Class CreatorConfig

java.lang.Object
  extended by org.directwebremoting.spring.AbstractConfig
      extended by org.directwebremoting.spring.CreatorConfig

public class CreatorConfig
extends AbstractConfig

The configuration for a creator.
You can either specify the creator directly or specify one of the build in creator types, for instance "new". It allows the specification of the following optional configuration parameters:

Author:
Bram Smeets, Joe Walker [joe at getahead dot ltd dot uk]
See Also:
AccessControl.addIncludeRule(String, String), AccessControl.addExcludeRule(String, String), AccessControl.addRoleRestriction(String, String, String), AjaxFilter, AjaxFilterManager.addAjaxFilter(org.directwebremoting.AjaxFilter, String)

Constructor Summary
CreatorConfig()
           
 
Method Summary
 void addAuth(java.lang.String method, java.lang.String role)
          Convenience method for adding an authentication rule.
 void addFilter(AjaxFilter filter)
          Convenience method for adding a filter.
 java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAuth()
          Sets the authentication parameters for this creator.
 Creator getCreator()
          The creator that will be used to create new objects for remoting
 java.lang.String getCreatorType()
          The creator type that will be used to create new objects for remoting
 java.util.List<?> getFilters()
          Gets the list of all filters for this creator.
 void setAuth(java.util.Map<java.lang.String,java.util.List<java.lang.String>> auth)
          Sets the authentication parameters for this creator.
 void setCreator(Creator creator)
          The creator type that will be used to create new objects for remoting
 void setCreatorType(java.lang.String creatorType)
          The creator that will be used to create new objects for remoting
 void setFilters(java.util.List<java.lang.Object> filters)
          Sets the list of all filters for this creator.
 
Methods inherited from class org.directwebremoting.spring.AbstractConfig
addExclude, addInclude, getExcludes, getIncludes, getParams, setExcludes, setIncludes, setParams
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreatorConfig

public CreatorConfig()
Method Detail

getCreatorType

public java.lang.String getCreatorType()
The creator type that will be used to create new objects for remoting

Returns:
Returns the creator type.

setCreatorType

public void setCreatorType(java.lang.String creatorType)
The creator that will be used to create new objects for remoting

Parameters:
creatorType - The creator type to set.

getCreator

public Creator getCreator()
The creator that will be used to create new objects for remoting

Returns:
Returns the creator.

setCreator

public void setCreator(Creator creator)
The creator type that will be used to create new objects for remoting

Parameters:
creator - The creator to set.

getAuth

public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAuth()
Sets the authentication parameters for this creator.

Returns:
the map containing the method name and the corrosponding required role
See Also:
AccessControl.addRoleRestriction(String, String, String)

setAuth

public void setAuth(java.util.Map<java.lang.String,java.util.List<java.lang.String>> auth)
Sets the authentication parameters for this creator.

Parameters:
auth - the map containing the method name and the corresponding required role
See Also:
AccessControl.addRoleRestriction(String, String, String)

getFilters

public java.util.List<?> getFilters()
Gets the list of all filters for this creator.

Returns:
the list containing all filters
See Also:
AjaxFilter, AjaxFilterManager.addAjaxFilter(org.directwebremoting.AjaxFilter, String)

setFilters

public void setFilters(java.util.List<java.lang.Object> filters)
Sets the list of all filters for this creator.

Parameters:
filters - the list containing all filters
See Also:
AjaxFilter, AjaxFilterManager.addAjaxFilter(org.directwebremoting.AjaxFilter, String)

addAuth

public void addAuth(java.lang.String method,
                    java.lang.String role)
Convenience method for adding an authentication rule.

Parameters:
method - the method to add the authentication rule
role - the role to add the authentication constraint for
Throws:
java.lang.IllegalArgumentException - in case the specified argument is null

addFilter

public void addFilter(AjaxFilter filter)
Convenience method for adding a filter.

Parameters:
filter - the filter to add for this creator
Throws:
java.lang.IllegalArgumentException - in case the specified argument is null

Copyright 2008