Package org.apache.jetspeed.om.profile

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


                assertTrue(layoutParam.getValue().equals("1"));
                layoutParam = (Parameter)layoutParams.next();
                assertTrue(layoutParam.getName().equals("b"));
                assertTrue(layoutParam.getValue().equals("2"));

                Control control = rootset.getControl();
                assertNotNull(control);
                Iterator controlParams = control.getParameterIterator();
                assertNotNull(controlParams);
                Parameter controlParam = (Parameter)controlParams.next();
                assertTrue(control.getName().equals("TabControl"));
                assertTrue(controlParam.getName().equals("a"));
                assertTrue(controlParam.getValue().equals("1"));
                controlParam = (Parameter)controlParams.next();
                assertTrue(controlParam.getName().equals("b"));
                assertTrue(controlParam.getValue().equals("2"));
View Full Code Here


        {
            try
            {
                // Create an empty portlet container
                Portlets portlets = new PsmlPortlets();
                Control control = new PsmlControl();
                control.setName(this.rolemergeControl);
                portlets.setControl(control);
                Controller controller = new PsmlController();
                controller.setName(this.rolemergeController);
                portlets.setController(controller);

                // Set the skin
                Skin skin = new PsmlSkin();
                skin.setName(PortalToolkit.getSkin((String) null).getName());
                portlets.setSkin(skin);

                String mediaType = null;

                // Process each role profile
                int paneCount = 0;
                for (Iterator it = profiles.iterator(); it.hasNext();)
                {
                    Profile roleProfile = (Profile) it.next();
                    mediaType =
                        mediaType == null
                            ? roleProfile.getMediaType()
                            : mediaType;
                    Profile tmpProfile = (Profile) roleProfile.clone();
                    Portlets tmpPortlets =
                        tmpProfile.getDocument().getPortlets();

                    // If topmost control is a tab control, then add each tab to the container
                    Control paneControl = tmpPortlets.getControl();
                    if (paneControl != null
                        && paneControl.getName().equals(this.rolemergeControl))
                    {
                        for (int i = 0;
                            i < tmpPortlets.getPortletsCount();
                            i++)
                        {
View Full Code Here

            try
            {
                // Create an empty portlet container
                Portlets portlets = new PsmlPortlets();
                Control control = new PsmlControl();
                control.setName(this.groupmergeControl);
                portlets.setControl(control);
                Controller controller = new PsmlController();
                controller.setName(this.groupmergeController);
                portlets.setController(controller);

                // Set title
                portlets.setTitle("Home Page");

                // Set the skin
                Skin skin = new PsmlSkin();
                skin.setName(PortalToolkit.getSkin((String) null).getName());
                portlets.setSkin(skin);

                // Set top level security ref
                if (groupmergeSecurityref != null)
                {
                    SecurityEntry entry =
                        (SecurityEntry) Registry.getEntry(
                            Registry.SECURITY,
                            groupmergeSecurityref);
                    if (entry != null)
                    {
                        SecurityReference ref = new BaseSecurityReference();
                        ref.setParent(entry.getName());
                        portlets.setSecurityRef(ref);
                    }
                }

                String mediaType = null;

                // Process each group profile
                int paneCount = 0;
                for (Iterator it = profiles.iterator(); it.hasNext();)
                {
                    Profile groupProfile = (Profile) it.next();
                    mediaType =
                        mediaType == null
                            ? groupProfile.getMediaType()
                            : mediaType;
                    Profile tmpProfile = (Profile) groupProfile.clone();
                    Portlets tmpPortlets =
                        tmpProfile.getDocument().getPortlets();

                    // If topmost control is a tab control, then add each tab to the container
                    Control paneControl = tmpPortlets.getControl();
                    if (paneControl != null
                        && paneControl.getName().equals(this.groupmergeControl))
                    {
                        for (int i = 0;
                            i < tmpPortlets.getPortletsCount();
                            i++)
                        {
View Full Code Here

        String[] pnames = new String[userSelections.size()];
        userSelections.keySet().toArray(pnames);
        //String[] pnames = rundata.getParameters().getStrings("pname");

        // Create a ClearPortletControl
        Control ctrl = new PsmlControl();
        ctrl.setName("ClearPortletControl");

        if ((pnames != null) && (set != null))
        {
            Portlets portlets =
                ((JetspeedRunData) rundata)
View Full Code Here

        PortletSet set =
            (PortletSet) ((JetspeedRunData) rundata).getCustomized();
        String[] refNames = rundata.getParameters().getStrings("refname");

        // Create a ClearPortletControl
        Control ctrl = new PsmlControl();
        ctrl.setName("ClearPortletControl");

        if ((refNames != null) && (set != null))
        {
            Portlets portlets =
                ((JetspeedRunData) rundata)
View Full Code Here

                    String linkedControl =
                        pc.getConfig().getInitParameter("control");

                    if (linkedControl != null)
                    {
                        Control ctl = new PsmlControl();
                        ctl.setName(linkedControl);
                        portlets.setControl(ctl);
                    }
                    else
                    {
                        portlets.setControl(null);
View Full Code Here

        String[] pnames = new String[userSelections.size()];
        userSelections.keySet().toArray(pnames);
        //String[] pnames = rundata.getParameters().getStrings("pname");

        // Create a ClearPortletControl
        Control ctrl = new PsmlControl();
        ctrl.setName ("ClearPortletControl");

       
        if ((pnames != null) && (set != null))
        {
            Portlets portlets = ((JetspeedRunData) rundata).getCustomizedProfile()
View Full Code Here

    {
        PortletSet set = (PortletSet) ((JetspeedRunData) rundata).getCustomized();
        String[] refNames = rundata.getParameters().getStrings("refname");
       
        // Create a ClearPortletControl
        Control ctrl = new PsmlControl();
        ctrl.setName ("ClearPortletControl");

       
        if ((refNames != null) && (set != null))
        {
            Portlets portlets = ((JetspeedRunData) rundata).getCustomizedProfile()
View Full Code Here

                   
                    String linkedControl = pc.getConfig().getInitParameter("control");

                    if (linkedControl != null)
                    {
                        Control ctl = new PsmlControl();
                        ctl.setName(linkedControl);
                        portlets.setControl(ctl);
                    }
                    else
                    {
                        portlets.setControl(null);
View Full Code Here

                assertTrue(layoutParam.getValue().equals("1"));
                layoutParam = (Parameter)layoutParams.next();
                assertTrue(layoutParam.getName().equals("b"));
                assertTrue(layoutParam.getValue().equals("2"));

                Control control = rootset.getControl();
                assertNotNull(control);
                Iterator controlParams = control.getParameterIterator();
                assertNotNull(controlParams);
                Parameter controlParam = (Parameter)controlParams.next();
                assertTrue(control.getName().equals("TabControl"));
                assertTrue(controlParam.getName().equals("a"));
                assertTrue(controlParam.getValue().equals("1"));
                controlParam = (Parameter)controlParams.next();
                assertTrue(controlParam.getName().equals("b"));
                assertTrue(controlParam.getValue().equals("2"));
View Full Code Here

TOP

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

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.