View Javadoc

1   package com.ontotext.ordi.wsmo4rdf.remote.server;
2   
3   import javax.jws.WebParam;
4   import javax.jws.WebService;
5   
6   import com.ontotext.ordi.wsmo4rdf.remote.exception.AuthenticationFailedException;
7   import com.ontotext.ordi.wsmo4rdf.remote.exception.NonExistingEntryException;
8   import com.ontotext.ordi.wsmo4rdf.remote.exception.ServiceLimitExceededException;
9   
10  /**
11   * Provides functionality of a
12   * {@link com.ontotext.ordi.wsmo4rdf.WsmoSource WsmoSource} remotely. An integer
13   * identifier specifies which <code>WsmoSource</code> instance is used.
14   * 
15   * @author mihail.konstantinov@ontotext.com
16   * 
17   * @see com.ontotext.ordi.wsmo4rdf.WsmoSource
18   */
19  @WebService
20  public interface WsmoSourceService {
21  
22      /**
23       * Creates locally a new {@link com.ontotext.ordi.wsmo4rdf.WsmoConnection WsmoConnection} for a given
24       * <code>WsmoSource</code> and returns a unique integer identifier for later reference to this connection. 
25       * 
26       * @param wsmoSourceId
27       *                integer identifier of existing <code>WsmoSource</code> instance
28       * 
29       * @return integer identifier of the created <code>WsmoConnection</code>
30       * 
31       * @throws ServiceLimitExceededException
32       *                 if no more <code>WsmoConnection</code>s could be handled
33       * @throws NonExistingEntryException
34       *                 if <code>WsmoSource</code> instance with the given identifier does not exist
35       */
36      public int getConnection(@WebParam(name = "wsmoSourceId") final int wsmoSourceId)
37      	throws ServiceLimitExceededException, NonExistingEntryException;
38  
39      /**
40       * Same as {@link #getConnection(int)} but requires authentication
41       * 
42       * @param wsmoSourceId integer identifier of existing <code>WsmoSource</code> instance
43       * @param user String of the username part of the credentials
44       * @param pass String of the password part of the credentials
45       * 
46       * @return integer identifier of the created <code>WsmoConnection</code>
47       * 
48       * @throws ServiceLimitExceededException
49       *                	if no more <code>WsmoConnection</code>s could be handled
50       * @throws NonExistingEntryException
51       *                	if <code>WsmoSource</code> instance with the given identifier does not exist
52       * @throws AuthenticationFailedException 
53       * 			if user was not authenticated with these credentials
54       */
55      public int getConnectionAuth(@WebParam(name = "wsmoSourceId") final int wsmoSourceId,
56  	    			 @WebParam(name = "username") String user,
57  	    			 @WebParam(name = "password") String pass) 
58      	throws ServiceLimitExceededException, NonExistingEntryException, AuthenticationFailedException;
59  
60  /* JAXB cannot handle this
61   * 
62   
63      public Map<Object, Object> getMetaData(@WebParam(name = "wsmoSourceId")final int wsmoSourceId) 
64      	throws NonExistingEntryException;
65  */
66      
67  /*
68   * JAX-B Stack Overflow
69  
70      public ORDIWarning getWarning(@WebParam(name = "wsmoSourceId") final intwsmoSourceId) 
71  		throws NonExistingEntryException;
72   */
73  
74   /*
75    * Do not delete. To be implemented at latter time probably
76   
77      public boolean isWrapperFor(Class<?> iface) throws ORDIException;
78       
79      public <T> T unwrap(Class<T> iface) throws ORDIException;
80   */
81  
82      public void clearWarnings(@WebParam(name = "wsmoSourceId")final int wsmoSourceId) 
83      	throws NonExistingEntryException;
84  
85      public void shutdown(@WebParam(name="wsmoSourceId") final int wsmoSourceId) throws NonExistingEntryException;
86  }