skinName = "common";
}
}
// find the correct skin
SkinDescription desc = null;
final Iterator i = portalService.getSkinDescriptions().iterator();
while ( i.hasNext() && desc == null ) {
final SkinDescription current = (SkinDescription)i.next();
if ( current.getName().equals(skinName) ) {
desc = current;
}
}
if ( desc != null ) {
if ( "skin".equals(name) ) {
return skinName;
} else if ( "skin.basepath".equals(name) ) {
return desc.getBasePath();
} else if ( "skin.thumbnailpath".equals(name) ) {
return desc.getThumbnailPath();
} else if ( name.startsWith("skin.thumbnailuri.") ) {
String selectedSkinName = name.substring(name.lastIndexOf(".")+ 1, name.length());
for(Iterator it = portalService.getSkinDescriptions().iterator(); it.hasNext();) {
SkinDescription selected = (SkinDescription) it.next();
if(selected.getName().equals(selectedSkinName)) {
return selected.getBasePath() + "/" + selected.getThumbnailPath();
}
}
}
}
return null;