if (logger.isDebugEnabled())
{
logger.debug("BaseJetspeedLink: elementValue = " + elementValue);
}
uriPathElement = JetspeedResources.PATH_PORTLETID_KEY;
ProfileLocator baseLocator = Profiler.createLocator();
Profile baseProfile = null;
switch (rootType)
{
case JetspeedLink.DEFAULT:
break;
case JetspeedLink.CURRENT:
baseProfile = rundata.getProfile();
break;
case JetspeedLink.GROUP:
baseLocator.setGroupByName(rootValue);
break;
case JetspeedLink.ROLE:
baseLocator.setRoleByName(rootValue);
break;
case JetspeedLink.USER:
try
{
if (logger.isDebugEnabled())
{
logger.debug("BaseJetspeedLink: rootValue user = " + rootValue);
}
baseLocator.setUser(org.apache.jetspeed.services.JetspeedSecurity.getUser(rootValue));
}
catch (Exception se)
{
logger.error("Exception", se);
return null;
}
break;
}
if ((rootType != JetspeedLink.CURRENT) && (rootType != JetspeedLink.DEFAULT))
{
if (mediaType != null && mediaType.length() > 0)
{
baseLocator.setMediaType(mediaType);
}
if (language != null && language.length() > 0)
{
baseLocator.setLanguage(language);
}
if (country != null && country.length() > 0)
{
baseLocator.setCountry(country);
}
if (pageName != null && pageName.length() > 0)
{
baseLocator.setName(pageName);
}
baseProfile = Profiler.getProfile(baseLocator);
}
if (logger.isDebugEnabled())
{
logger.debug("BaseJetspeedLink: baseLocator = " + baseLocator.getPath());
}
if ((baseProfile != null) && (elementValue != null))
{
if (logger.isDebugEnabled())