Package org.apache.jetspeed.om.common.servlet

Examples of org.apache.jetspeed.om.common.servlet.MutableWebApplication


        pa.setApplicationType(MutablePortletApplication.WEBAPP);
      }

      // load the web.xml
      log.info("Loading web.xml...." + paName);
      MutableWebApplication wa = paWar.createWebApp();
      paWar.validate();

      if (local)
      {
        wa.setContextRoot("<portal>");
      }

      pa.setWebApplicationDefinition(wa);
    }
    catch (Exception e)
View Full Code Here


        PortletApplicationWar paWar = new PortletApplicationWar(new DirectoryHelper(warFile), "unit-test", "/" );

        MutablePortletApplication app = paWar.createPortletApp();
        assertNotNull("App is null", app);

        MutableWebApplication webApp = paWar.createWebApp();
        assertNotNull("WebApp is null", webApp);

        app.setWebApplicationDefinition(webApp);

        PortletDefinition portlet = app.getPortletDefinitionByName("TestPortlet");
        assertNotNull("TestPortlet is null", portlet);
        checkWebSecurityRoles(webApp);
        checkPortletSecurityRoleRefs(portlet);
        boolean validateFailed = false;
        try
        {
            paWar.validate();
        }
        catch (PortletApplicationException e)
        {
            validateFailed = true;
        }
        assertTrue("Invalid PortletDescriptor validation result", validateFailed);
        SecurityRoleImpl role = new SecurityRoleImpl();
        role.setRoleName("users.manager");
        webApp.addSecurityRole(role);
        try
        {
            paWar.validate();
            validateFailed = false;
        }
View Full Code Here

      pa = paWar.createPortletApp(paClassLoader);
      pa.setApplicationType(paType);

      // load the web.xml
      log.info("Loading web.xml...." + paName);
      MutableWebApplication wa = paWar.createWebApp();
      paWar.validate();

      if (paType == MutablePortletApplication.LOCAL)
      {
        wa.setContextRoot("<portal>");
      }
            else if (paType == MutablePortletApplication.INTERNAL)
            {
                // TODO: this is screwing up the PSML as its set all over the place to "jetspeed-layouts", not good
                wa.setContextRoot("/" + paName);               
            }

      pa.setWebApplicationDefinition(wa);
           
            // Make sure existing entities are refreshed with the most
View Full Code Here

   
    public void register(String appName, String appDescriptor, String webappDescriptor, String extendedDescriptor)
    throws Exception
    {
        WebApplicationDescriptor wad = new WebApplicationDescriptor(new FileReader(webappDescriptor), "/" + appName);
        MutableWebApplication webapp = wad.createWebApplication();
        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader(appDescriptor), appName);       
        MutablePortletApplication app = pad.createPortletApplication(true);               
        app.setWebApplicationDefinition(webapp);
        ExtendedPortletMetadata extMetaData = new ExtendedPortletMetadata(new FileReader(extendedDescriptor), app);
        extMetaData.load();       
View Full Code Here

        PortletApplicationWar paWar = new PortletApplicationWar(new DirectoryHelper(warFile), "unit-test", "/" );

        MutablePortletApplication app = paWar.createPortletApp(false);
        assertNotNull("App is null", app);

        MutableWebApplication webApp = paWar.createWebApp();
        assertNotNull("WebApp is null", webApp);

        app.setWebApplicationDefinition(webApp);

        PortletDefinition portlet = app.getPortletDefinitionByName("TestPortlet");
        assertNotNull("TestPortlet is null", portlet);
        checkWebSecurityRoles(webApp);
        checkPortletSecurityRoleRefs(portlet);
        boolean validateFailed = false;
        try
        {
            paWar.validate();
        }
        catch (PortletApplicationException e)
        {
            validateFailed = true;
        }
        assertTrue("Invalid PortletDescriptor validation result", validateFailed);
        SecurityRoleImpl role = new SecurityRoleImpl();
        role.setRoleName("users.manager");
        webApp.addSecurityRole(role);
        try
        {
            paWar.validate();
            validateFailed = false;
        }
View Full Code Here

      pa = paWar.createPortletApp(true, paClassLoader);
      pa.setApplicationType(paType);

      // load the web.xml
      log.info("Loading web.xml...." + paName);
      MutableWebApplication wa = paWar.createWebApp();
      paWar.validate();

      if (paType == MutablePortletApplication.LOCAL)
      {
        wa.setContextRoot("<portal>");
      }
            else if (paType == MutablePortletApplication.INTERNAL)
            {
                // TODO: this is screwing up the PSML as its set all over the place to "jetspeed-layouts", not good
                wa.setContextRoot("/" + paName);               
            }

      pa.setWebApplicationDefinition(wa);
           
            // Make sure existing entities are refreshed with the most
View Full Code Here

        PortletApplicationWar paWar = new PortletApplicationWar(new DirectoryHelper(warFile), "unit-test", "/" );

        MutablePortletApplication app = paWar.createPortletApp();
        assertNotNull("App is null", app);

        MutableWebApplication webApp = paWar.createWebApp();
        assertNotNull("WebApp is null", webApp);

        app.setWebApplicationDefinition(webApp);

        PortletDefinition portlet = app.getPortletDefinitionByName("TestPortlet");
        assertNotNull("TestPortlet is null", portlet);
        checkWebSecurityRoles(webApp);
        checkPortletSecurityRoleRefs(portlet);
        boolean validateFailed = false;
        try
        {
            paWar.validate();
        }
        catch (PortletApplicationException e)
        {
            validateFailed = true;
        }
        assertTrue("Invalid PortletDescriptor validation result", validateFailed);
        SecurityRoleImpl role = new SecurityRoleImpl();
        role.setRoleName("users.manager");
        webApp.addSecurityRole(role);
        try
        {
            paWar.validate();
            validateFailed = false;
        }
View Full Code Here

        pa.setApplicationType(MutablePortletApplication.WEBAPP);
      }

      // load the web.xml
      log.info("Loading web.xml...." + paName);
      MutableWebApplication wa = paWar.createWebApp();
      paWar.validate();

      if (local)
      {
        wa.setContextRoot("<portal>");
      }

      pa.setWebApplicationDefinition(wa);
           
            // Make sure existing entities are refreshed with the most
View Full Code Here

   
    public void register(String appName, String appDescriptor, String webappDescriptor, String extendedDescriptor)
    throws Exception
    {
        WebApplicationDescriptor wad = new WebApplicationDescriptor(new FileReader(webappDescriptor), "/" + appName);
        MutableWebApplication webapp = wad.createWebApplication();
        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader(appDescriptor), appName);       
        MutablePortletApplication app = pad.createPortletApplication();               
        app.setWebApplicationDefinition(webapp);
        ExtendedPortletMetadata extMetaData = new ExtendedPortletMetadata(new FileReader(extendedDescriptor), app);
        extMetaData.load();       
View Full Code Here

   
    public void register(String appName, String appDescriptor, String webappDescriptor, String extendedDescriptor)
    throws Exception
    {
        WebApplicationDescriptor wad = new WebApplicationDescriptor(new FileReader(webappDescriptor), "/" + appName);
        MutableWebApplication webapp = wad.createWebApplication();
        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader(appDescriptor), appName);       
        MutablePortletApplication app = pad.createPortletApplication();               
        app.setWebApplicationDefinition(webapp);
        ExtendedPortletMetadata extMetaData = new ExtendedPortletMetadata(new FileReader(extendedDescriptor), app);
        extMetaData.load();       
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.common.servlet.MutableWebApplication

Copyright © 2018 www.massapicom. 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.