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

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


      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


           
            app.setChecksum(paWar.getFileSystem().getChecksum(PORTLET_XML));

            // load the web.xml
            log.info("Loading web.xml into memory....");
            MutableWebApplication webapp = paWar.createWebApp();
            paWar.validate();
            app.setWebApplicationDefinition(webapp);

            // save it to the registry
            log.info("Saving the portlet.xml in the registry...");
View Full Code Here

            app.setChecksum(checksum);

            // load the web.xml
            log.info("Loading web.xml into memory...."
                            + portletApplicationName);
            MutableWebApplication webapp = paWar.createWebApp();
            paWar.validate();
            app.setWebApplicationDefinition(webapp);

            // save it to the registry
            log.info("Saving the portlet.xml in the registry..."
View Full Code Here

            //app.setChecksum(checksum);

            // load the web.xml
            log.info("Loading web.xml into memory...."
                            + portletApplicationName);
            MutableWebApplication webapp = createWebApp(contextName, context);
            app.setWebApplicationDefinition(webapp);

            // save it to the registry
            log.info("Saving the portlet.xml in the registry..."
                    + portletApplicationName);
View Full Code Here

    public MutableWebApplication createWebApp(String contextName, ServletContext context)
        throws
            PortletApplicationException,
            IOException
    {       
        MutableWebApplication webApp = null;
        Reader webXmlReader = null;
        InputStream is = null;
       
        try
        {
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

        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);
    }
    catch (Exception e)
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.