documentation and improved BaseListController
[cdmlib.git] / cdmlib-remote / src / main / java / eu / etaxonomy / cdm / remote / controller / AgentController.java
index dcaf6332f98d8736ae3b57789c4dc4c472adfb9f..331e8d514fa6bc7fcd07b1bb9121765fd511aaef 100644 (file)
@@ -14,18 +14,43 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;\r
 import org.springframework.web.bind.annotation.RequestMapping;\r
 \r
-import eu.etaxonomy.cdm.api.service.AnnotatableServiceBase;\r
 import eu.etaxonomy.cdm.api.service.IAgentService;\r
+import eu.etaxonomy.cdm.api.service.pager.Pager;\r
+import eu.etaxonomy.cdm.database.UpdatableRoutingDataSource;\r
 import eu.etaxonomy.cdm.model.agent.AgentBase;\r
-import eu.etaxonomy.cdm.persistence.dao.common.IAnnotatableDao;\r
+import eu.etaxonomy.cdm.model.common.Annotation;\r
 \r
 /**\r
+ * The AgentController class is a Spring MVC Controller.\r
+ * <p>\r
+ * The syntax of the mapped service URIs contains the the {datasource-name} path element.\r
+ * The available {datasource-name}s are defined in a configuration file which\r
+ * is loaded by the {@link UpdatableRoutingDataSource}. If the\r
+ * UpdatableRoutingDataSource is not being used in the actual application\r
+ * context any arbitrary {datasource-name} may be used.\r
+ * <p>\r
+ * Methods mapped at type level, inherited from super classes ({@link BaseController}):\r
+ * <blockquote>\r
+ * URI: <b>&#x002F;{datasource-name}&#x002F;agent&#x002F;name&#x002F;{agent-uuid}</b>\r
+ * \r
+ * Get the {@link AgentBase} instance identified by the <code>{agent-uuid}</code>.\r
+ * The returned AgentBase is initialized by\r
+ * the default initialization strategy: {@link #DEFAULT_INIT_STRATEGY}\r
+ * </blockquote>\r
+ * <blockquote>\r
+ * URI: <b>&#x002F;{datasource-name}&#x002F;agent&#x002F;name&#x002F;{agent-uuid}&#x002F;annotation</b>\r
+ * \r
+ * Returns a {@link Pager} on the {@link Annotation}s for the {@link AgentBase} instance identified by the\r
+ * <code>{agent-uuid}</code>.\r
+ * The returned AgentBase instances are initialized by\r
+ * the following strategy: {@link #ANNOTATION_INIT_STRATEGY}\r
+ * </blockquote>\r
+ * \r
  * @author a.kohlbecker\r
  * @date 24.03.2009\r
  */\r
-\r
 @Controller\r
-@RequestMapping(value = {"/*/agent/*","/*/agent/annotation/*"})\r
+@RequestMapping(value = {"/*/agent/*","/*/agent/*/annotation"})\r
 public class AgentController extends AnnotatableController<AgentBase, IAgentService>\r
 {\r
 \r