Package org.apache.jetspeed.portal

Examples of org.apache.jetspeed.portal.PortletSkin


                skinChanged = (newSkinName.trim().length() > 0);
            }

            if (skinChanged == true)
            {
                PortletSkin skin = null;
                if ((newSkinName.trim().length() > 0))
                {
                    skin = PortalToolkit.getSkin(newSkinName);
                    if (skin != null)
                    {
View Full Code Here


     * @param skin the PSML Skin object
     * @return the new PortletSkin object
     */
    public PortletSkin getSkin(Skin skin)
    {
        PortletSkin result = null;
        String name = null;

        if (skin != null)
        {
            name = skin.getName();

            // create the PortletSkin corresponding to this entry
            result = getSkin(name);

            // override the values with the locally defined properties
            result.putAll(getParameters(skin));

        }

        return result;
    }
View Full Code Here

            Portlets portlets = profile.getDocument().getPortletsById(set.getID());
           
            // skin is neither null nor zero-length
            if ((skin != null) && (skin.trim().length() > 0))
            {
                PortletSkin s = PortalToolkit.getSkin(skin);

                if (s != null)
                {
                    set.getPortletConfig().setPortletSkin(s);

                    Skin psmlSkin = portlets.getSkin();
                    if (psmlSkin == null)
                    {
                        portlets.setSkin(new PsmlSkin());
                    }
                    portlets.getSkin().setName(skin);
                }
                else
                {
                    logger.warn("Unable to update skin for portlet set "
                             + set.getID() + " because skin " + skin
                             + " does not exist.");
                    return;
                }
            }
            else
            {
              // skin is either null or zero-length
              String custPortletSetID = portlets.getId();
              String rootPortletSetID = profile.getRootSet().getID();
             
              // set system default skin for root PSML element
              if (custPortletSetID != null && rootPortletSetID != null &&
                  custPortletSetID.equals(rootPortletSetID))
              {
                // get system default skin
                String defaultSkinName = JetspeedResources.getString("services.PortalToolkit.default.skin");
                PortletSkin defaultSkin = PortalToolkit.getSkin(defaultSkinName);
               
                if (defaultSkin != null)
                {
                  set.getPortletConfig().setPortletSkin((PortletSkin) defaultSkin);
                  Skin psmlSkin = portlets.getSkin();
                 
                  if (psmlSkin == null)
                  {
                    portlets.setSkin(new PsmlSkin());
                  }
               
                  portlets.getSkin().setName(defaultSkin.getName());
                }
                else
                {
                    logger.warn("Unable to set default skin for root portlet set "
                             + set.getID() + " because skin " + skin
View Full Code Here

     * @param skin the PSML Skin object
     * @return the new PortletSkin object
     */
    public PortletSkin getSkin(Skin skin)
    {
        PortletSkin result = null;
        String name = null;

        if (skin != null)
        {
            name = skin.getName();

            // create the PortletSkin corresponding to this entry
            result = getSkin(name);

            // override the values with the locally defined properties
            result.putAll(getParameters(skin));

        }

        return result;
    }
View Full Code Here

                skinChanged = (newSkinName.trim().length() > 0);
            }

            if (skinChanged == true)
            {
                PortletSkin skin = null;
                if ((newSkinName.trim().length() > 0))
                {
                    skin = PortalToolkit.getSkin(newSkinName);
                    if (skin != null)
                    {
View Full Code Here

     * @param skin the PSML Skin object
     * @return the new PortletSkin object
     */
    public PortletSkin getSkin(Skin skin)
    {
        PortletSkin result = null;
        String name = null;

        if (skin != null)
        {
            name = skin.getName();

            // create the PortletSkin corresponding to this entry
            result = getSkin(name);

            // override the values with the locally defined properties
            result.putAll(getParameters(skin));

        }

        return result;
    }
View Full Code Here

                skinChanged = (newSkinName.trim().length() > 0);
            }

            if (skinChanged == true)
            {
                PortletSkin skin = null;
                if ((newSkinName.trim().length() > 0))
                {
                    skin = PortalToolkit.getSkin(newSkinName);
                    if (skin != null)
                    {
View Full Code Here

            String skin = rundata.getParameters().getString("skin");
            Profile profile = ((JetspeedRunData) rundata).getCustomizedProfile();
            Portlets portlets = profile.getDocument().getPortletsById(set.getID());
            if ((skin != null) && (skin.trim().length() > 0))
            {
                PortletSkin s = PortalToolkit.getSkin(skin);

                if (s != null)
                {
                    set.getPortletConfig().setPortletSkin(s);
View Full Code Here

                profile.getDocument().getPortletsById(set.getID());

            // skin is neither null nor zero-length
            if ((skin != null) && (skin.trim().length() > 0))
            {
                PortletSkin s = PortalToolkit.getSkin(skin);

                if (s != null)
                {
                    set.getPortletConfig().setPortletSkin(s);

                    Skin psmlSkin = portlets.getSkin();
                    if (psmlSkin == null)
                    {
                        portlets.setSkin(new PsmlSkin());
                    }
                    portlets.getSkin().setName(skin);
                }
                else
                {
                    logger.warn(
                        "Unable to update skin for portlet set "
                            + set.getID()
                            + " because skin "
                            + skin
                            + " does not exist.");
                    return;
                }
            }
            else
            {
                // skin is either null or zero-length
                String custPortletSetID = portlets.getId();
                String rootPortletSetID = profile.getRootSet().getID();

                // set system default skin for root PSML element
                if (custPortletSetID != null
                    && rootPortletSetID != null
                    && custPortletSetID.equals(rootPortletSetID))
                {
                    // get system default skin
                    String defaultSkinName =
                        JetspeedResources.getString(
                            "services.PortalToolkit.default.skin");
                    PortletSkin defaultSkin =
                        PortalToolkit.getSkin(defaultSkinName);

                    if (defaultSkin != null)
                    {
                        set.getPortletConfig().setPortletSkin(
                            (PortletSkin) defaultSkin);
                        Skin psmlSkin = portlets.getSkin();

                        if (psmlSkin == null)
                        {
                            portlets.setSkin(new PsmlSkin());
                        }

                        portlets.getSkin().setName(defaultSkin.getName());
                    }
                    else
                    {
                        logger.warn(
                            "Unable to set default skin for root portlet set "
View Full Code Here

                skinChanged = (newSkinName.trim().length() > 0);
            }

            if (skinChanged == true)
            {
                PortletSkin skin = null;
                if ((newSkinName.trim().length() > 0))
                {
                    skin = PortalToolkit.getSkin(newSkinName);
                    if (skin != null)
                    {
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.portal.PortletSkin

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.