|
From: <tr...@us...> - 2003-07-16 02:26:08
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core
In directory sc8-pr-cvs1:/tmp/cvs-serv26928
Modified Files:
GeneralException.java
Log Message:
Now uses the Avalon context object instead of map
Index: GeneralException.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/GeneralException.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** GeneralException.java 27 Jun 2003 02:19:57 -0000 1.7
--- GeneralException.java 16 Jul 2003 02:26:05 -0000 1.8
***************
*** 67,74 ****
import org.apache.commons.lang.exception.NestableException;
!
! import java.util.HashMap;
! import java.util.Map;
!
/**
--- 67,71 ----
import org.apache.commons.lang.exception.NestableException;
! import org.apache.avalon.framework.context.Context;
/**
***************
*** 84,88 ****
* point.
*/
! Map context;
/**
--- 81,85 ----
* point.
*/
! Context context;
/**
***************
*** 117,121 ****
* @param context
*/
! public void setContext(Map context) {
this.context = context;
}
--- 114,118 ----
* @param context
*/
! public void setContext(Context context) {
this.context = context;
}
***************
*** 124,165 ****
* Get the context mapping from the exception.
*
- * @param context
- *
* @return
*/
! public Map getContext(Map context) {
return this.context;
- }
-
- /**
- * Add a name/value pair to the context map. If the map does not exists,
- * create a hashmap. This returns this object so that you can chain these
- * objects.
- *
- * @param pair name / value pair to place in the context map
- *
- * @return this object for chaining
- */
- public GeneralException addContextPair(Pair pair) {
- if (context == null) {
- context = new HashMap();
- }
-
- context.put(pair.getFirst(), pair.getSecond());
-
- return this;
- }
-
- /**
- * Add a name/value as discrete values to the context map. This calls the
- * same method with the Pair argument.
- *
- * @param name The name of object to place in the context map
- * @param value The associated object to place in the map.
- *
- * @return this object for chaining.
- */
- public GeneralException addContextPair(String name, Object value) {
- return addContextPair(new Pair(name, value));
}
--- 121,128 ----
* Get the context mapping from the exception.
*
* @return
*/
! public Context getContext() {
return this.context;
}
|