Example usage for org.apache.wicket RuntimeConfigurationType DEPLOYMENT

List of usage examples for org.apache.wicket RuntimeConfigurationType DEPLOYMENT

Introduction

In this page you can find the example usage for org.apache.wicket RuntimeConfigurationType DEPLOYMENT.

Prototype

RuntimeConfigurationType DEPLOYMENT

To view the source code for org.apache.wicket RuntimeConfigurationType DEPLOYMENT.

Click Source Link

Usage

From source file:at.molindo.wicketutils.utils.WicketUtils.java

License:Apache License

public static boolean isDeployment() {
    return RuntimeConfigurationType.DEPLOYMENT.equals(Application.get().getConfigurationType());
}

From source file:com.gitblit.wicket.GitBlitWebApp.java

License:Apache License

@Override
public final RuntimeConfigurationType getConfigurationType() {
    if (runtimeManager.isDebugMode()) {
        return RuntimeConfigurationType.DEVELOPMENT;
    }/*from  w ww  . j a va  2 s.c o  m*/
    return RuntimeConfigurationType.DEPLOYMENT;
}

From source file:com.google.code.jqwicket.Utils.java

License:Apache License

/**
 * Returns true, if wicket runs in deployment mode. Otherwise returns false.
 *
 * @return true, if wicket runs in deployment mode. Otherwise returns false.
 *///from ww  w .jav  a  2  s .  com
public static boolean isDeploymentMode() {
    return RuntimeConfigurationType.DEPLOYMENT.equals(Application.get().getConfigurationType());
}

From source file:com.googlecode.ounit.OunitApplication.java

License:Open Source License

@Override
public RuntimeConfigurationType getConfigurationType() {
    return RuntimeConfigurationType.DEPLOYMENT;
}

From source file:com.gt.debugconsole.ConsoleApplicationImpl.java

License:Apache License

public boolean isDevelopmentConfiguraton() {
    return RuntimeConfigurationType.DEPLOYMENT.equals(getConfigurationType());
}

From source file:com.modusoperandi.dragonfly.widgets.chart.ChartWidgetApplication.java

License:Open Source License

@Override
public RuntimeConfigurationType getConfigurationType() {

    // Put Wicket into deployment mode (the default mode is DEVELOPMENT)
    return RuntimeConfigurationType.DEPLOYMENT;

    // return RuntimeConfigurationType.DEVELOPMENT; // NOSONAR - For development
}

From source file:com.modusoperandi.dragonfly.widgets.test.WicketApplication.java

License:Open Source License

@Override
public RuntimeConfigurationType getConfigurationType() {

    // Put Wicket into deployment mode (the default mode is DEVELOPMENT)
    return RuntimeConfigurationType.DEPLOYMENT;
}

From source file:com.norconex.jefmon.server.JEFMonServer.java

License:Apache License

/**
 * Set configuration type by looking for dev.properties file.
 * /*ww  w  .  j  a  v  a  2 s .  com*/
 * This method must be called very early.
 * 
 * The default behavior is to set as RuntimeConfigurationType.DEPLOYMENT 
 */
private void initRuntimeConfiguration() {

    URL resource = new DefaultClassResolver().getClassLoader().getResource("dev.properties");
    if (resource == null) {
        app.setConfigurationType(RuntimeConfigurationType.DEPLOYMENT);
        return;
    }

    try {
        PropertiesConfiguration properties = new PropertiesConfiguration(resource);
        String value = properties.getString("wicket." + Application.CONFIGURATION,
                RuntimeConfigurationType.DEPLOYMENT.toString());
        app.setConfigurationType(RuntimeConfigurationType.valueOf(value.toUpperCase()));
    } catch (ConfigurationException e) {
        throw new JEFMonException("Exception while reading dev.propeties.", e);
    }
}

From source file:com.przemo.projectmanagementweb.Application.java

@Override
public RuntimeConfigurationType getConfigurationType() {
    Properties applicationProperties = new Properties();
    try {/*from   w w w . ja  va2 s.com*/
        applicationProperties.load(this.getClass().getResourceAsStream("application.properties"));
        String dm = applicationProperties.get(DEPLOYMENT_MODE).toString();
        return dm.equals("deployment") ? RuntimeConfigurationType.DEPLOYMENT
                : RuntimeConfigurationType.DEVELOPMENT;
    } catch (IOException ex) {
        Logger.getLogger(Application.class.getName()).log(Level.SEVERE, null, ex);
    }
    return super.getConfigurationType();
}

From source file:com.userweave.application.UserWeaveWebRequestCycle.java

License:Open Source License

public void handleRuntimeException(RuntimeException e) {
    if (!ignoreNextException) {
        if ((Application.get().getConfigurationType() == RuntimeConfigurationType.DEPLOYMENT)) {
            exceptionHandlingHelper.sendRuntimeException(e);
        }//  w w w.  jav a  2 s.co  m
    }
    ignoreNextException = false;
}