View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.module.ibeans.annotations;
8   
9   
10  import java.net.URL;
11  
12  import org.ibeans.annotation.Call;
13  import org.ibeans.annotation.Return;
14  import org.ibeans.annotation.param.UriParam;
15  import org.ibeans.api.CallException;
16  
17  public interface SearchIBean
18  {
19      //deliberate 404 error
20      @Call(uri = "http://www.google.com/searchX?q={term}")
21      public String searchGoogle(@UriParam("term") String searchTerm) throws CallException;
22  
23      @Call(uri = "http://www.google.com/search?q={term}")
24      @Return("#[header:ibeans.call.uri]")
25      public String searchGoogleAndReturnURLString(@UriParam("term") String searchTerm) throws CallException;    
26      
27      @Call(uri = "http://www.google.com/search?q={term}")
28      @Return("#[header:ibeans.call.uri]")
29      public URL searchGoogleAndReturnURL(@UriParam("term") String searchTerm) throws CallException;    
30      
31      @Call(uri = "http://www.google.com/search?q={term}")
32      public void searchGoogleAndReturnVoid(@UriParam("term") String searchTerm) throws CallException;    
33      
34      @Call(uri = "http://search.yahoo.com/search?p={term}")
35      public String searchYahoo(@UriParam("term") String searchTerm) throws Exception;
36  
37      @Call(uri = "http://www.ask.com/web?q={term}&search=search")
38      public String searchAsk(@UriParam("term") String searchTerm) throws CallException;
39  
40      @Call(uri = "http://www.ask.com/web?q={term}&search=search")
41      @Return("#[header:ibeans.call.uri]")
42      public String searchAskAndReturnURLString(@UriParam("term") String searchTerm) throws CallException;
43  
44      @Call(uri = "http://www.ask.com/web?q={term}&search=search")
45      @Return("#[header:ibeans.call.uri]")
46      public URL searchAskAndReturnURL(@UriParam("term") String searchTerm) throws CallException;
47  
48      //IBEANS-184 : make sure we can handle void methods
49      @Call(uri = "http://www.ask.com/web?q={term}&search=search")
50      public void searchAskAndReturnVoid(@UriParam("term") String searchTerm) throws CallException;
51  }