return;
}
// determine profiled page context using profile locator; get
// page profile locator from session/principal profile locators
ProfileLocator locator = selectPageProfileLocator(pageContext.getLocators());
// get request path
String requestPath = locator.getRequestPath();
// get profiled page context initialization parameters
Folder folder = null;
Page page = null;
NodeSet siblingPages = null;
Folder parentFolder = null;
NodeSet siblingFolders = null;
NodeSet rootLinks = null;
NodeSet documentSets = null;
Map documentSetNames = null;
Map documentSetNodeSets = null;
List allProfiledFolders = null;
if (profilingEnabled)
{
// profile page request using profile locator
Folder [] profiledFolder = new Folder[1];
Page [] profiledPage = new Page[1];
List profiledFolders = new ArrayList(16);
List searchProfiledFolders = new ArrayList(24);
// generate profile locator folder/page search paths
List searchPaths = generateProfilingSearchPaths(requestPath, locator, false);
// find page in page manager content using search paths
boolean profiled = findProfiledPageAndFolders(searchPaths, profiledPage, profiledFolder, profiledFolders, searchProfiledFolders);
// profile fallback to default root folder to locate folder/page
boolean rootFallback = false;
if (rootFallback = (! profiled && ! requestPath.equals(Folder.PATH_SEPARATOR)))
{
// profile default root folder, (ignoring request path)
searchPaths = generateProfilingSearchPaths(Folder.PATH_SEPARATOR, locator, true);
profiled = findProfiledPageAndFolders(searchPaths, profiledPage, profiledFolder, profiledFolders, searchProfiledFolders);
// if profiled successfully at root fallback but failed previous
// attempt, profile request path against available alternate profile
// locators. This is used only to select a page: all other context
// information remains determined from fallback.
if (profiled && (pageContext.getLocators().size() > 1))
{
// profile to locate request path using alternate locators
Page [] alternateProfiledPage = new Page[1];
Iterator locatorsIter = selectAlternatePageProfileLocators(pageContext.getLocators()).iterator();
while ((alternateProfiledPage[0] == null) && locatorsIter.hasNext())
{
ProfileLocator alternateLocator = (ProfileLocator) locatorsIter.next();
List alternateSearchPaths = generateProfilingSearchPaths(requestPath, alternateLocator, false);
findProfiledPageAndFolders(alternateSearchPaths, alternateProfiledPage);
}
// if request path matched, use just profiled page; note: page is