Package org.apache.jetspeed.om.profile

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


        {
            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++)
                        {
                            Portlets pane = tmpPortlets.getPortlets(i);
                            pane.setLayout(null);                           
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++)
                        {
                            Portlets pane = tmpPortlets.getPortlets(i);
                            pane.setLayout(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

        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

        if ((newControlName.trim().length() > 0))
        {
          control = PortalToolkit.getControl(newControlName);
          if (control != null)
          {
            Control psmlControl = new PsmlControl();
            psmlControl.setName(newControlName);
            entry.setControl(psmlControl);
          }
          else
          {
            logger.warn(
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++)
                        {
                            Portlets pane = tmpPortlets.getPortlets(i);
                            pane.setLayout(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

        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

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.