Search in sources :

Example 1 with ViperfishAuthProvider

use of net.viperfish.journal.authProvider.ViperfishAuthProvider in project vsDiaryWriter by shilongdai.

the class JournalApplication method initModules.

/**
 * load all providers.
 *
 * This method loads all provider available.
 */
public static void initModules() {
    // prepare to load modules
    modules = new File("modules");
    CommonFunctions.initDir(modules);
    m = new PF4JModuleLoader();
    // put system configuration first
    ConfigurationGUISetup setup = new ConfigurationGUISetup() {

        @Override
        public void proccess(PreferenceManager mger) {
            PreferenceNode system = new PreferenceNode("system", "System", null, SystemPreferencePage.class.getCanonicalName());
            mger.addToRoot(system);
        }
    };
    PreferenceGUIManager.add(setup);
    // register the providers
    AuthManagers.INSTANCE.registerAuthProvider(new ViperfishAuthProvider());
    EntryDatabases.INSTANCE.registerEntryDatabaseProvider(new ViperfishEntryDatabaseProvider());
    Indexers.INSTANCE.registerIndexerProvider(new ViperfishIndexerProvider());
    JournalTransformers.INSTANCE.registerTransformerProvider(new ViperfishEncryptionProvider());
    // load third party
    m.loadModules(modules);
}
Also used : ConfigurationGUISetup(net.viperfish.journal.framework.provider.ConfigurationGUISetup) ViperfishEntryDatabaseProvider(net.viperfish.journal.dbProvider.ViperfishEntryDatabaseProvider) PreferenceNode(org.eclipse.jface.preference.PreferenceNode) ViperfishIndexerProvider(net.viperfish.journal.indexProvider.ViperfishIndexerProvider) ViperfishEncryptionProvider(net.viperfish.journal.secureProvider.ViperfishEncryptionProvider) ViperfishAuthProvider(net.viperfish.journal.authProvider.ViperfishAuthProvider) File(java.io.File) PreferenceManager(org.eclipse.jface.preference.PreferenceManager)

Aggregations

File (java.io.File)1 ViperfishAuthProvider (net.viperfish.journal.authProvider.ViperfishAuthProvider)1 ViperfishEntryDatabaseProvider (net.viperfish.journal.dbProvider.ViperfishEntryDatabaseProvider)1 ConfigurationGUISetup (net.viperfish.journal.framework.provider.ConfigurationGUISetup)1 ViperfishIndexerProvider (net.viperfish.journal.indexProvider.ViperfishIndexerProvider)1 ViperfishEncryptionProvider (net.viperfish.journal.secureProvider.ViperfishEncryptionProvider)1 PreferenceManager (org.eclipse.jface.preference.PreferenceManager)1 PreferenceNode (org.eclipse.jface.preference.PreferenceNode)1