当前位置: 首页>>代码示例>>Java>>正文


Java RuntimeConfigurationType.DEVELOPMENT属性代码示例

本文整理汇总了Java中org.apache.wicket.RuntimeConfigurationType.DEVELOPMENT属性的典型用法代码示例。如果您正苦于以下问题:Java RuntimeConfigurationType.DEVELOPMENT属性的具体用法?Java RuntimeConfigurationType.DEVELOPMENT怎么用?Java RuntimeConfigurationType.DEVELOPMENT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.wicket.RuntimeConfigurationType的用法示例。


在下文中一共展示了RuntimeConfigurationType.DEVELOPMENT属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getString

public static String getString(String key, final Locale loc, String... _params) {
	if (!exists()) {
		ThreadContext.setApplication(org.apache.wicket.Application.get(appName));
	}
	String[] params = _params;
	if ((params == null || params.length == 0) && STRINGS_WITH_APP.contains(key)) {
		params = new String[]{getApplicationName()};
	}
	Localizer l = get().getResourceSettings().getLocalizer();
	String value = l.getStringIgnoreSettings(key, null, null, loc, null, "[Missing]");
	if (params != null && params.length > 0) {
		final MessageFormat format = new MessageFormat(value, loc);
		value = format.format(params);
	}
	if (RuntimeConfigurationType.DEVELOPMENT == get().getConfigurationType()) {
		value += String.format(" [%s]", key);
	}
	return value;
}
 
开发者ID:apache,项目名称:openmeetings,代码行数:19,代码来源:Application.java

示例2: getConfigurationType

