Examples of WebappConfiguration


Examples of com.google.opengse.configuration.WebAppConfiguration

   */
  public static WebApp createWebApp(File contextBase, String uriPrefix,
      ServletContainerContext containerContext)
      throws WebAppConfigurationException, ClassNotFoundException,
      InstantiationException, IllegalAccessException {
    WebAppConfiguration config = WebAppConfigurationFactory
        .getConfiguration(contextBase);
    File webinfdir = new File(contextBase, "WEB-INF");
    File classesdir = new File(webinfdir, "classes");
    File libdir = new File(webinfdir, "lib");
    List<URL> urlList = new ArrayList<URL>();
View Full Code Here

Examples of com.google.opengse.configuration.WebAppConfiguration

  public void testParse() throws Exception {
    String testFile = "test1.web.xml";
    byte[] inputBytes = getResourceBytes(testFile);
    InputStream webxmlStream = new ByteArrayInputStream(inputBytes);
    WebAppConfiguration config = parser
        .parse(new InputStreamReader(webxmlStream));
    StringWriter stringWriter = new StringWriter();
    PrintWriter out = new PrintWriter(stringWriter);
    WebXmlDump.dump(config, out);
    out.close();
View Full Code Here

Examples of com.google.opengse.configuration.WebAppConfiguration

        .parse(new InputStreamReader(webxmlStream1));

  }

  public void testCombine() throws Exception {
    WebAppConfiguration config1 = getConfigFromResource("test1.web.xml");
    WebAppConfiguration config2 = getConfigFromResource("test2.web.xml");

    WebAppConfiguration combinedConfig = WebAppConfigurationCombiner.combine(config1, config2);

    String combinedWebXml = toString(combinedConfig);
    String expectedCombinedWebXml = getResourceAsString("test1_and_test2_combined.xml");
    assertEquals("Did not get expected web.xml", expectedCombinedWebXml, combinedWebXml);
  }
View Full Code Here

Examples of com.google.opengse.configuration.WebAppConfiguration

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

    WebAppConfiguration config;
    WebAppWelcomeFileList welcomeFileList;
    String contextdir = this.getServletContext().getRealPath("/");
    try {
      config = WebAppConfigurationFactory.getConfiguration(new File(contextdir));
      welcomeFileList = config.getWelcomeFileList();
    } catch (WebAppConfigurationException e) {
      // Errors on getting configuration from web.xml
      welcomeFileList = null;
    }
    if (welcomeFileList != null) {
View Full Code Here

Examples of com.google.opengse.configuration.WebAppConfiguration

  public static WebApp create(String uriPrefix, File contextbase,
                              ClassLoader classLoader, WebAppConfiguration localConfig,
                              ServletContainerContext containerContext)
      throws WebAppConfigurationException, ClassNotFoundException,
      IllegalAccessException, InstantiationException {
    WebAppConfiguration globalConfig;
    try {
      globalConfig =
          GlobalConfigurationFactory.getGlobalConfiguration(classLoader);
    } catch (IOException e) {
      throw new WebAppConfigurationException("", e);
View Full Code Here

Examples of org.apache.archiva.configuration.WebappConfiguration

            legacyArtifactPaths.add( v );
        }
        value.setLegacyArtifactPaths( legacyArtifactPaths );
        RepositoryScanningConfiguration repositoryScanning = readRepositoryScanningConfiguration( prefix + "repositoryScanning.", registry );
        value.setRepositoryScanning( repositoryScanning );
        WebappConfiguration webapp = readWebappConfiguration( prefix + "webapp.", registry );
        value.setWebapp( webapp );
        OrganisationInformation organisationInfo = readOrganisationInformation( prefix + "organisationInfo.", registry );
        value.setOrganisationInfo( organisationInfo );
        NetworkConfiguration networkConfiguration = readNetworkConfiguration( prefix + "networkConfiguration.", registry );
        value.setNetworkConfiguration( networkConfiguration );
View Full Code Here

Examples of org.apache.archiva.configuration.WebappConfiguration

        return value;
    }
   
    private WebappConfiguration readWebappConfiguration( String prefix, Registry registry )
    {
        WebappConfiguration value = new WebappConfiguration();

        UserInterfaceOptions ui = readUserInterfaceOptions( prefix + "ui.", registry );
        value.setUi( ui );

        return value;
    }
View Full Code Here

Examples of org.apache.archiva.configuration.WebappConfiguration

            legacyArtifactPaths.add( v );
        }
        value.setLegacyArtifactPaths( legacyArtifactPaths );
        RepositoryScanningConfiguration repositoryScanning = readRepositoryScanningConfiguration( prefix + "repositoryScanning.", registry );
        value.setRepositoryScanning( repositoryScanning );
        WebappConfiguration webapp = readWebappConfiguration( prefix + "webapp.", registry );
        value.setWebapp( webapp );
        OrganisationInformation organisationInfo = readOrganisationInformation( prefix + "organisationInfo.", registry );
        value.setOrganisationInfo( organisationInfo );
        NetworkConfiguration networkConfiguration = readNetworkConfiguration( prefix + "networkConfiguration.", registry );
        value.setNetworkConfiguration( networkConfiguration );
View Full Code Here

Examples of org.apache.archiva.configuration.WebappConfiguration

        return value;
    }
   
    private WebappConfiguration readWebappConfiguration( String prefix, Registry registry )
    {
        WebappConfiguration value = new WebappConfiguration();

        UserInterfaceOptions ui = readUserInterfaceOptions( prefix + "ui.", registry );
        value.setUi( ui );

        return value;
    }
View Full Code Here

Examples of org.apache.archiva.configuration.WebappConfiguration

    }

    public UiConfiguration getUiConfiguration()
        throws RepositoryAdminException
    {
        WebappConfiguration webappConfiguration = getArchivaConfiguration().getConfiguration().getWebapp();
        if ( webappConfiguration == null )
        {
            return null;
        }
        UserInterfaceOptions userInterfaceOptions = webappConfiguration.getUi();
        if ( userInterfaceOptions == null )
        {
            return null;
        }
        return new BeanReplicator().replicateBean( userInterfaceOptions, UiConfiguration.class );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.