You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by sa...@apache.org on 2006/03/02 10:55:30 UTC

svn commit: r382338 - in /webservices/commons/modules/policy/src/org/apache/ws/policy: AbstractAssertion.java CompositeAssertion.java

Author: sanka
Date: Thu Mar  2 01:55:29 2006
New Revision: 382338

URL: http://svn.apache.org/viewcvs?rev=382338&view=rev
Log:
adding comments to AbstractAction and Assertion interface

Modified:
    webservices/commons/modules/policy/src/org/apache/ws/policy/AbstractAssertion.java
    webservices/commons/modules/policy/src/org/apache/ws/policy/CompositeAssertion.java

Modified: webservices/commons/modules/policy/src/org/apache/ws/policy/AbstractAssertion.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/policy/src/org/apache/ws/policy/AbstractAssertion.java?rev=382338&r1=382337&r2=382338&view=diff
==============================================================================
--- webservices/commons/modules/policy/src/org/apache/ws/policy/AbstractAssertion.java (original)
+++ webservices/commons/modules/policy/src/org/apache/ws/policy/AbstractAssertion.java Thu Mar  2 01:55:29 2006
@@ -20,27 +20,38 @@
 import java.util.List;
 
 /**
+ * AbstractAssertion provides the default implementation of some basic functions
+ * definded in Assertion interface.  
+ *  
  * @author Sanka Samaranayake (sanka@apache.org)
  */
 public abstract class AbstractAssertion implements Assertion {
 	
-	/** */
+	/** Flag to mark whether this assertion is in normalize format */
 	protected boolean flag = false;
 	
-	/** */
+	/** To store terms of this assertion */
 	protected ArrayList childTerms = new ArrayList();
 	
-	/** */
+	/** To refer to the parent of this assertion */
 	protected Assertion parent = null;
 	
 	/**
 	 * 
+	 * Default implementation of normalize() operation.
+	 * 
+	 * @return an assertion which is the normalized format of this assertion.
 	 */
 	public Assertion normalize() throws UnsupportedOperationException {
 		return normalize(null);
 	}
 	
 	/**
+	 * Default implementation of intersect(Assertion) operation.
+	 * 
+	 * @param assertion the assertion to intersect with this object.
+	 * @return an assertion which is equivalent to the intersect of this 
+	 *         assertion and the argument.
 	 * 
 	 */
 	public Assertion intersect(Assertion assertion)
@@ -49,7 +60,11 @@
 	}
 	
 	/**
+	 * Default implementation of merge(Assertion) operation.
 	 * 
+	 * @param assertion the assertion to merge with this object.
+	 * @return an assertion which is equivalent to the merge of this assertion 
+	 *         and the argument.
 	 */
 	public Assertion merge(Assertion assertion)
 			throws UnsupportedOperationException {
@@ -57,14 +72,18 @@
 	}
 	
 	/**
+	 * Returns true if this assertion is in normalzied format.
 	 * 
+	 * @return true if this assertion is in normalized format. 
 	 */	
 	public boolean isNormalized() {
 		return flag;
 	}
 
 	/**
+	 * Marks this assertion as it is in normalized format.
 	 * 
+	 * @param flag which marks this object as in its normalized format or not. 
 	 */
 	public void setNormalized(boolean flag) {
 		this.flag = flag;
@@ -75,43 +94,83 @@
 	}
 	
 	/**
+	 * Returns true if this assertion object has a parent.
 	 * 
+	 * @return returns true if this has a parent. 
 	 */
 	public boolean hasParent() {
 		return (parent != null);
 	}
 
 	/**
+	 * Returns the parent of this assertion.
 	 * 
+	 * @return parent of this assertion.
 	 */
 	public Assertion getParent() {
 		return parent;
 	}
 
+	/**
+	 * Sets the parent of this assertion.
+	 * 
+	 * @param parent of this assertion.
+	 */
 	public void setParent(Assertion parent) {
 		this.parent = parent;
 	}
 
+	/**
+	 * Adds a terms to this assertion.
+	 * 
+	 * @param assertion the term to add
+	 */
 	public void addTerm(Assertion assertion) {
 		childTerms.add(assertion);
 	}
 	
+	/**
+	 * Adds a list of terms to this assertion.
+	 * 
+	 * @param assertions list of terms to add
+	 */
 	public void addTerms(List assertions) {
 		childTerms.addAll(assertions);
 	}
 
+	/**
+	 * Returns the list of terms of this assertion.
+	 * 
+	 * @param a list of terms of this assertion.
+	 */
 	public List getTerms() {
 		return childTerms;
 	}
 
+	/**
+	 * Returns true if this assertion has no terms.
+	 * 
+	 * @return if this assertion has no terms.
+	 * 
+	 */
 	public boolean isEmpty() {
 		return childTerms.isEmpty();
 	}
 	
+	/**
+	 * Remove the geven term from the set of terms of this assertion.
+	 * 
+	 * @param returns true if the assertion is removed.
+	 */
 	public boolean remove(Assertion assertion) {
 		return childTerms.remove(assertion);
 	}
 
+	/**
+	 * Returns the number of terms this assertion has.
+	 * 
+	 * @return the number of terms
+	 */
 	public int size() {
 		return childTerms.size();
 	}

Modified: webservices/commons/modules/policy/src/org/apache/ws/policy/CompositeAssertion.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/policy/src/org/apache/ws/policy/CompositeAssertion.java?rev=382338&r1=382337&r2=382338&view=diff
==============================================================================
--- webservices/commons/modules/policy/src/org/apache/ws/policy/CompositeAssertion.java (original)
+++ webservices/commons/modules/policy/src/org/apache/ws/policy/CompositeAssertion.java Thu Mar  2 01:55:29 2006
@@ -17,6 +17,8 @@
 
 
 /**
+ * CompositeAssertion interface is a marker interface for indecating which 
+ * Assertions are CompositeAssertion type. 
  * 
  * @author Sanka Samaranayake (sanka@apache.org)
  */