View Javadoc

1   /****************************************************************
2    * Licensed to the Apache Software Foundation (ASF) under one   *
3    * or more contributor license agreements.  See the NOTICE file *
4    * distributed with this work for additional information        *
5    * regarding copyright ownership.  The ASF licenses this file   *
6    * to you under the Apache License, Version 2.0 (the            *
7    * "License"); you may not use this file except in compliance   *
8    * with the License.  You may obtain a copy of the License at   *
9    *                                                              *
10   *   http://www.apache.org/licenses/LICENSE-2.0                 *
11   *                                                              *
12   * Unless required by applicable law or agreed to in writing,   *
13   * software distributed under the License is distributed on an  *
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
15   * KIND, either express or implied.  See the License for the    *
16   * specific language governing permissions and limitations      *
17   * under the License.                                           *
18   ****************************************************************/
19  
20  
21  
22  package org.apache.james.remotemanager;
23  
24  import org.apache.avalon.cornerstone.services.store.Store;
25  import org.apache.james.api.user.UsersRepository;
26  import org.apache.james.api.user.UsersStore;
27  import org.apache.james.api.vut.management.VirtualUserTableManagementService;
28  import org.apache.james.management.BayesianAnalyzerManagementService;
29  import org.apache.james.management.DomainListManagementService;
30  import org.apache.james.management.ProcessorManagementService;
31  import org.apache.james.management.SpoolManagementService;
32  import org.apache.james.services.MailServer;
33  
34  import java.util.HashMap;
35  
36  /**
37   * Provides a number of server-wide constant values to the
38   * RemoteManagerHandlers
39   *
40   */
41  public interface RemoteManagerHandlerConfigurationData {
42  
43      /**
44       * Returns the service wide hello name
45       *
46       * @return the hello name
47       */
48      String getHelloName();
49  
50      /**
51       * Returns the MailServer interface for this service.
52       *
53       * @return the MailServer interface for this service
54       */
55      MailServer getMailServer();
56  
57      /**
58       * Returns the UsersRepository for this service.
59       *
60       * @return the local users repository
61       */
62      UsersRepository getUsersRepository();
63  
64      /**
65       * Returns the UsersStore for this service.
66       *
67       * @return the local users store
68       */
69      UsersStore getUserStore();
70  
71      /**
72       * Returns the SpoolManagement for this service.
73       *
74       * @return the spool manager
75       */
76      SpoolManagementService getSpoolManagement();
77  
78      /**
79       * Returns the Administrative Account Data
80       *
81       * TODO: Change the return type to make this immutable.
82       *
83       * @return the admin account data
84       */
85      HashMap getAdministrativeAccountData();
86  
87      /**
88       * Returns the prompt to be displayed when waiting for input. e.g. "james> ".
89       * 
90       * @return the configured prompt, or an empty string when the prompt is not configured.
91       */
92      String getPrompt();
93  
94      /**
95       * Returns the Store
96       * 
97       * @return the Store
98       */
99      Store getStore();
100 
101     /**
102      * Returns the BayesianAnalyzerManagementService
103      * 
104      * @return the BayesianAnalyzerManagementService
105      */
106     BayesianAnalyzerManagementService getBayesianAnalyzerManagement();
107 
108     /**
109      * Returns the ProcessorManagementService
110      * 
111      * @return the ProcessorManagementService
112      */
113     ProcessorManagementService getProcessorManagement();
114     
115     /**
116      * Return the VirtualUserTableManagementService
117      * 
118      * @return the VirtualUserTableManagementService
119      */
120     VirtualUserTableManagementService getVirtualUserTableManagement();
121     
122     /**
123      * Return the DomainListManagementService
124      * 
125      * @return the DomainListManagementService
126      */
127     DomainListManagementService getDomainListManagement();
128     
129     /**
130      * Gets avaliable commands.
131      * @return <code>Command</code>'s, not null possibly empty
132     */
133     Command[] getCommands();
134 }