⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jwmakernel.java

📁 java windows mda and reveus
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    return m_AdminController;  }//getAdminControllerUrl  /**   * Returns the contacts controller URL setting of the local   * jwma installation.   *   * @return local contacts controller's URL as <tt>String</tt>.   */  public String getContactsControllerUrl() {    return m_ContactsController;  }//getContactsControllerUrl  /**   * Returns the site's configured view URL for the given view   * as <tt>String</tt>.   *   * <p>   * The <tt>String</tt> parameter passed in <b>has to be</b>   * one of the defined abstract view constants.   *   * @param view representing one of the constants defining an abstract   *        view.   *   * @return local configured view URL of a given abstract view   *         as <tt>String</tt>.   *   * @see #LOGIN_VIEW   * @see #ERROR_VIEW   * @see #LOGOUT_VIEW   * @see #FOLDER_VIEW   * @see #MESSAGE_VIEW   * @see #PREFERENCES_VIEW   * @see #COMPOSE_VIEW   * @see #FIRSTTIME_VIEW   * @see #CONTACTS_VIEW   * @see #CONTACT_VIEW   * @see #CONTACT_EDIT_VIEW   * @see #CONTACTGROUP_VIEW   * @see #CONTACTGROUP_EDIT_VIEW   */  public String getViewUrl(String view) {    log.debug("getViewUrl():"+view+":"+m_Views.containsKey(view));    return m_Views.getProperty(view);  }//getViewUrl  /**   * Returns the active and activated <tt>PreferencesPersistencePlugin</tt>   * instance that provides the persistency related functionality.   *   * @see dtw.webmail.plugin.PreferencesPersistencePlugin   */  public PreferencesPersistencePlugin getPrefsPersistencePlugin() {    return m_PrefsPersistencePlugin;  }//getPrefsPersistencePlugin  /**   * Returns the active and activated <tt>RandomAppendPlugin</tt>   * instance that provides random appending functionality.   * This method returns <tt>null</tt> if no such plugin is registered.   *   * @see dtw.webmail.plugin.RandomAppendPlugin   */  public RandomAppendPlugin getRandomAppendPlugin() {    return m_RandomAppendPlugin;  }//getRandomAppendPlugin  /**   * Returns the active and activated <tt>ContactManagementPlugin</tt>   * instance that provides contact management related functionality.   *   * @see dtw.webmail.plugin.ContactManagementPlugin   */  public ContactManagementPlugin getContactManagementPlugin() {    return m_ContactManagementPlugin;  }//getContactManagementPlugin  /**   * Returns the class loader for i18n resource bundles.   * <p>   * @return the <tt>ClassLoader</tt> used for loading i18n <tt>ResourceBundle</tt>s.   */  public ClassLoader getResourceClassLoader() {    return m_i18nLoader;  }//getResourceClassLoader  /**   * Returns the error message for the given key in the   * set system locale.   * <p>   * @return the error message as localized <tt>String</tt>.   */  public String getErrorMessage(String key) {    if (key == null) {      return "KEY NULL!!!!!!!!";    }    try {      return m_ErrorMessages.getString(key);    } catch (MissingResourceException mrex) {      return ("#UNDEFINED=" + key + "#");    }  }//getErrorMessage  /**   * Returns the log message for the given key in the   * set system locale.   * <p>   * @return the log message as localized <tt>String</tt>.   */  public String getLogMessage(String key) {    if (key == null) {      return "KEY NULL!!!!!!!!";    }    try {      return m_LogMessages.getString(key);    } catch (MissingResourceException mrex) {      return ("#UNDEFINED=" + key + "#");    }  }//getLogMessage  /*** Administration *************************************************************/  /**   * Tests if status is enabled.   *   * @return true if status is enabled, false otherwise.   */  public boolean isJwmaStatusEnabled() {    return m_StatusEnabled;  }//isJwmaStatusEnabled  /**   * Sets the flag that controls if the system's status is   * enabled.   *   * @param true if status is enabled, false otherwise.   */  public void setJwmaStatusEnabled(boolean enabled) {    m_StatusEnabled = enabled;  }//setJwmaStatusEnabled  /*** Status report related methods ***********************************************/  /**   * Returns the kernel status as <tt>int</tt>.   * <ol>   * <li>Directories set</li>   * <li>Settings loaded</li>   * <li>Logs prepared</li>   * <li>Loaded error messages</li>   * <li>prepared preferences persistency</li>   * <li>prepared text processing</li>   * <li>prepared mail services</li>   * <li>prepared view urls</li>   * </ol>   *   * @return kernel status as <tt>int</tt>.   */  public int getKernelStatus() {    return m_Diag;  }//getDiagnostic  /**   * Lists the directories jwma needs to access.   *   * @return array of strings representing the directories.   */  public String[] listDirectories() {    String[] dirs = {      m_RootDir,      m_EtcDir,      m_LogDir,      m_DataDir    };    return dirs;  }//listDirectories  /**   * Returns the path of the given directory.   */  public String getDirectoryPath(int DIRECTORY) {    switch (DIRECTORY) {      case ROOT_DIR:        return m_RootDir;      case ETC_DIR:        return m_EtcDir;      case LOG_DIR:        return m_LogDir;      case DATA_DIR:        return m_DataDir;      default:        return null;    }  }//getDirectory  /**   * Lists the files jwma needs to access.   *   * @return array of strings representing the files.   */  public String[] listFiles() {    String[] files = new String[0];    /*    if (m_Diag<2) {      files=new String[1];      files[0]=m_Settings.getPath();    } else {      //FILES:      //String[] lang=new String[m_ErrorResources.size()];      //lang=(String[]) m_ErrorResources.keySet().toArray(lang);      files=new String[3+lang.length];      //settings file path      files[0]=m_Settings.getPath();      //log files      //files[1]=m_SyslogFile;      //files[2]=m_DebuglogFile;      //mapping file      //files[3]=m_PreferencesMappingFile;      //site preferences template      //files[4]=m_PreferencesTemplateFile;      //3- error messages files      for (int i=0; i<lang.length; i++) {        files[3+i]=m_EtcDir+"errormessages_"+lang[i]+".properties";      }    }    */    return files;  }//listFiles  /*** End status report related methods *******************************************/  /*** Text processing related methods *********************************************/  /**   * Returns the message processor indicated by the given   * name. If the name does not refer to any processing pipe,   * then the default processing pipe will be returned.   *   * @param name String that should represent a valid processing   *        pipe name.   * @return Processor to be used for message processing.   */  public Processor getMessageProcessor(String name) {    //shortcut for null name    if (name == null || name.length() == 0) {      return m_MessageProcessor;    }    //Try to get a pipe with the specified name    Processor proc = m_ProcessingKernel.getProcessingPipe(name);    if (proc == null) {      //try to get a processor with the specified name      proc = m_ProcessingKernel.getProcessor(name);      if (proc == null) {        //set the default processor        proc = m_MessageProcessor;      }    }    //return the pipe, the processor or the default    return proc;  }//getMessageProcessor  public String[] listMessageProcessors() {    //return just processing pipes for now    return m_ProcessingKernel.listProcessingPipes();  }//listMessageProcessors  /*************************************************************************/  /**   * Returns the reference of the JwmaKernel singleton   * instance.   *   * <p>   * <i><b>Note:</b>this also implements kind of a factory method pattern.   * If the singleton instance does not exist yet, it will be created.</i>   *   * @return reference of the <tt>JwmaKernel</tt> singleton   *         instance.   *   */  public static JwmaKernel getReference() {    if (c_Self != null) {      return c_Self;    } else {      return new JwmaKernel();    }  }//getReference  /**   * Defines the abstract login view.   */  public static final String LOGIN_VIEW = "view.login";  /**   * Defines the abstract error view.   */  public static final String ERROR_VIEW = "view.error";  /**   * Defines the abstract loggedout view.   */  public static final String LOGOUT_VIEW = "view.logout";  /**   * Defines the abstract subscribe view.   */  public static final String SUBSCRIBED_VIEW = "view.subscribed";  /**   * Defines the abstract unsubscribe view.   */  public static final String UNSUBSCRIBED_VIEW = "view.unsubscribed";  /**   * Defines the abstract folder view.   */  public static final String FOLDER_VIEW = "view.folder";  /**   * Defines the abstract mailbox view.   */  public static final String MAILBOX_VIEW = "view.mailbox";  /**   * Defines the abstract message view.   */  public static final String MESSAGE_VIEW = "view.message";  /**   * Defines the abstract compose view.   */  public static final String COMPOSE_VIEW = "view.compose";  /**   * Defines the abstract preferences view.   */  public static final String PREFERENCES_VIEW = "view.preferences";  /**   * Defines the abstract error firsttime view.   */  public static final String FIRSTTIME_VIEW = "view.firsttime";  /**   * Defines the abstract contacts view.   */  public static final String CONTACTS_VIEW = "view.contacts";  /**   * Defines the abstract contact view.   */  public static final String CONTACT_VIEW = "view.contact";  /**   * Defines the abstract contact edit view.   */  public static final String CONTACT_EDIT_VIEW = "view.contact.edit";  /**   * Defines the abstract contact group view.   */  public static final String CONTACTGROUP_VIEW = "view.contactgroup";  /**   * Defines the abstract contact group edit view.   */  public static final String CONTACTGROUP_EDIT_VIEW = "view.contactgroup.edit";  /**   * Defines the abstract admin status view.   */  public static final String ADMIN_STATUS_VIEW = "view.admin.status";  /**   * Defines the abstract admin preferences view.   */  public static final String ADMIN_PREFERENCES_VIEW = "view.admin.preferences";  /**   * Defines the abstract admin settings view.   */  public static final String ADMIN_SETTINGS_VIEW = "view.admin.settings";  /**   * Defines the abstract admin login view.   */  public static final String ADMIN_LOGIN_VIEW = "view.admin.login";  /**   * Defines the abstract admin menu view.   */  public static final String ADMIN_MENU_VIEW = "view.admin.menu";  /**   * Defines the abstract admin error view.   */  public static final String ADMIN_ERROR_VIEW = "view.admin.error";  /**   * Defines the abstract account creation view.   */  public static final String ACCOUNT_CREATION_VIEW = "view.account.creation";  /**   * Defines the root directory.   */  public static final int ROOT_DIR = 1;  /**   * Defines the root directory.   */  public static final int ETC_DIR = 2;  /**   * Defines the root directory.   */  public static final int LOG_DIR = 3;  /**   * Defines the data directory.   */  public static final int DATA_DIR = 4;}//JwmaKernel

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -