Search in sources :

Example 6 with ConfigurationController

use of org.jbei.ice.lib.config.ConfigurationController in project ice by JBEI.

the class ApplicationInitialize method startUp.

/**
     * Responsible for initializing the system and checking for the existence of needed
     * data (such as settings) and creating as needed
     */
public static void startUp() {
    // check for and create public group
    GroupController groupController = new GroupController();
    groupController.createOrRetrievePublicGroup();
    // check for and create admin account
    AccountController accountController = new AccountController();
    accountController.createAdminAccount();
    // check for and create default settings
    ConfigurationController configurationController = new ConfigurationController();
    configurationController.initPropertyValues();
    // check blast
    BlastPlus.scheduleBlastIndexRebuildTask(false);
    AutoAnnotationBlastDbBuildTask autoAnnotationBlastDbBuildTask = new AutoAnnotationBlastDbBuildTask();
    IceExecutorService.getInstance().runTask(autoAnnotationBlastDbBuildTask);
}
Also used : ConfigurationController(org.jbei.ice.lib.config.ConfigurationController) GroupController(org.jbei.ice.lib.group.GroupController) AutoAnnotationBlastDbBuildTask(org.jbei.ice.lib.entry.sequence.annotation.AutoAnnotationBlastDbBuildTask) AccountController(org.jbei.ice.lib.account.AccountController)

Example 7 with ConfigurationController

use of org.jbei.ice.lib.config.ConfigurationController in project ice by JBEI.

the class FileResource method getAsset.

@GET
@Path("asset/{assetName}")
public Response getAsset(@PathParam("assetName") final String assetName) {
    ConfigurationController configurationController = new ConfigurationController();
    File assetFile = configurationController.getUIAsset(assetName);
    if (assetFile == null)
        return super.respond(Response.Status.NOT_FOUND);
    return addHeaders(Response.ok(assetFile), assetFile.getName());
}
Also used : ConfigurationController(org.jbei.ice.lib.config.ConfigurationController)

Example 8 with ConfigurationController

use of org.jbei.ice.lib.config.ConfigurationController in project ice by JBEI.

the class WoRControllerTest method testSetEnable.

@Test
public void testSetEnable() throws Exception {
    Assert.assertFalse(controller.isWebEnabled());
    new ConfigurationController().setPropertyValue(ConfigurationKey.JOIN_WEB_OF_REGISTRIES, "yes");
}
Also used : ConfigurationController(org.jbei.ice.lib.config.ConfigurationController) Test(org.junit.Test)

Aggregations

ConfigurationController (org.jbei.ice.lib.config.ConfigurationController)8 HasEntry (org.jbei.ice.lib.entry.HasEntry)2 Test (org.junit.Test)2 IOException (java.io.IOException)1 AccountController (org.jbei.ice.lib.account.AccountController)1 AutoAnnotationBlastDbBuildTask (org.jbei.ice.lib.entry.sequence.annotation.AutoAnnotationBlastDbBuildTask)1 GroupController (org.jbei.ice.lib.group.GroupController)1