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());
}