* Utility method for retreiving the correct security reference based
* on profile and registry information.
*/
public static SecurityReference getSecurityReference(Entry entry, JetspeedRunData rundata)
{
PortletEntry pEntry = null;
if (entry != null)
{
pEntry = (PortletEntry) Registry.getEntry(Registry.PORTLET, entry.getParent());
}
SecurityReference securityRef = null;
// First, check the profile level security
if (entry != null)
{
securityRef = entry.getSecurityRef();
}
// If no profile level security has been assigned, use the registry
if (securityRef == null && pEntry != null)
{
securityRef = pEntry.getSecurityRef();
}
// still no security? go with the default.
if (securityRef == null && rundata != null)
{