openamf/src/java/org/openamf AdvancedGateway.java,1.9,1.10

[email protected]
Newsgroups gmane.comp.java.openamf.cvs
Message-ID <[email protected]>
Update of /cvsroot/openamf/openamf/src/java/org/openamf
In directory sc8-pr-cvs1:/tmp/cvs-serv4353/src/java/org/openamf

Modified Files:
	AdvancedGateway.java 
Log Message:
1) renamed Translator to Filter to avoid confusion with ASTranslator
2) added abilty to have multiple result filters on a service method

Index: AdvancedGateway.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/AdvancedGateway.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** AdvancedGateway.java	2 May 2003 00:07:36 -0000	1.9
--- AdvancedGateway.java	2 May 2003 04:39:45 -0000	1.10
***************
*** 14,22 ****
  import org.openamf.config.ServiceMethodParameterConfig;
  import org.openamf.config.StateBeanConfig;
! import org.openamf.config.TranslatorConfig;
  import org.openamf.invoker.ServiceInvocationException;
  import org.openamf.invoker.ServiceInvoker;
! import org.openamf.translator.TranslationException;
! import org.openamf.translator.Translator;
  import org.xml.sax.SAXException;
  
--- 14,22 ----
  import org.openamf.config.ServiceMethodParameterConfig;
  import org.openamf.config.StateBeanConfig;
! import org.openamf.config.FilterConfig;
  import org.openamf.invoker.ServiceInvocationException;
  import org.openamf.invoker.ServiceInvoker;
! import org.openamf.filter.FilterException;
! import org.openamf.filter.Filter;
  import org.xml.sax.SAXException;
  
***************
*** 42,46 ****
  
  			addStateBeansToParams(httpServletRequest, request, methodConfig);
! 
  			serviceInvoker =
  				ServiceInvoker.load(
--- 42,46 ----
  
  			addStateBeansToParams(httpServletRequest, request, methodConfig);
! 			
  			serviceInvoker =
  				ServiceInvoker.load(
***************
*** 139,149 ****
  
  		try {
! 			if (methodConfig != null
! 				&& methodConfig.getResultTranslatorConfig() != null) {
! 
! 				serviceResult =
! 					translateResult(
! 						serviceResult,
! 						methodConfig.getResultTranslatorConfig());
  			}
  
--- 139,148 ----
  
  		try {
! 			if (methodConfig != null) {
! 				Iterator rfcs = methodConfig.getResultFilterConfigs();
! 				while (rfcs.hasNext()) {
! 					FilterConfig fc = (FilterConfig) rfcs.next();
! 					serviceResult = translateResult(serviceResult, fc);
! 				}
  			}
  
***************
*** 162,171 ****
  	private Object translateResult(
  		Object serviceResult,
! 		TranslatorConfig translatorConfig)
  		throws
  			ClassNotFoundException,
  			InstantiationException,
  			IllegalAccessException,
! 			TranslationException {
  
  		log.debug(
--- 161,170 ----
  	private Object translateResult(
  		Object serviceResult,
! 		FilterConfig translatorConfig)
  		throws
  			ClassNotFoundException,
  			InstantiationException,
  			IllegalAccessException,
! 			FilterException {
  
  		log.debug(
***************
*** 175,179 ****
  				translatorConfig.getClassName());
  
! 		Translator translator = (Translator) translatorClass.newInstance();
  
  		log.debug("calling translate");
--- 174,178 ----
  				translatorConfig.getClassName());
  
! 		Filter translator = (Filter) translatorClass.newInstance();
  
  		log.debug("calling translate");




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.