incubator-lokahi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tob...@apache.org
Subject svn commit: r412815 - in /incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core: api/function/Function.java common/interfaces/RestObject.java common/interfaces/Restable.java
Date Thu, 08 Jun 2006 17:46:46 GMT
Author: toback
Date: Thu Jun  8 10:46:45 2006
New Revision: 412815

URL: http://svn.apache.org/viewvc?rev=412815&view=rev
Log:
more javadocs.

Modified:
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/function/Function.java
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/common/interfaces/RestObject.java
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/common/interfaces/Restable.java

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/function/Function.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/function/Function.java?rev=412815&r1=412814&r2=412815&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/function/Function.java
(original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/function/Function.java
Thu Jun  8 10:46:45 2006
@@ -31,7 +31,7 @@
 /**
  * Represents the actions that a user can perform on configurable
  * items that lokahi maintains and controls.
- * 
+ *
  * @author Stephen Toback
  * @version $Id: Function.java,v 1.4 2006/03/13 21:56:59 drtobes Exp $
  */
@@ -107,6 +107,7 @@
 
   /**
    * Prefered constructor for creation of new functions
+   *
    * @param name
    * @param command
    */
@@ -115,12 +116,26 @@
     this.setCommand(command);
   }
 
+  /**
+   * Full Constructor, mainly for use when creating objects
+   * from the datastore.
+   *
+   * @param pk
+   * @param name
+   * @param command
+   */
   public Function(int pk, String name, String command) {
     this.setPk(pk);
     this.setName(name);
     this.setCommand(command);
   }
 
+  /**
+   * Gets the function object by the primary key.
+   *
+   * @param id primary key of the Function to find.
+   * @return Function object or null.
+   */
   public Function get(int id) {
     Function f = null;
     try {
@@ -137,16 +152,22 @@
   }
 
   /**
-   * @param id
+   * Gets the function object by the primary key.
    *
-   * @return function
-   * @deprecated
+   * @param id primary key of the Function to find.
+   * @return Function object or null.
    */
   public static Function getFunction(int id) {
     Function f = new Function();
     return f.get(id);
   }
 
+  /**
+   * Gets the function object by the commad.
+   *
+   * @param command command of the Function to find.
+   * @return Function object or null.
+   */
   public static Function getFunction(String command) {
     Function f = null;
     try {
@@ -161,7 +182,11 @@
     }
     return f;
   }
-
+  /**
+   * Gets all function objects.
+   *
+   * @return Function object or null.
+   */
   public static Collection<Function> getFunctions() throws SQLException {
     Collection<Function> c;
     try {

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/common/interfaces/RestObject.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/common/interfaces/RestObject.java?rev=412815&r1=412814&r2=412815&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/common/interfaces/RestObject.java
(original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/common/interfaces/RestObject.java
Thu Jun  8 10:46:45 2006
@@ -18,10 +18,20 @@
 import java.util.Map;
 
 /**
+ * Convience methods for creating an object to be displayed in the rest servlet.
+ *
  * @author Stephen Toback
  * @version $Id: RestObject.java,v 1.1 2006/03/07 20:18:51 drtobes Exp $
  */
 public abstract class RestObject implements Restable {
+  /**
+   * Takes the name, and map of key, values and creates
+   * an xml represenatation.
+   *
+   * @param name of the xml object
+   * @param a Map of key, value pairs
+   * @return a xml object.
+   */
   protected static StringBuilder elementBuilder(String name, Map<String, String> a)
{
     StringBuilder ret = new StringBuilder();
     ret.append('<');
@@ -37,6 +47,13 @@
     return ret;
   }
 
+  /**
+   * builds an individual xml element.
+   *
+   * @param name of the element.
+   * @param value of the named element.
+   * @return representation of the element.
+   */
   protected static StringBuilder elementBuilder(String name, String value) {
     StringBuilder ret = new StringBuilder();
     ret.append('<');

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/common/interfaces/Restable.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/common/interfaces/Restable.java?rev=412815&r1=412814&r2=412815&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/common/interfaces/Restable.java
(original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/common/interfaces/Restable.java
Thu Jun  8 10:46:45 2006
@@ -16,12 +16,27 @@
 package org.apache.lokahi.core.common.interfaces;
 
 /**
+ * Implemented by objects that are intended
+ *  to be displayed by the rest servlet.
+ *
  * @author Stephen Toback
  * @version $Id: Restable.java,v 1.1 2006/03/07 20:18:51 drtobes Exp $
  */
 public interface Restable extends Collectable {
-  StringBuilder buildXMLRepresention();
 
+  /**
+   * Builds a xml representation of this object
+   *
+   * @return the xml representation
+   */
+  StringBuilder buildXMLRepresention();
+  
+  /**
+   * Builds a short xml representation of this object
+   * containing name, and primary key.
+   *
+   * @return the xml representation
+   */
   StringBuilder buildShortXMLRepresentation();
 
 }



Mime
View raw message