View Javadoc

1   package com.atlassian.security.auth.trustedapps;
2   
3   /**
4    * Responsible for getting Application details from a client
5    */
6   public interface ApplicationRetriever
7   {
8       /**
9        * Reads an Application from the data supplied by the Reader.
10       * 
11       * @throws InvalidCertificateException
12       *             if there are problems getting the cert
13       */
14      Application getApplication() throws RetrievalException;
15  
16      // --------------------------------------------------------------------------------------------------- inner classes
17      
18      /**
19       * Used if the Application cannot be retrieved.
20       */
21      public static abstract class RetrievalException extends Exception
22      {
23          RetrievalException(String message)
24          {
25              super(message);
26          }
27  
28          RetrievalException(Exception cause)
29          {
30              super(cause);
31          }
32      }
33  
34      /**
35       * An application certificate was not found at a web site.
36       */
37      public static class ApplicationNotFoundException extends RetrievalException
38      {
39          ApplicationNotFoundException(String message)
40          {
41              super(message);
42          }
43  
44          ApplicationNotFoundException(Exception cause)
45          {
46              super(cause);
47          }
48      }
49  
50      /**
51       * An application certificate was found but is not valid.
52       */
53      public static class InvalidApplicationDetailsException extends RetrievalException
54      {
55          InvalidApplicationDetailsException(Exception cause)
56          {
57              super(cause);
58          }
59      }
60  
61      /**
62       * Remote website counld not be contacted at the address provided.
63       */
64      public static class RemoteSystemNotFoundException extends RetrievalException
65      {
66          RemoteSystemNotFoundException(Exception cause)
67          {
68              super(cause);
69          }
70      }
71  }