@Override
protected DescriptionBean load()
{
Description description = null;
PortletApplication app = locator.getPortletRegistry().getPortletApplication(paNodeBean.getApplicationName());
PortletDefinition def = null;
if (paNodeBean.getName() != null)
{
def = app.getPortlet(paNodeBean.getName());
}
if (def != null)
{
if (type == InitParam.class)
{
InitParam param = def.getInitParam(name);
description = param.getDescription(locale);
}
else if (type == SecurityRoleRef.class)
{
SecurityRoleRef securityRoleRef = def.getSecurityRoleRef(name);
description = securityRoleRef.getDescription(locale);
}
}
else
{
UserAttribute attr = app.getUserAttribute(name);
description = attr.getDescription(locale);
}
return new DescriptionBean(description);
}