// Only update the security ref if the parent changed
if ((newSecurityParent != null))
{
boolean securityChanged = false;
SecurityReference currentSecurityRef = pc.getSecurityRef();
if (currentSecurityRef != null)
{
securityChanged = (newSecurityParent.equals(currentSecurityRef.getParent()) == false);
}
else
{
securityChanged = (newSecurityParent.trim().length() > 0);
}
if (securityChanged == true)
{
SecurityReference securityRef = null;
if ((newSecurityParent.trim().length() > 0))
{
securityRef = new BaseSecurityReference();
securityRef.setParent( newSecurityParent);
}
// Note: setting the portlet's config may not be a good idea -
// it might be used as the Portlet for other PSMLDocument Entries that
// have a different idea of security - and the caching of Portlets does
// NOT include security -ggolden.