KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > suberic > pooka > PookaManager


1 package net.suberic.pooka;
2 import net.suberic.pooka.gui.*;
3 import net.suberic.util.VariableBundle;
4 import net.suberic.pooka.resource.*;
5 import net.suberic.pooka.messaging.PookaMessageListener;
6
7 import java.awt.*;
8 import javax.swing.*;
9 import java.util.Vector JavaDoc;
10 import javax.help.*;
11 import java.util.logging.*;
12
13 /**
14  * This keeps track of all of the various managers and settings for an
15  * instance of Pooka.
16  */

17 public class PookaManager {
18
19   // the resources for Pooka
20

21   /** The Resources for this instance of Pooka.*/
22   net.suberic.util.VariableBundle mResources;
23   /** Gets the Resources for this instance of Pooka.*/
24   public VariableBundle getResources() { return mResources; }
25   /** Sets the Resources for this instance of Pooka.*/
26   public void setResources(VariableBundle pResources) { mResources = pResources; }
27
28   /** the log manager. */
29   PookaLogManager mLogManager;
30   /** Gets the logManager for this instance of Pooka.*/
31   public PookaLogManager getLogManager() { return mLogManager; }
32   /** Sets the logManager for this instance of Pooka.*/
33   public void setLogManager(PookaLogManager pLogManager) { mLogManager = pLogManager; }
34
35   
36   // the startup/configuration file
37
String JavaDoc mLocalrc = null;
38   /** Gets the localrc for this instance of Pooka.*/
39   public String JavaDoc getLocalrc() { return mLocalrc; }
40   /** Sets the localrc for this instance of Pooka.*/
41   public void setLocalrc(String JavaDoc pLocalrc) { mLocalrc = pLocalrc; }
42
43   // mail globals
44
/** The default mail Session for Pooka. */
45   javax.mail.Session JavaDoc mDefaultSession;
46   /** Gets the default mail Session for Pooka. */
47   public javax.mail.Session JavaDoc getDefaultSession() { return mDefaultSession; }
48   /** Sets the default mail Session for Pooka. */
49   public void setDefaultSession(javax.mail.Session JavaDoc pDefaultSession) { mDefaultSession = pDefaultSession; }
50
51   /**
52    * The mailcap command map. This is what is used to determine
53    * which external programs are used to handle files of various MIME
54    * types.
55    */

56   javax.activation.CommandMap JavaDoc mMailcap;
57   /**
58    * Returns the mailcap command map. This is what is used to determine
59    * which external programs are used to handle files of various MIME
60    * types.
61    */

62   public javax.activation.CommandMap JavaDoc getMailcap() { return mMailcap; }
63   /**
64    * Sets the mailcap command map. This is what is used to determine
65    * which external programs are used to handle files of various MIME
66    * types.
67    */

68   public void setMailcap(javax.activation.CommandMap JavaDoc pMailcap) { mMailcap = pMailcap; }
69
70
71   /** The Mime Types map. This is used to map file extensions to MIME types. */
72   javax.activation.MimetypesFileTypeMap JavaDoc mMimeTypesMap = new javax.activation.MimetypesFileTypeMap JavaDoc();
73   /**
74    * Returns the Mime Types map. This is used to map file extensions to
75    * MIME types.
76    */

77   public javax.activation.MimetypesFileTypeMap JavaDoc getMimeTypesMap() { return mMimeTypesMap; }
78   /** Set the Mime Types map. This is used to map file extensions to
79       MIME types. */

80   public void setMimeTypesMap(javax.activation.MimetypesFileTypeMap JavaDoc pMimeTypesMap) { mMimeTypesMap = pMimeTypesMap; }
81
82   /** The defaultAuthenticator for this instance of Pooka.*/
83   javax.mail.Authenticator JavaDoc mDefaultAuthenticator = null;
84   /** Gets the defaultAuthenticator for this instance of Pooka.*/
85   public javax.mail.Authenticator JavaDoc getDefaultAuthenticator() { return mDefaultAuthenticator; }
86   /** Sets the defaultAuthenticator for this instance of Pooka.*/
87   public void setDefaultAuthenticator(javax.mail.Authenticator JavaDoc pDefaultAuthenticator) { mDefaultAuthenticator = pDefaultAuthenticator; }
88
89   // the DateFormatter, which we cache for convenience.
90
DateFormatter mDateFormatter;
91   /** Gets the dateFormatter for this instance of Pooka.*/
92   public DateFormatter getDateFormatter() { return mDateFormatter; }
93   /** Sets the dateFormatter for this instance of Pooka.*/
94   public void setDateFormatter(DateFormatter pDateFormatter) { mDateFormatter = pDateFormatter; }
95
96
97   // threads
98

99   /** The Search Thread. This is the thread that folder searches are done on.
100    */

101   net.suberic.util.thread.ActionThread mSearchThread = null;
102   /** Returns the thread that folder searches are done on.*/
103   public net.suberic.util.thread.ActionThread getSearchThread() { return mSearchThread; }
104   /** Sets the thread that folder searches are done on.*/
105   public void setSearchThread(net.suberic.util.thread.ActionThread pSearchThread) { mSearchThread = pSearchThread; }
106
107   /**
108    * The Folder Tracker thread. This is the thread that monitors the
109    * individual folders and checks to make sure that they stay connected,
110    * checks for new email, etc.
111    */

112   net.suberic.pooka.thread.FolderTracker mFolderTracker;
113   /** Gets the Folder Tracker thread. */
114   public net.suberic.pooka.thread.FolderTracker getFolderTracker() { return mFolderTracker; }
115   /**
116    * Sets the Folder Tracker thread. */

117   public void setFolderTracker(net.suberic.pooka.thread.FolderTracker pFolderTracker) { mFolderTracker = pFolderTracker; }
118
119   // Pooka managers and factories
120
/**
121    * The Address Book Manager keeps track of all of the configured Address
122    * Books.
123    */

124   AddressBookManager mAddressBookManager = null;
125   /** Returns the Address Book Manager. */
126   public AddressBookManager getAddressBookManager() {
127     return mAddressBookManager;
128   }
129   /** Sets the Address Book Manager. */
130   public void setAddressBookManager(AddressBookManager pAddressBookManager) { mAddressBookManager = pAddressBookManager; }
131
132   /** The Store Manager tracks all of the Mail Stores that Pooka knows about.*/
133   StoreManager mStoreManager;
134   /** Returns the Store Manager. */
135   public StoreManager getStoreManager() {
136     return mStoreManager;
137   }
138   /** Sets the Store Manager. */
139   public void setStoreManager(StoreManager pStoreManager) { mStoreManager = pStoreManager; }
140
141   /** The UserProfile Manager tracks all of the User Profiles that Pooka knows about.*/
142   UserProfileManager mUserProfileManager;
143   /** Returns the UserProfile Manager. */
144   public UserProfileManager getUserProfileManager() {
145     return mUserProfileManager;
146   }
147   /** Sets the UserProfile Manager. */
148   public void setUserProfileManager(UserProfileManager pUserProfileManager) { mUserProfileManager = pUserProfileManager; }
149
150   /**
151    * The UIFactory for Pooka. This is used to create just about all of the
152    * graphical UI components for Pooka. Usually this is either an instance
153    * of PookaDesktopPaneUIFactory or PookaPreviewPaneUIFactory, for the
154    * Desktop and Preview UI styles, respectively.
155    */

156   PookaUIFactory mUiFactory;
157   /**
158    * The UIFactory for Pooka. This is used to create just about all of the
159    * graphical UI components for Pooka. Usually this is either an instance
160    * of PookaDesktopPaneUIFactory or PookaPreviewPaneUIFactory, for the
161    * Desktop and Preview UI styles, respectively.
162    */

163   public PookaUIFactory getUIFactory() { return mUiFactory; }
164   /**
165    * The UIFactory for Pooka. This is used to create just about all of the
166    * graphical UI components for Pooka. Usually this is either an instance
167    * of PookaDesktopPaneUIFactory or PookaPreviewPaneUIFactory, for the
168    * Desktop and Preview UI styles, respectively.
169    */

170   public void setUIFactory(PookaUIFactory pUIFactory) { mUiFactory = pUIFactory; }
171
172   /**
173    * The Search Manager. This manages the Search Terms that Pooka knows
174    * about, and also can be used to construct Search queries from sets
175    * of properties.
176    */

177   SearchTermManager mSearchManager;
178   /**
179    * The Search Manager. This manages the Search Terms that Pooka knows
180    * about, and also can be used to construct Search queries from sets
181    * of properties.
182    */

183   public SearchTermManager getSearchManager() { return mSearchManager; }
184   /**
185    * The Search Manager. This manages the Search Terms that Pooka knows
186    * about, and also can be used to construct Search queries from sets
187    * of properties.
188    */

189   public void setSearchManager(SearchTermManager pSearchTermManager) { mSearchManager = pSearchTermManager; }
190   
191   /** The ConnectionManager tracks the configured Network Connections. */
192   NetworkConnectionManager mConnectionManager;
193   /** The ConnectionManager tracks the configured Network Connections. */
194   public NetworkConnectionManager getConnectionManager() {return mConnectionManager; }
195   /** The ConnectionManager tracks the configured Network Connections. */
196   public void setConnectionManager(NetworkConnectionManager pConnectionManager) { mConnectionManager= pConnectionManager; }
197
198   /**
199    * The OutgoingMailManager tracks the various SMTP server that Pooka can
200    * use to send mail.
201    */

202   OutgoingMailServerManager mOutgoingMailManager;
203   /**
204    * The OutgoingMailManager tracks the various SMTP server that Pooka can
205    * use to send mail.
206    */

207   public OutgoingMailServerManager getOutgoingMailManager() { return mOutgoingMailManager; }
208   /**
209    * The OutgoingMailManager tracks the various SMTP server that Pooka can
210    * use to send mail.
211    */

212   public void setOutgoingMailManager(OutgoingMailServerManager pOutgoingMailManager) { mOutgoingMailManager = pOutgoingMailManager; }
213
214   /**
215    * The EncryptionManager, not surprisingly, manages Pooka's encryption
216    * facilities.
217    */

218   PookaEncryptionManager mCryptoManager;
219   /**
220    * The EncryptionManager, not surprisingly, manages Pooka's encryption
221    * facilities.
222    */

223   public PookaEncryptionManager getCryptoManager() { return mCryptoManager; }
224   /**
225    * The EncryptionManager, not surprisingly, manages Pooka's encryption
226    * facilities.
227    */

228   public void setCryptoManager(PookaEncryptionManager pCryptoManager) { mCryptoManager = pCryptoManager; }
229
230   net.suberic.pooka.resource.ResourceManager mResourceManager;
231   /** The ResourceManager controls access to resource files. */
232   public ResourceManager getResourceManager() { return mResourceManager; }
233   /** The ResourceManager controls access to resource files. */
234   public void setResourceManager(net.suberic.pooka.resource.ResourceManager pResourceManager) { mResourceManager = pResourceManager; }
235
236   net.suberic.pooka.ssl.PookaTrustManager mTrustManager = null;
237   /** Gets the SSL Trust Manager. */
238   public net.suberic.pooka.ssl.PookaTrustManager getTrustManager() { return mTrustManager; }
239   /** Sets the SSL Trust Manager. */
240   public void setTrustManager(net.suberic.pooka.ssl.PookaTrustManager pTrustManager) { mTrustManager = pTrustManager; }
241
242   // the main Pooka panel.
243
net.suberic.pooka.gui.MainPanel mPanel;
244   /** Gets the Pooka Main Panel. This is the root of the entire Pooka UI.*/
245   public MainPanel getMainPanel() { return mPanel; }
246   /** Sets the Pooka Main Panel. This is the root of the entire Pooka UI.*/
247   public void setMainPanel(MainPanel pPanel) { mPanel = pPanel; }
248
249   String JavaDoc mPookaHome = null;
250   /** Gets the pookaHome for this instance of Pooka.*/
251   public String JavaDoc getPookaHome() { return mPookaHome; }
252   /** Sets the pookaHome for this instance of Pooka.*/
253   public void setPookaHome(String JavaDoc pPookaHome) { mPookaHome = pPookaHome; }
254
255
256   /** The HelpBroker is used to bring up the Pooka help system. */
257   HelpBroker mHelpBroker;
258   /** The HelpBroker is used to bring up the Pooka help system. */
259   public HelpBroker getHelpBroker() { return mHelpBroker; }
260   /** The HelpBroker is used to bring up the Pooka help system. */
261   public void setHelpBroker(HelpBroker pHelpBroker) { mHelpBroker = pHelpBroker; }
262
263   /** The MessageListener for this server. */
264   PookaMessageListener mMessageListener = null;
265   /** The MessageListener for this server. */
266   public PookaMessageListener getMessageListener() { return mMessageListener; }
267   /** The MessageListener for this server. */
268   public void setMessageListener(PookaMessageListener pMessageListener) { mMessageListener = pMessageListener; }
269
270 }
271
272
Popular Tags