r81 - in trunk/chorem-web/src/main/java/org/chorem: billy/action bonzoms/action gepeto/action
Author: vbriand Date: 2011-04-14 10:44:10 +0200 (Thu, 14 Apr 2011) New Revision: 81 Url: http://chorem.org/repositories/revision/chorem/81 Log: Fixed multiple @returns in Javadoc Modified: trunk/chorem-web/src/main/java/org/chorem/billy/action/QuotationAction.java trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/CompanyAction.java trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/ContactDetailsAction.java trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/EmploymentContractAction.java trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/PersonAction.java trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectOrderAction.java trunk/chorem-web/src/main/java/org/chorem/gepeto/action/TaskAction.java Modified: trunk/chorem-web/src/main/java/org/chorem/billy/action/QuotationAction.java =================================================================== --- trunk/chorem-web/src/main/java/org/chorem/billy/action/QuotationAction.java 2011-04-14 01:44:18 UTC (rev 80) +++ trunk/chorem-web/src/main/java/org/chorem/billy/action/QuotationAction.java 2011-04-14 08:44:10 UTC (rev 81) @@ -37,9 +37,9 @@ /** * Adds a new quotation * - * @return INPUT if the mandatory fields haven't all been filled in - * @return SUCCESS if the quotation has been added - * @return ERROR if an error occurred + * @return INPUT if the mandatory fields haven't all been filled in, + * SUCCESS if the quotation has been added, + * ERROR if an error occurred */ public String add() { String result = INPUT; @@ -79,9 +79,8 @@ * Retrieves the information of the quotation referenced by the * quotationId * - * @return SUCCESS if the information have been retrieved - * @return ERROR either if the UUID is invalid or the quotationId doesn't - * exist + * @return SUCCESS if the information have been retrieved, + * ERROR either if the UUID is invalid or the quotationId doesn't exist */ public String quotationDetails() { String result = SUCCESS; @@ -126,8 +125,7 @@ /** * Returns the project order linked with the quotation (if it exists) * - * @return the project order if it exists - * @return null if it doesn't exist + * @return the project order if it exists, null otherwise */ public ProjectOrder getProjectOrder() { ChoremProxy proxy = getChoremProxy(); @@ -142,8 +140,8 @@ /** * Stores the new quotation through the proxy * - * @return true if the quotation has been stored properly - * @return false if a problem occurred + * @return true if the quotation has been stored properly, + * false if a problem occurred */ protected boolean addQuotation() { boolean result = true; Modified: trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/CompanyAction.java =================================================================== --- trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/CompanyAction.java 2011-04-14 01:44:18 UTC (rev 80) +++ trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/CompanyAction.java 2011-04-14 08:44:10 UTC (rev 81) @@ -1,13 +1,20 @@ package org.chorem.bonzoms.action; +import java.util.List; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.ChoremProxy; import org.chorem.ContactDetailsConstants; import org.chorem.action.BaseAction; +import org.chorem.entities.Company; import org.chorem.entities.CompanyImpl; import org.chorem.entities.ContactDetailsImpl; +import org.nuiton.wikitty.search.Criteria; +import org.nuiton.wikitty.search.Search; +import com.opensymphony.xwork2.ActionContext; + import static org.nuiton.i18n.I18n.n_; /** @@ -20,7 +27,11 @@ private static final long serialVersionUID = 2266576941588474102L; private static final Log log = LogFactory.getLog(CompanyAction.class); - + + static public CompanyAction getAction() { + return (CompanyAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY); + } + public String add() { String result = INPUT; @@ -54,8 +65,8 @@ /** * Stores the new company through the proxy * - * @return true if the company has been stored properly - * @return false if a problem occurred + * @return true if the company has been stored properly, + * false if a problem occurred */ protected boolean addCompany() { boolean result = true; Modified: trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/ContactDetailsAction.java =================================================================== --- trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/ContactDetailsAction.java 2011-04-14 01:44:18 UTC (rev 80) +++ trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/ContactDetailsAction.java 2011-04-14 08:44:10 UTC (rev 81) @@ -22,9 +22,9 @@ /** * Adds new contact details * - * @return INPUT if the mandatory fields haven't all been filled in - * @return SUCCESS if the contact details have been added successfully - * @return ERROR if an error occurred + * @return INPUT if the mandatory fields haven't all been filled in, + * SUCCESS if the contact details have been added successfully, + * ERROR if an error occurred */ public String add() { String result = INPUT; @@ -49,8 +49,8 @@ /** * Stores the new contact details through the proxy * - * @return true if the contact details have been stored properly - * @return false if a problem occurred + * @return true if the contact details have been stored properly, + * false if a problem occurred */ protected boolean addContactDetails() { boolean result = true; Modified: trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/EmploymentContractAction.java =================================================================== --- trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/EmploymentContractAction.java 2011-04-14 01:44:18 UTC (rev 80) +++ trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/EmploymentContractAction.java 2011-04-14 08:44:10 UTC (rev 81) @@ -26,9 +26,9 @@ /** * Adds a new employment contract * - * @return INPUT if the mandatory fields haven't all been filled in - * @return SUCCESS if the employment contract has been added successfully - * @return ERROR if an error occurred + * @return INPUT if the mandatory fields haven't all been filled in, + * SUCCESS if the employment contract has been added successfully, + * ERROR if an error occurred */ public String add() { String result = INPUT; @@ -59,8 +59,8 @@ /** * Stores the new employment contract through the proxy * - * @return true if the employment contract has been stored properly - * @return false if a problem occurred + * @return true if the employment contract has been stored properly, + * false if a problem occurred */ protected boolean addEmploymentContract() { boolean result = true; Modified: trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/PersonAction.java =================================================================== --- trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/PersonAction.java 2011-04-14 01:44:18 UTC (rev 80) +++ trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/PersonAction.java 2011-04-14 08:44:10 UTC (rev 81) @@ -27,9 +27,9 @@ /** * Adds a new person * - * @return INPUT if the mandatory fields haven't all been filled in - * @return SUCCESS if the person has been added successfully - * @return ERROR if an error occurred + * @return INPUT if the mandatory fields haven't all been filled in, + * SUCCESS if the person has been added successfully, + * ERROR if an error occurred */ public String add() { String result = INPUT; @@ -63,8 +63,8 @@ /** * Stores the new person through the proxy * - * @return true if the person has been stored properly - * @return false if a problem occurred + * @return true if the person has been stored properly, + * false if a problem occurred */ protected boolean addPerson() { boolean result = true; Modified: trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java =================================================================== --- trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java 2011-04-14 01:44:18 UTC (rev 80) +++ trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java 2011-04-14 08:44:10 UTC (rev 81) @@ -39,9 +39,9 @@ /** * Adds a new project * - * @return INPUT if the mandatory fields haven't all been filled in - * @return SUCCESS if the project has been added - * @return ERROR if an error occurred + * @return INPUT if the mandatory fields haven't all been filled in, + * SUCCESS if the project has been added, + * ERROR if an error occurred */ public String add() { String result = INPUT; @@ -64,9 +64,8 @@ * Retrieves the name and the description of the project referenced by the * projectId * - * @return SUCCESS if the name and the description have been retrieved - * @return ERROR either if the UUID is invalid or the projectId doesn't - * exist + * @return SUCCESS if the name and the description have been retrieved, + * ERROR either if the UUID is invalid or the projectId doesn't exist */ public String projectDetails() { String result = SUCCESS; @@ -103,8 +102,8 @@ /** * Stores the new project through the proxy * - * @return true if the project has been stored properly - * @return false if a problem occurred + * @return true if the project has been stored properly, + * false if a problem occurred */ protected boolean addProject() { boolean result = true; Modified: trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectOrderAction.java =================================================================== --- trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectOrderAction.java 2011-04-14 01:44:18 UTC (rev 80) +++ trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectOrderAction.java 2011-04-14 08:44:10 UTC (rev 81) @@ -41,9 +41,9 @@ /** * Adds a new project order * - * @return INPUT if the mandatory fields haven't all been filled in - * @return SUCCESS if the project order has been added successfully - * @return ERROR if an error occurred + * @return INPUT if the mandatory fields haven't all been filled in, + * SUCCESS if the project order has been added successfully, + * ERROR if an error occurred */ public String add() { String result = INPUT; @@ -86,9 +86,8 @@ * Retrieves the information of the projectOrder referenced by the * projectOrderId * - * @return SUCCESS if the information have been retrieved - * @return ERROR either if the UUID is invalid or the projectOrderId doesn't - * exist + * @return SUCCESS if the information have been retrieved, + * ERROR either if the UUID is invalid or the projectOrderId doesn't exist */ public String projectOrderDetails() { String result = SUCCESS; @@ -163,10 +162,24 @@ } /** + * Gets the list of all companies + * + * @return a list containing all companies + */ + public List<Company> getAllCompanies() { + ChoremProxy proxy = getChoremProxy(); + Search search = Search.query().exteq(Company.EXT_COMPANY); + Criteria criteria = search.criteria(); + PagedResult<Company> result = proxy.findAllByCriteria(Company.class, criteria); + List<Company> companies = result.getAll(); + return companies; + } + + /** * Stores the new project order through the proxy * - * @return true if the project order has been stored properly - * @return false if a problem occurred + * @return true if the project order has been stored properly, + * false if a problem occurred */ protected boolean addProjectOrder() { boolean result = true; Modified: trunk/chorem-web/src/main/java/org/chorem/gepeto/action/TaskAction.java =================================================================== --- trunk/chorem-web/src/main/java/org/chorem/gepeto/action/TaskAction.java 2011-04-14 01:44:18 UTC (rev 80) +++ trunk/chorem-web/src/main/java/org/chorem/gepeto/action/TaskAction.java 2011-04-14 08:44:10 UTC (rev 81) @@ -34,9 +34,9 @@ /** * Adds a new task * - * @return INPUT if the mandatory fields haven't all been filled in - * @return SUCCESS if the task has been added successfully - * @return ERROR if an error occurred + * @return INPUT if the mandatory fields haven't all been filled in, + * SUCCESS if the task has been added successfully, + * ERROR if an error occurred */ public String add() { String result = INPUT; @@ -85,8 +85,8 @@ /** * Stores the new task through the proxy * - * @return true if the task has been stored properly - * @return false if a problem occurred + * @return true if the task has been stored properly, + * false if a problem occurred */ protected boolean addTask() { boolean result = true;
participants (1)
-
vbriand@users.chorem.org