public static void contributeApplicationDefaults(
      MappedConfiguration<String, Object> configuration) {
    // The factory default is true but during the early stages of an application
    // overriding to false is a good idea. In addition, this is often overridden
    // on the command line as -Dtapestry.production-mode=false
    configuration.add(SymbolConstants.PRODUCTION_MODE, false);

    // The application version number is incorprated into URLs for some
    // assets. Web browsers will cache assets because of the far future expires
    // header. If existing assets are changed, the version number should also
    // change, to force the browser to download new versions.
    configuration.add(SymbolConstants.APPLICATION_VERSION, "0.0.1-SNAPSHOT-DEV");
  }
Beispiel #2
0
 public static void contributeApplicationDefaults(
     MappedConfiguration<String, Object> configuration) {
   // 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).
   configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en");
 }
  public static void contributeTemplateParserOverride(MappedConfiguration<String, URL> config) {
    // Any class inside the internal module would do. Or we could move all these
    // files to o.a.t.services.

    Class<UpdateListenerHubImpl> c = UpdateListenerHubImpl.class;

    config.add("-//W3C//DTD XHTML 1.0 Strict//EN", c.getResource("xhtml1-strict.dtd"));
    config.add("-//W3C//DTD XHTML 1.0 Transitional//EN", c.getResource("xhtml1-transitional.dtd"));
    config.add("-//W3C//DTD XHTML 1.0 Frameset//EN", c.getResource("xhtml1-frameset.dtd"));
    config.add("-//W3C//DTD HTML 4.01//EN", c.getResource("xhtml1-strict.dtd"));
    config.add("-//W3C//DTD HTML 4.01 Transitional//EN", c.getResource("xhtml1-transitional.dtd"));
    config.add("-//W3C//DTD HTML 4.01 Frameset//EN", c.getResource("xhtml1-frameset.dtd"));
    config.add("-//W3C//ENTITIES Latin 1 for XHTML//EN", c.getResource("xhtml-lat1.ent"));
    config.add("-//W3C//ENTITIES Symbols for XHTML//EN", c.getResource("xhtml-symbol.ent"));
    config.add("-//W3C//ENTITIES Special for XHTML//EN", c.getResource("xhtml-special.ent"));
  }
Beispiel #4
0
  public static void contributeApplicationDefaults(
      MappedConfiguration<String, String> configuration) {
    // 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).

    configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en");

    // The factory default is true but during the early stages of an application
    // overriding to false is a good idea. In addition, this is often overridden
    // on the command line as -Dtapestry.production-mode=false
    configuration.add(SymbolConstants.PRODUCTION_MODE, "false");

    // The application version number is incorprated into URLs for some
    // assets. Web browsers will cache assets because of the far future expires
    // header. If existing assets are changed, the version number should also
    // change, to force the browser to download new versions.
    configuration.add(SymbolConstants.APPLICATION_VERSION, "1.0-SNAPSHOT");
  }
