View Javadoc
1   /**
2    * This Source Code Form is subject to the terms of the Mozilla Public
3    * License, v. 2.0. If a copy of the MPL was not distributed with this
4    * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5    *
6    * If it is not possible or desirable to put the notice in a particular
7    * file, then You may include the notice in a location (such as a LICENSE
8    * file in a relevant directory) where a recipient would be likely to look
9    * for such a notice.
10  
11   * 
12   */
13   
14  /*  ---------------------------------------------------------------------------
15   *  U.S. Government, Department of the Army
16   *  Army Materiel Command
17   *  Research Development Engineering Command
18   *  Communications Electronics Research Development and Engineering Center
19   *  ---------------------------------------------------------------------------
20   */
21  
22  package org.miloss.fgsms.presentation;
23  
24  import java.io.IOException;
25  import java.net.URL;
26  import java.util.Properties;
27  import javax.servlet.ServletContext;
28  import javax.servlet.http.HttpServletRequest;
29  import javax.servlet.http.HttpServletResponse;
30  import org.miloss.fgsms.common.Constants.AuthMode;
31  import org.miloss.fgsms.services.interfaces.agentcallbackservice.RemoteAgentCallbackPort;
32  import org.miloss.fgsms.services.interfaces.agentcallbackservice.RemoteAgentCallbackService;
33  import org.miloss.fgsms.services.interfaces.automatedreportingservice.AutomatedReportingService;
34  import org.miloss.fgsms.services.interfaces.dataaccessservice.DataAccessService;
35  import org.miloss.fgsms.services.interfaces.policyconfiguration.PCS;
36  import org.miloss.fgsms.services.interfaces.reportingservice.ReportingService;
37  import org.miloss.fgsms.services.interfaces.status.OpStatusService;
38  import org.miloss.fgsms.services.interfaces.status.StatusService;
39  
40  
41  /**
42   * Proxy Loader interface used for web applications accessing fgsms
43   * services<br><br>
44   * This interface is used by the class ProxyLoader and serves
45   * as an abstraction layer to support multiple soap stacks
46   *
47   * @author AO
48   */
49  public interface IProxyLoader {
50  
51      public static final String JAVAXNETSSLKEY_STORE = "javax.net.ssl.keyStore";
52      public static final String JAVAXNETSSLKEY_STORE_PASSWORD = "javax.net.ssl.keyStorePassword";
53      public static final String JAVAXNETSSLTRUST_STORE = "javax.net.ssl.trustStore";
54      public static final String JAVAXNETSSLTRUST_STORE_PASSWORD = "javax.net.ssl.trustStorePassword";
55      public static final String FGSMS_AUTH_MODE = "fgsms.AuthMode";
56      public static final String REPORT_PICKUP_LOCATION = "reportpickuplocation";
57      public static final String POLICYCONFIG = "policyconfig";
58      public static final String ARS = "ars";
59      public static final String DATAACCESS = "dataaccess";
60      public static final String REPORTING = "reporting";
61      public static final String STATUS = "status";
62      public static final String DCS = "datacollectors";
63      public static final String UDDIURL_INQUIRY = "uddiurl_inquiry";
64      public static final String UDDIURL_PUBLISH = "uddiurl_publish";
65      public static final String UDDIURL_SECURITY = "uddiurl_security";
66      public static final String UDDIUSE_HTTP_CLIENT_CERT = "uddi.useHttpClientCert";
67      public static final String UDDIUSE_HTTP_USERNAME_PASSWORD = "uddi.useHttpUsernamePassword";
68      public static final String UDDIUSE_UDDI_USERNAME_PASSWORD = "uddi.useUddiUsernamePassword";
69  
70      URL getRawConfigurationURL();
71  
72      Properties getRawConfiguration();
73  
74      AutomatedReportingService GetARS(ServletContext application, HttpServletRequest request, HttpServletResponse response) throws IOException;
75  
76      DataAccessService GetDAS(ServletContext application, HttpServletRequest request, HttpServletResponse response) throws IOException;
77  
78      PCS GetPCS(ServletContext application, HttpServletRequest request, HttpServletResponse response) throws IOException;
79  
80      /**
81       * only used from the login page, returns a PCS client proxy that should
82       * only be used for authenticated the user
83       *
84       * @param application
85       * @param username
86       * @param password
87       * @return
88       */
89      PCS GetPCSForUsernamePasswordLogin(ServletContext application, String username, String password);
90  
91      ReportingService GetRS(ServletContext application, HttpServletRequest request, HttpServletResponse response) throws IOException;
92  
93      StatusService GetSS(ServletContext application, HttpServletRequest request, HttpServletResponse response) throws IOException;
94  
95      /**
96       * returns configuration object representing the UDDI's servers
97       * configuration, including client proxies
98       *
99       * @return
100      */
101     UDDIConfig GetUDDIInquiryConfig(ServletContext application, HttpServletRequest request, HttpServletResponse response) throws IOException;
102 
103     AuthMode getAuthmode();
104 
105     /**
106      * returns true if the UDDI browser parameters are currently configured
107      *
108      * @return
109      */
110     boolean uddiConfigured();
111 
112     /**
113      * returns the directory containing the trust store and key stores
114      */
115     String getKeyStoreTrustStoreDirectory();
116     
117     /*
118      * Gets an OpStat client for use with pinging fgsms 6.3+ services
119      */
120     OpStatusService GetOpStat(ServletContext application, HttpServletRequest request, HttpServletResponse response) throws IOException;
121     
122     /**
123      * Returns an instance of the agent callback service. Note: The invocation URL will NOT be set. Credentials will NOT be populated as the remote agent 
124      * cannot validate the credentials
125      * @param application
126      * @param request
127      * @param response
128      * @return
129      * @throws IOException 
130      */
131     RemoteAgentCallbackPort GetAgentCallBack(ServletContext application, HttpServletRequest request, HttpServletResponse response) throws IOException;
132     
133     /**
134      * Returns an instance of the agent callback service. Note: The invocation URL will NOT be set. Credentials will NOT be populated as the remote agent 
135      * cannot validate the credentials 
136      * @param application
137      * @param request
138      * @param response
139      * @return
140      * @throws IOException 
141      */
142     OpStatusService GetAgentCallBackOpStat(ServletContext application, HttpServletRequest request, HttpServletResponse response) throws IOException;
143     
144     boolean isSecure();
145 }