diff --git a/doc/src/technical/howto-develop-a-use-case-in-navalplan.rst b/doc/src/technical/howto-develop-a-use-case-in-navalplan.rst index 288a5f0cd..c11ba8379 100644 --- a/doc/src/technical/howto-develop-a-use-case-in-navalplan.rst +++ b/doc/src/technical/howto-develop-a-use-case-in-navalplan.rst @@ -5,8 +5,8 @@ How To Develop A Use Case In NavalPlan .. sectnum:: :Author: Manuel Rego Casasnovas -:Contact: mrego@igalia.com -:Date: 10/03/2011 +:Contact: rego@igalia.com +:Date: 15/08/2011 :Copyright: Some rights reserved. This document is distributed under the Creative Commons Attribution-ShareAlike 3.0 licence, available in @@ -83,7 +83,7 @@ this behaviour and use it in all the tasks they want. instructions: * Create a PostgreSQL database called ``navaldev`` with permissions for a - user ``naval`` with password ``naval`` (see ``INSTALL`` file for other + user ``naval`` with password ``naval`` (see ``HACKING`` file for other databases and more info). * Compile NavalPlan with the following command from project root folder:: @@ -243,7 +243,8 @@ shown): * * @author Manuel Rego Casasnovas */ - public class StretchesFunctionTemplate extends BaseEntity { + public class StretchesFunctionTemplate extends BaseEntity implements + IHumanIdentifiable { public static StretchesFunctionTemplate create(String name) { return create(new StretchesFunctionTemplate(name)); @@ -260,7 +261,24 @@ shown): protected StretchesFunctionTemplate() { } - ... + ... + + @Override + public String getHumanId() { + return name; + } + + ... + +.. NOTE:: + + ``IHumanIdentifiable`` is an interface that needs a human identifier to show + in application UI. It defines the method ``getHumanId`` that returns a text + identifier of the entity. + + As this entity is going to be edited from NavalPlan web interface, it + implements ``IHumanIdentifiable``. + * ``StretchTemplate.java``: @@ -675,20 +693,26 @@ the same identifier in ``.zul`` and Java. For example: :: - package org.navalplanner.web.planner.allocation.streches; + package org.navalplanner.web.common; ... /** - * CRUD controller for {@link StretchesFunctionTemplate}. + * Abstract class defining common behavior for controllers of CRUD screens.
* - * @author Manuel Rego Casasnovas + * Those screens must define the following components: + *