Beispiel #5
0
  public static void contributeApplicationDefaults(
      MappedConfiguration<String, String> configuration) {
    String production = "false";
    configuration.add(SymbolConstants.PRODUCTION_MODE, production);
    configuration.add(SymbolConstants.COMPRESS_WHITESPACE, production);
    configuration.add(SymbolConstants.COMBINE_SCRIPTS, production);
    configuration.add(SymbolConstants.MINIFICATION_ENABLED, production);
    configuration.add(SymbolConstants.COMPACT_JSON, production);
    configuration.add(SymbolConstants.SUPPORTED_LOCALES, "es");

    // Contribuciones que definirán las rutas en las que el filtro de
    // RESTEasy atenderá las peticiones REST
    configuration.add(ResteasySymbols.MAPPING_PREFIX, "/rest");
    configuration.add(ResteasySymbols.MAPPING_PREFIX_JSAPI, "/rest-jsapi.js");
  }
 public static void contributeServiceOverride(
     MappedConfiguration<Class, Object> configuration, @Local TemplateParser override) {
   configuration.add(TemplateParser.class, override);
 }
  public static void contributeApplicationDefaults(
      MappedConfiguration<String, String> configuration) {
    // 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).

    // The factory default is true but during the early stages of an application
    // overriding to false is a good idea. In addition, this is often overridden
    // on the command line as -Dtapestry.production-mode=false

    if (!isProduction) {
      configuration.add(SymbolConstants.PRODUCTION_MODE, "false");
      configuration.add(SymbolConstants.COMPONENT_RENDER_TRACING_ENABLED, "false");
      configuration.add(SymbolConstants.COMPACT_JSON, "false");
      configuration.add(SymbolConstants.COMPRESS_WHITESPACE, "false");
      configuration.add(SymbolConstants.MINIFICATION_ENABLED, "false");
    } else {
      // LINK_PATH_PERMISSIONS[0][0] = null;
      configuration.add(SymbolConstants.PRODUCTION_MODE, "true");
      configuration.add(SymbolConstants.COMPONENT_RENDER_TRACING_ENABLED, "false");
      configuration.add(SymbolConstants.COMPACT_JSON, "true");
      configuration.add(SymbolConstants.COMPRESS_WHITESPACE, "true");
      configuration.add(SymbolConstants.MINIFICATION_ENABLED, "true");
    }
    // todo check
    // http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/HMAC-Passphrase-Could-Be-Much-More-Useful-Correct-Me-If-I-m-Wrong-td5724606.html
    configuration.add(SymbolConstants.HMAC_PASSPHRASE, RandomStringUtils.randomAscii(10));

    configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery");
    configuration.add(SymbolConstants.SESSION_LOCKING_ENABLED, "true");
    configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,fr");
    // configuration.add(SymbolConstants.DEFAULT_STYLESHEET, "context:styles/empty.css");

    // The application version number is incorporated into URLs for some
    // assets. Web browsers will cache assets because of the far future expires
    // header. If existing assets are changed, the version number should also
    // change, to force the browser to download new versions.
    configuration.add(SymbolConstants.APPLICATION_VERSION, "1.0");
    configuration.add(SymbolConstants.START_PAGE_NAME, "SEC");
    configuration.add(SymbolConstants.SECURE_ENABLED, "true");

    configuration.add(SymbolConstants.HOSTPORT, "8080");
    configuration.add(SymbolConstants.HOSTPORT_SECURE, "8443");

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

    configuration.add(SymbolConstants.TAPESTRY_VERSION, "false");

    // Check JCE Unlimited StrengthJurisdictionPolicyFilesInstalled
    try {
      if (Cipher.getMaxAllowedKeyLength("AES") < 2147483647) {
        LOG.error(
            "### JCE Unlimited Strength Jurisdiction Policy Files is NOT Installed.\n"
                + "http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html");
      }
    } catch (NoSuchAlgorithmException e) {
      LOG.error(
          "### JCA JSSE JCE API not found. - http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136007.html");
    }
  }
 public void contributeMetaDataLocator(MappedConfiguration<String, String> configuration) {
   // Enabling @Secure only on some pages (the remaining ones are insecure)
   configuration.add(MetaDataConstants.SECURE_PAGE, "true");
 }
 public static void contributeApplicationDefaults(
     MappedConfiguration<String, String> configuration) {
   configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en_US,en_GB,fr");
 }
 @SuppressWarnings("unchecked")
 public static void contributeTranslatorSource(
     MappedConfiguration<Class, Translator> configuration) {
   configuration.add(Boolean.class, new YesNoTranslator());
 }
 @SuppressWarnings("unchecked")
 public static void contributeFieldValidatorSource(
     MappedConfiguration<String, Validator> configuration) {
   configuration.add("letters", new Letters());
 }
 @SuppressWarnings("unchecked")
 public static void contributeServiceOverride(MappedConfiguration<Class, Object> configuration) {
   configuration.add(ClasspathURLConverter.class, new ClasspathURLConverterJBoss5());
 }
  /** @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 contributeClasspathAssetAliasManager(
     MappedConfiguration<String, String> configuration) {
   configuration.add(PATH_PREFIX + "-" + version, "org/tynamo/security/federatedaccounts");
 }