eu.etaxonomy.cdm.remote.controller
Class BaseController<T extends CdmBase,SERVICE extends IService<T>>

java.lang.Object
  extended by eu.etaxonomy.cdm.remote.controller.AbstractController<T,SERVICE>
      extended by eu.etaxonomy.cdm.remote.controller.BaseController<T,SERVICE>
Type Parameters:
T -
SERVICE -
Direct Known Subclasses:
AgentController, ClassificationController, ClassificationPortalController, DescriptionController, DescriptionPortalController, EventBaseController, ExternalGeoController, FeatureNodeController, FeatureTreeController, MediaController, MediaPortalController, NameCatalogueController, NameController, NamePortalController, OccurrenceController, OccurrencePortalController, PolytomousKeyController, PolytomousKeyNodeController, PolytomousKeyPortalController, ReferenceController, TaxonController, TaxonNodeController, TaxonPortalController, TermController, VocabularyController

public abstract class BaseController<T extends CdmBase,SERVICE extends IService<T>>
extends AbstractController<T,SERVICE>

based on org.cateproject.controller.common

Author:
b.clark, a.kohlbecker

Field Summary
protected  Class<T> baseClass
           
 
Fields inherited from class eu.etaxonomy.cdm.remote.controller.AbstractController
DEFAULT_INIT_STRATEGY, DEFAULT_PAGE_SIZE, initializationStrategy, logger, service
 
Constructor Summary
BaseController()
           
 
Method Summary
 T doGet(UUID uuid, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.springframework.web.servlet.ModelAndView doGetMethod(UUID uuid, Integer pageNumber, Integer pageSize, Integer start, Integer limit, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected
<CDM_BASE extends CdmBase>
CDM_BASE
getCdmBaseInstance(Class<CDM_BASE> clazz, IService<CDM_BASE> service, UUID uuid, javax.servlet.http.HttpServletResponse response, List<String> pathProperties)
           
protected
<SUB_T extends T>
SUB_T
getCdmBaseInstance(Class<SUB_T> clazz, UUID uuid, javax.servlet.http.HttpServletResponse response, List<String> pathProperties)
           
protected
<SUB_T extends T>
SUB_T
getCdmBaseInstance(Class<SUB_T> clazz, UUID uuid, javax.servlet.http.HttpServletResponse response, String pathProperty)
           
protected  T getCdmBaseInstance(UUID uuid, javax.servlet.http.HttpServletResponse response, List<String> pathProperties)
           
protected  T getCdmBaseInstance(UUID uuid, javax.servlet.http.HttpServletResponse response, String pathProperty)
           
 Object getCdmBaseProperty(UUID uuid, String property, javax.servlet.http.HttpServletResponse response)
           
 void initBinder(org.springframework.web.bind.WebDataBinder binder)
           
 
Methods inherited from class eu.etaxonomy.cdm.remote.controller.AbstractController
requestPathAndQuery, setInitializationStrategy, setService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

baseClass

protected Class<T extends CdmBase> baseClass
Constructor Detail

BaseController

public BaseController()
Method Detail

initBinder

@InitBinder
public void initBinder(org.springframework.web.bind.WebDataBinder binder)

doGet

@RequestMapping(method=GET)
public T doGet(@PathVariable(value="uuid")
                              UUID uuid,
                              javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response)
                        throws IOException
Throws:
IOException

doGetMethod

@RequestMapping(value="*",
                method=GET)
public org.springframework.web.servlet.ModelAndView doGetMethod(@PathVariable(value="uuid")
                                                                               UUID uuid,
                                                                               @RequestParam(value="pageNumber",required=false)
                                                                               Integer pageNumber,
                                                                               @RequestParam(value="pageSize",required=false)
                                                                               Integer pageSize,
                                                                               @RequestParam(value="start",required=false)
                                                                               Integer start,
                                                                               @RequestParam(value="limit",required=false)
                                                                               Integer limit,
                                                                               javax.servlet.http.HttpServletRequest request,
                                                                               javax.servlet.http.HttpServletResponse response)
                                                         throws IOException
Parameters:
uuid -
request -
response -
Returns:
Throws:
IOException - TODO implement bulk version of this method

getCdmBaseProperty

public Object getCdmBaseProperty(UUID uuid,
                                 String property,
                                 javax.servlet.http.HttpServletResponse response)
                          throws IOException
Throws:
IOException

getCdmBaseInstance

protected final <SUB_T extends T> SUB_T getCdmBaseInstance(Class<SUB_T> clazz,
                                                           UUID uuid,
                                                           javax.servlet.http.HttpServletResponse response,
                                                           List<String> pathProperties)
                                            throws IOException
Type Parameters:
SUB_T -
Parameters:
clazz -
uuid -
response -
pathProperties -
Returns:
Throws:
IOException

getCdmBaseInstance

protected final <SUB_T extends T> SUB_T getCdmBaseInstance(Class<SUB_T> clazz,
                                                           UUID uuid,
                                                           javax.servlet.http.HttpServletResponse response,
                                                           String pathProperty)
                                            throws IOException
Type Parameters:
SUB_T -
Parameters:
clazz -
uuid -
response -
pathProperty -
Returns:
Throws:
IOException

getCdmBaseInstance

protected final T getCdmBaseInstance(UUID uuid,
                                     javax.servlet.http.HttpServletResponse response,
                                     String pathProperty)
                                              throws IOException
Parameters:
uuid -
response -
pathProperty -
Returns:
Throws:
IOException

getCdmBaseInstance

protected final T getCdmBaseInstance(UUID uuid,
                                     javax.servlet.http.HttpServletResponse response,
                                     List<String> pathProperties)
                                              throws IOException
Parameters:
uuid -
response -
pathProperties -
Returns:
Throws:
IOException

getCdmBaseInstance

protected final <CDM_BASE extends CdmBase> CDM_BASE getCdmBaseInstance(Class<CDM_BASE> clazz,
                                                                       IService<CDM_BASE> service,
                                                                       UUID uuid,
                                                                       javax.servlet.http.HttpServletResponse response,
                                                                       List<String> pathProperties)
                                                     throws IOException
Type Parameters:
CDM_BASE -
Parameters:
clazz -
service -
uuid -
response -
pathProperties -
Returns:
Throws:
IOException


Copyright © 2007-2013 EDIT. All Rights Reserved.