// SECURITY filtering
String uniqueName = pa.getName() + "::" + portlet.getPortletName();
if (securityAccessController.checkPortletAccess(portlet, JetspeedActions.MASK_VIEW))
{
InitParam param = portlet.getInitParam(PORTLET_ICON);
String image;
if (param != null)
{
//String relativeImagePath = param.getValue();
//String context = muta.getWebApplicationDefinition().getContextRoot();
// Have to use a supported icon in jetspeed, otherwise image can be out of skew
String imagePath = param.getParamValue();
if (imagePath == null)
{
image = DEFAULT_IMAGES[rand.nextInt(DEFAULT_IMAGES.length)];
}
else
{
if (-1 == imagePath.indexOf("/"))
image = "images/portlets/" + param.getParamValue();
else
image = param.getParamValue();
}
}
else
{
image = DEFAULT_IMAGES[rand.nextInt(DEFAULT_IMAGES.length)];