Package org.apache.jetspeed.om.profile

Examples of org.apache.jetspeed.om.profile.ProfileLocator


     * @param locatorPath ProfileLocator resource path identifier
     * @return a portlets collection from the PSML resource
     */
    public Portlets getReference(String locatorPath)
    {
        ProfileLocator locator = Profiler.createLocator();
        locator.createFromPath(locatorPath);
        String id = locator.getId();

        try
        {
            Profile profile = Profiler.getProfile(locator);
            PSMLDocument doc = profile.getDocument();
View Full Code Here


     * Test the base link
     * @throws Exception
     */
    public void testBaseLink() throws Exception
    {
        ProfileLocator profileLocator = null;

        // Create the RunData object to be used during testing.
        RunData rundata = RunDataFactory.getRunData( request, response, config );
        assertNotNull( "Got rundata", rundata);
        TurbineTestUtilities.setupRunData(rundata);
View Full Code Here

        assertNotNull( "Got profile from Profiler", profile);
       
        // Verify the profile location information in the profile
        if (profile instanceof ProfileLocator)
        {
            ProfileLocator profileLocator = (ProfileLocator) profile;
            assertTrue("Verify the 'anonymous' is set", profileLocator.getAnonymous());
            assertNull("Verify the group is null", profileLocator.getGroup());
            assertNull("Verify the role is null", profileLocator.getRole());
        } else
        {
            assertTrue( "profile does not implement ProfileLocator", false);
        }
       
View Full Code Here

       
        // Verify the profile location information in the profile
        if (profile instanceof ProfileLocator)
        {
            // FIXME: Need to verify 'anonymous' and group name
            ProfileLocator profileLocator = (ProfileLocator) profile;
//            assertTrue("Verify the 'anonymous' is set", profileLocator.getAnonymous());
            assertNotNull("Verify the group is not null", profileLocator.getGroup());
            assertNull("Verify the role is null", profileLocator.getRole());
        } else
        {
            assertTrue( "profile does not implement ProfileLocator", false);
        }
        TurbineTestUtilities.generatePage(rundata);
View Full Code Here

        assertNotNull( "Got profile from Profiler", profile);
       
        // Verify the profile location information in the profile
        if (profile instanceof ProfileLocator)
        {
            ProfileLocator profileLocator = (ProfileLocator) profile;
            // FIXME: Need to verify 'anonymous' and page name
            assertTrue("Verify the 'anonymous' is set", profileLocator.getAnonymous());
            assertNull("Verify the group is null", profileLocator.getGroup());
            assertNull("Verify the role is null", profileLocator.getRole());
            assertEquals("Verify the page name", profileLocator.getName(), TEST_PAGE + ".psml");
        } else
        {
            assertTrue( "profile does not implement ProfileLocator", false);
        }
        TurbineTestUtilities.generatePage(rundata);
View Full Code Here

        assertNotNull( "Got profile from Profiler", profile);
       
        // Verify the profile location information in the profile
        if (profile instanceof ProfileLocator)
        {
            ProfileLocator profileLocator = (ProfileLocator) profile;
            // FIXME: Need to verify 'anonymous' and page name
            assertTrue("Verify the 'anonymous' is not", !profileLocator.getAnonymous());
            assertNull("Verify the group is null", profileLocator.getGroup());
            assertNull("Verify the role is null", profileLocator.getRole());
            assertNotNull("Verify the user is not null", profileLocator.getUser());
            assertTrue("Verify the user is logged in", profileLocator.getUser().hasLoggedIn());
            assertEquals("Verify the user's username", profileLocator.getUser().getUserName(),TEST_USER);
            assertEquals("Verify the page name", profileLocator.getName(), TEST_DEFAULT_PAGE + ".psml");
        } else
        {
            assertTrue( "profile does not implement ProfileLocator", false);
        }
        TurbineTestUtilities.generatePage(rundata);
View Full Code Here

     * @throws Exception
     */
    public void testCreateTestPSML() throws Exception
    {
        Portlets rootPortletSet = null;
        ProfileLocator currentLocator = null;
        ProfileLocator newLocator = null;
        PsmlController controller = null;
        PsmlPortlets portlets = null;
        PsmlSkin skin = null;

        // Create the RunData object to be used during testing.
        rundata = RunDataFactory.getRunData( request, response, config );
        assertNotNull( "Got rundata", rundata);

        TurbineTestUtilities.setupRunData(rundata);
        // Verify we have a profile
        Profile profile = Profiler.getProfile(rundata);
        assertNotNull( "Got profile from Profiler", profile);

        // Verify the profile location information in the profile
        if (profile instanceof ProfileLocator)
        {
            currentLocator = (ProfileLocator) profile;
        }

        newLocator = Profiler.createLocator();
        newLocator.setGroupByName(TEST_GROUP);
        newLocator.setMediaType(currentLocator.getMediaType());
        newLocator.setName(TEST_SECURITY_PAGE);

        // Create portlet set
        portlets = new PsmlPortlets();
        controller = new PsmlController();
        controller.setName("RowController");
View Full Code Here

        assertNotNull( "Got profile from Profiler", profile);

        // Verify the profile location information in the profile
        if (profile instanceof ProfileLocator)
        {
            ProfileLocator profileLocator = (ProfileLocator) profile;
            assertTrue("Verify the 'anonymous' is not set", !profileLocator.getAnonymous());
            assertNull("Verify the user is null", profileLocator.getUser());
            assertNull("Verify the role is null", profileLocator.getRole());
            assertEquals("Verify the page name", profileLocator.getName(), TEST_SECURITY_PAGE + ".psml");
        } else
        {
            assertTrue( "profile does not implement ProfileLocator", false);
        }
        TurbineTestUtilities.generatePage(rundata);
View Full Code Here

        assertNotNull( "Got profile from Profiler", profile);

        // Verify the profile location information in the profile
        if (profile instanceof ProfileLocator)
        {
            ProfileLocator profileLocator = (ProfileLocator) profile;
            assertTrue("Verify the 'anonymous' is not set", !profileLocator.getAnonymous());
            assertNull("Verify the user is null", profileLocator.getUser());
            assertNull("Verify the role is null", profileLocator.getRole());
            assertEquals("Verify the page name", profileLocator.getName(), TEST_SECURITY_PAGE + ".psml");
        } else
        {
            assertTrue( "profile does not implement ProfileLocator", false);
        }
        TurbineTestUtilities.generatePage(rundata);
View Full Code Here

        assertNotNull( "Got profile from Profiler", profile);

        // Verify the profile location information in the profile
        if (profile instanceof ProfileLocator)
        {
            ProfileLocator profileLocator = (ProfileLocator) profile;
            assertTrue("Verify the 'anonymous' is not set", !profileLocator.getAnonymous());
            assertNull("Verify the user is null", profileLocator.getUser());
            assertNull("Verify the role is null", profileLocator.getRole());
            assertEquals("Verify the page name", profileLocator.getName(), TEST_SECURITY_PAGE + ".psml");
        } else
        {
            assertTrue( "profile does not implement ProfileLocator", false);
        }
        TurbineTestUtilities.generatePage(rundata);
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.profile.ProfileLocator

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.