@Override
public RuntimeConfigurationType getConfigurationType() {
    //Init the modes from the constants if needed
    if (modes.isEmpty()) {
        // use configuration from the servlet context since properties are not bound to the thread when this method is called
        ArtifactoryHome artifactoryHome = getArtifactoryContext().getArtifactoryHome();
        ArtifactorySystemProperties artifactorySystemProperties = artifactoryHome.getArtifactoryProperties();
        /*if (Boolean.parseBoolean(artifactorySystemProperties.getProperty(ConstantValues.dev))) {
            modes.add(ConstantValues.dev);
        }*/
        if (Boolean.parseBoolean(artifactorySystemProperties.getProperty(ConstantValues.test))) {
            modes.add(ConstantValues.test);
        }
        if (Boolean.parseBoolean(artifactorySystemProperties.getProperty(ConstantValues.qa))) {
            modes.add(ConstantValues.qa);
        }
    }
    if (modes.contains(ConstantValues.dev)) {
        return RuntimeConfigurationType.DEVELOPMENT;
    } else {
        return super.getConfigurationType();
    }
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:23,代码来源:ArtifactoryApplication.java

示例3: init

@Override
protected final void init() {
    super.init();

    if (getConfigurationType() == RuntimeConfigurationType.DEVELOPMENT) {
        String path = "src/main/java";
        if (new File(path).exists()) {
            getResourceSettings().getResourceFinders().add(0, new Path(path));
        } else {
            logger.warn("No src/main/java folder found, dynamic resource reloading is not available");
        }
    }
    getComponentInstantiationListeners().add(new SpringComponentInjector(this));
    getDebugSettings().setOutputMarkupContainerClassName(false);
    
    customInit();
}
 
开发者ID:payneteasy,项目名称:superfly,代码行数:17,代码来源:BaseApplication.java

示例4: loadDomainRegistry

private DomainRegistry<DomainObjectReference> loadDomainRegistry() {
    // Wicket's development mode allows to reload classes at runtime, so in that mode
    // we must not cache any data structures which depend on class structures. The
    // domain registry prototypes are such a candidate.
    if (WebApplication.get().getConfigurationType() == RuntimeConfigurationType.DEVELOPMENT)
        return constructDomainRegistry();

    synchronized (DMDWebGenPageContext.class) {
        String domainClassName = page.getDefaultModelObject().getClass().getName();
        DomainRegistry<DomainObjectReference> registry = domainRegistryPrototypes.get(domainClassName);
        if (registry == null) {
            registry = constructDomainRegistry();
            domainRegistryPrototypes.put(domainClassName, registry);
            return registry;
        } else {
            // Construct a new DomainRegistry from an existing prototype rather than from
            // traversing the domain class structure. Creation from prototype is much faster.
            return registry.replicate(page.getDefaultModelObject());
        }
    }
}
 
开发者ID:Nocket,项目名称:nocket,代码行数:21,代码来源:DMDWebGenPageContext.java

示例5: getDomainClassReference

public static DomainClassReference getDomainClassReference(Class<?> domainClass, boolean runtime) {
    // Wicket's development mode allows to reload classes at runtime, so in that mode
    // we must not cache any data structures which depend on class structures. The
    // DomainClassReference cache is such a candidate.
    if (!runtime || WebApplication.get().getConfigurationType() == RuntimeConfigurationType.DEVELOPMENT) {
        return new DomainClassReference(domainClass);
    }

    synchronized (DomainClassReferenceFactory.class) {
        String domainClassName = domainClass.getName();
        DomainClassReference ref = domainClassReferenceCache.get(domainClassName);
        if (ref == null) {
            ref = new DomainClassReference(domainClass);
            domainClassReferenceCache.put(domainClassName, ref);
        }
        return ref;
    }
}
 
开发者ID:Nocket,项目名称:nocket,代码行数:18,代码来源:DomainClassReferenceFactory.java

示例6: getConfigurationType

@Override
public RuntimeConfigurationType getConfigurationType() {
	if (Bootstrap.sandboxMode && !Bootstrap.prodMode)
		return RuntimeConfigurationType.DEVELOPMENT;
	else
		return RuntimeConfigurationType.DEPLOYMENT;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:7,代码来源:GitPlexWebApplication.java

示例7: init

@Override
public void init() {
    super.init();

    getRequestCycleSettings().setTimeout(Duration.minutes(5));
    getRequestCycleListeners().add(new SingularServerContextListener());

    Locale.setDefault(new Locale("pt", "BR"));//NOSONAR

    getApplicationSettings().setAccessDeniedPage(Error403Page.class);
    getApplicationSettings().setPageExpiredErrorPage(Page410.class);

    // Don't forget to check your Application server for this
    getApplicationSettings().setDefaultMaximumUploadSize(Bytes.megabytes(10));

    getMarkupSettings().setStripWicketTags(true);
    getMarkupSettings().setStripComments(true);
    getMarkupSettings().setDefaultMarkupEncoding(StandardCharsets.UTF_8.name());
    getComponentOnConfigureListeners().add(component -> {
        boolean outputId = !component.getRenderBodyOnly();
        component.setOutputMarkupId(outputId).setOutputMarkupPlaceholderTag(outputId);
    });


    getComponentInstantiationListeners().add(new SpringComponentInjector(this, getApplicationContext(), true));


    new SingularAnnotatedMountScanner().mountPages(this);
    if (RuntimeConfigurationType.DEVELOPMENT == getConfigurationType()) {
        getDebugSettings().setComponentPathAttributeName("wicketdebug");
        WicketSerializationDebugUtil.configurePageSerializationDebug(this, this.getClass());
    }
}
 
开发者ID:opensingular,项目名称:singular-server,代码行数:33,代码来源:SingularServerApplication.java

示例8: getConfigurationType

@Override
public RuntimeConfigurationType getConfigurationType() {
    if (SingularProperties.get().isFalse(SingularProperties.SINGULAR_DEV_MODE)) {
        return RuntimeConfigurationType.DEPLOYMENT;
    } else {
        return RuntimeConfigurationType.DEVELOPMENT;
    }
}
 
开发者ID:opensingular,项目名称:singular-server,代码行数:8,代码来源:SingularServerApplication.java

示例9: init

@Override
public void init(WebApplication webApplication) {
	if (RuntimeConfigurationType.DEVELOPMENT == webApplication.getConfigurationType()) {
		webApplication.getMarkupSettings().setStripWicketTags(true);
		webApplication.getRequestCycleSettings().addResponseFilter(new HtmlValidationResponseFilter());
	}
}
 
开发者ID:MarcGiffing,项目名称:wicket-spring-boot,代码行数:7,代码来源:HTMLValidatorConfig.java

示例10: getConfigurationType

/**
 * Own solution: uses development parameter of servlet context init parameter (see context.xml or server.xml).
 * @return DEVELOPMENT, if development variable of servlet context is set to "true" otherwise DEPLOYMENT.
 * @see org.apache.wicket.protocol.http.WebApplication#getConfigurationType()
 */
@Override
public RuntimeConfigurationType getConfigurationType()
{
  if (isDevelopmentSystem() == true) {
    return RuntimeConfigurationType.DEVELOPMENT;
  }
  return RuntimeConfigurationType.DEPLOYMENT;
}
 
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:13,代码来源:WicketApplication.java

示例11: getConfigurationType

@Override
public RuntimeConfigurationType getConfigurationType() {
    //noinspection ConstantConditions
    return deployment ? RuntimeConfigurationType.DEPLOYMENT : RuntimeConfigurationType.DEVELOPMENT;
}
 
开发者ID:LogicalOverflow,项目名称:MasterStats,代码行数:5,代码来源:MasteryApplication.java

示例12: getConfigurationType

@Override
public RuntimeConfigurationType getConfigurationType() {
     return wicketSettings.getDevelopment() ? RuntimeConfigurationType.DEVELOPMENT : RuntimeConfigurationType.DEPLOYMENT;
}
 
开发者ID:Metrink,项目名称:croquet,代码行数:4,代码来源:CroquetApplication.java

示例13: isDevelopement

private static boolean isDevelopement() {
    return WebApplication.get().getConfigurationType() == RuntimeConfigurationType.DEVELOPMENT;
}
 
开发者ID:Nocket,项目名称:nocket,代码行数:3,代码来源:LessCSSHelper.java

示例14: getConfigurationType

@Override
public RuntimeConfigurationType getConfigurationType() {
	return RuntimeConfigurationType.DEVELOPMENT;
}
 
开发者ID:atomfrede,项目名称:freezing-octo-bear,代码行数:4,代码来源:WicketApplication.java

示例15: init

/**
 * @see org.apache.wicket.Application#init()
 */
@Override
public void init()
{
    super.init();

    getComponentInstantiationListeners().add(new GuiceComponentInjector(this, new RestModule()));

    if (getConfigurationType() == RuntimeConfigurationType.DEVELOPMENT) {

        getResourceSettings().setUseMinifiedResources(false);
        getDebugSettings().setDevelopmentUtilitiesEnabled(true);

    } else {

        getResourceSettings().setUseMinifiedResources(true);
        getDebugSettings().setDevelopmentUtilitiesEnabled(false);

    }

    getMarkupSettings().setStripWicketTags(true);

    mountPage("/home", HomePage.class);
    mountPage("/etcd/#{cluster}", NavigationPage.class);
    mountPage("/registries", RegistriesPage.class);

    mountPage("/about", AboutPage.class);

    mountPage("/signin", AuthPage.class);

    // add your configuration here
}
 
开发者ID:nikfoundas,项目名称:etcd-viewer,代码行数:34,代码来源:EtcdViewerApplication.java


注:本文中的org.apache.wicket.RuntimeConfigurationType.DEVELOPMENT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。