* @param type of entity to return default security ref for
* @return default security reference
*/
public SecurityReference getDefaultSecurityRef(String type)
{
BaseSecurityReference result = null;
SecurityEntry entry = null;
String defaultRef = null;
if (type.equals(Profiler.PARAM_USER))
{
defaultRef = this.defaultUserSecurityRef;
}
else if (type.equals(Profiler.PARAM_ANON))
{
defaultRef = this.defaultAnonSecurityRef;
}
else if (type.equals(Profiler.PARAM_ROLE))
{
defaultRef = this.defaultRoleSecurityRef;
}
else if (type.equals(Profiler.PARAM_GROUP))
{
defaultRef = this.defaultGroupSecurityRef;
}
entry = (SecurityEntry) Registry.getEntry(Registry.SECURITY, defaultRef);
if (Log.getLogger().isDebugEnabled())
{
Log.debug(
"JetspeedPortalToolkit: default security for type: " + type + " is " + defaultRef);
}
if (entry != null)
{
result = new BaseSecurityReference();
result.setParent(entry.getName());
if (Log.getLogger().isDebugEnabled())
{
Log.debug(
"JetspeedPortalToolkit: default security for type: "
+ type