public static void contributeApplicationDefaults(MappedConfiguration<String, String> configuration)
	{
		loadApplicationDefaultsFromProperties("/applicationdefaults.properties", configuration);

		// Tynamo's tapestry-security (Shiro) module configuration
		configuration.add(SecuritySymbols.LOGIN_URL, "/signin");
		configuration.add(SecuritySymbols.UNAUTHORIZED_URL, "/unauthorized");
		configuration.add(SecuritySymbols.SUCCESS_URL, "/home");

		configuration.add(HibernateSymbols.EARLY_START_UP, "false");
	}
	private static void loadApplicationDefaultsFromProperties(String properties, MappedConfiguration<String, String> contributions)
	{
		Properties prop = new Properties();

		try
		{
			prop.load(AppModule.class.getResource(properties).openStream());
		} catch (IOException ioe)
		{
			throw new RuntimeException("Unable to load " + properties, ioe);
		}

		for (Object key : prop.keySet())
		{
			String value = prop.getProperty(key.toString());
			contributions.add(key.toString(), value);
		}
	}
 @SuppressWarnings("rawtypes")
 public static void contributeServiceOverride(MappedConfiguration<Class, Object> configuration) {
   configuration.add(ClasspathURLConverter.class, new ClasspathURLConverterJBoss7());
 }
  /** @param pConfiguration to use */
  public static void contributeApplicationDefaults(
      final MappedConfiguration<String, Object> pConfiguration) {
    // Contributions to ApplicationDefaults will override any contributions
    // to
    // FactoryDefaults (with the same key). Here we're restricting the
    // supported
    // locales to just "en" (English). As you add localised message catalogs
    // and other assets,
    // you can extend this list of locales (it's a comma separated series of
    // locale names;
    // the first locale name is the default when there's no reasonable
    // match).
    pConfiguration.add(SymbolConstants.SUPPORTED_LOCALES, "en");
    pConfiguration.add(SymbolConstants.MINIFICATION_ENABLED, false);
    pConfiguration.add(SymbolConstants.HMAC_PASSPHRASE, "a1TAzRnjBZRKubgwSRlpX");
    pConfiguration.add(ResteasySymbols.MAPPING_PREFIX, "/api");

    pConfiguration.add(SymbolConstants.SECURE_ENABLED, "false");
    pConfiguration.add(SymbolConstants.HOSTPORT, "8080");
    pConfiguration.add(SymbolConstants.HOSTPORT_SECURE, "8443");

    // Tynamo's tapestry-security module configuration
    pConfiguration.add(SecuritySymbols.LOGIN_URL, URL_LOGIN);
    pConfiguration.add(SecuritySymbols.SUCCESS_URL, URL_SUCCESS);
    pConfiguration.add(SecuritySymbols.UNAUTHORIZED_URL, URL_UNAUTHORIZED);

    pConfiguration.add(SymbolConstants.PRODUCTION_MODE, false);
  }
 public static void contributeClasspathAssetAliasManager(
     MappedConfiguration<String, String> configuration) {
   configuration.add("tap-angular", "dev/openshift/tapestry");
 }
  public static void contributeFactoryDefaults(MappedConfiguration<String, String> configuration) {

    configuration.add(AngularSymbolConstants.ANGULAR_CORE_PATH, "context:js/bower_components");
    configuration.add(AngularSymbolConstants.ANGULAR_VERSION, "1.3.9");
  }
 public static void contributeJavaScriptStackSource(
     MappedConfiguration<String, JavaScriptStack> configuration) {
   configuration.addInstance(AngularJavaScriptStack.STACK_ID, AngularJavaScriptStack.class);
 }
 // Security - Tynamo/Shiro
 // http://tapestry.apache.org/https.html#HTTPS-SecuringMultiplePages
 public void contributeMetaDataLocator(MappedConfiguration<String, String> configuration) {
   // Enabling @Secure only on some pages (the remaining ones are insecure)
   configuration.add("admin:" + MetaDataConstants.SECURE_PAGE, "true");
 }
Beispiel #9
0
 public static void contributeApplicationDefaults(
     MappedConfiguration<String, String> configuration) {
   configuration.add("symbol-value", "99");
 }