Package org.apache.jetspeed.util.descriptor

Examples of org.apache.jetspeed.util.descriptor.PortletApplicationDescriptor


    //    }

    public void testLoadPortletApplicationTree() throws Exception
    {
        System.out.println("Testing loadPortletApplicationTree");
        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader("./test/testdata/deploy/portlet.xml"), "unit-test");
        MutablePortletApplication app = pad.createPortletApplication();
        assertNotNull("App is null", app);
        assertNotNull("Version is null", app.getVersion());
        assertTrue("Version invalid: " + app.getVersion(), app.getVersion().equals("1.0"));
        assertNotNull("PA Identifier is null", app.getApplicationIdentifier());
        assertTrue(
View Full Code Here


        {
            portletRegistry.removeApplication(app);
         
        }

        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader("./test/testdata/deploy/portlet2.xml"), "HW_App");
        app = pad.createPortletApplication();

        app.setName("HW_App");

        portletRegistry.registerPortletApplication(app);
View Full Code Here

    // innerTestSetUserInfoMap(multi);
    // }

    private void innerTestSetUserInfoMap(UserInfoManager uim) throws Exception
    {
        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader("test/testdata/deploy/portlet.xml"), "unit-test");
        portletApp = pad.createPortletApplication();
        assertNotNull("App is null", portletApp);

        // persist the app
        try
        {
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();       
        registry.registerPortletApplication(app);
    }
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();       
        registry.registerPortletApplication(app);
    }
View Full Code Here

    // innerTestSetUserInfoMap(multi);
    // }

    private void innerTestSetUserInfoMap(UserInfoManager uim) throws Exception
    {
        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader("test/testdata/deploy/portlet.xml"), "unit-test");
        portletApp = pad.createPortletApplication(true);
        assertNotNull("App is null", portletApp);

        // persist the app
        try
        {
View Full Code Here

    }

    /** Test set user info map. */
    public void testSetUserInfoMap() throws Exception
    {
        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader("./test/testdata/deploy/portlet.xml"), "unit-test");
        MutablePortletApplication app = pad.createPortletApplication();           
        assertNotNull("App is null", app);

        // persist the app
        try
        {           
View Full Code Here

    {
        PortletCache portletCache = new PortletCache();
        new JetspeedPortletFactoryProxy(new JetspeedPortletFactory(portletCache));
       
        System.out.println("Testing loadPortletApplicationTree");
        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader("./test/testdata/deploy/portlet.xml"), "unit-test");
        MutablePortletApplication app = pad.createPortletApplication();
        assertNotNull("App is null", app);
        assertNotNull("Version is null", app.getVersion());
        assertTrue("Version invalid: " + app.getVersion(), app.getVersion().equals("1.0"));
        assertNotNull("PA Identifier is null", app.getApplicationIdentifier());
        assertTrue(
View Full Code Here

        {
            portletRegistry.removeApplication(app);
         
        }

        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader("./test/testdata/deploy/portlet2.xml"), "HW_App");
        app = pad.createPortletApplication();

        app.setName("HW_App");

        portletRegistry.registerPortletApplication(app);
View Full Code Here

            {
                throw new PortletApplicationException("Failed to find Portlet XML");
            }
            portletXmlReader = new InputStreamReader(is);      
             
            PortletApplicationDescriptor paDescriptor = new PortletApplicationDescriptor(portletXmlReader, paName);
            portletApp = paDescriptor.createPortletApplication();
            portletApp.setChecksum(ChecksumHelper.getChecksum(is));

            Reader extendedXmlReader = null;
            InputStream eis = null;          
            try
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.util.descriptor.PortletApplicationDescriptor

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.