@Override public String toString() { return "HstSiteMapItemService{" + "canonicalPath='" + canonicalPath + '\'' + ", site=" + hstSiteMap.getSite() + '}'; } }
@Override public boolean isExplicitPath() { return parentItem == null ? isExplicitElement() : isExplicitElement() && parentItem.isExplicitPath(); }
public Set<String> getRoles() { return hstSiteMapItem.getRoles(); }
/** * Create a HstLinkResolver instance with the current context <code>resolvedSiteMapItem</code>. The {@link HstSite} is taken from this context * @param node * @param resolvedSiteMapItem */ HstLinkResolver(Node node, ResolvedSiteMapItem resolvedSiteMapItem){ this.node = node; this.resolvedSiteMapItem = resolvedSiteMapItem; HstSiteMap hstSiteMap = resolvedSiteMapItem.getHstSiteMapItem().getHstSiteMap(); hstSite = (HstSiteService)hstSiteMap.getSite(); }
private void populateDescendants(HstSiteMapItem hstSiteMapItem) { siteMapDescendants.put(hstSiteMapItem.getId(), hstSiteMapItem); for(HstSiteMapItem child : hstSiteMapItem.getChildren()) { populateDescendants(child); } }
private HstSiteMapItem match(String value, List<HstSiteMapItemService> patternSiteMapItems, List<HstSiteMapItem> excludeList) { for(HstSiteMapItemService item : patternSiteMapItems){ // if in exclude list, go to next if(excludeList.contains(item)) { continue; } if(patternMatch(value, item.getPrefix(), item.getPostfix())) { return item; } } return null; }
private String getSiteMapItemPath(final HstSiteMapItem matchedSiteMapItem) { String path = matchedSiteMapItem.getId(); path = path.replace(WILDCARD, "*"); path = path.replace(ANY, "**"); return path; }
@Override public int compare(final HstSiteMapItemService item1, final HstSiteMapItemService item2) { if (item1.getDepth() == item2.getDepth()) { // order lexically to force consistent result return item1.getId().compareTo(item2.getId()); } else { // item with lowest depth is best return item1.getDepth() - item2.getDepth(); } } }
private String getStrippedParameter(HstSiteMapItemService s, String parameter) { String removePrefix = ((HstSiteMapItemService)s).getPrefix(); String removePostfix = ((HstSiteMapItemService)s).getPostfix(); if(removePrefix != null && parameter.startsWith(removePrefix)) { parameter = parameter.substring(removePrefix.length()); } if(removePostfix != null && parameter.endsWith(removePostfix)) { parameter = parameter.substring(0, (parameter.length() - removePostfix.length())); } return parameter; }
public String getNamedPipeline() { return hstSiteMapItem.getNamedPipeline(); }
public int getErrorCode(){ return this.hstSiteMapItem.getErrorCode(); }
public int getStatusCode(){ return hstSiteMapItem.getStatusCode(); }
public boolean isAuthenticated() { return hstSiteMapItem.isAuthenticated(); }
public Set<String> getUsers() { return hstSiteMapItem.getUsers(); }
public boolean isSecured() { return hstSiteMapItem.isSecured(); }
private void checkAndLogAccessibleRootComponents() { for(HstSiteMapItem hstSiteMapItem :this.siteMapService.getSiteMapItems()){ sanitizeSiteMapItem(hstSiteMapItem); } }
public List<String> getRoles() { return hstSiteMapItem.getRoles(); }
public String getNamedPipeline() { return hstSiteMapItem.getNamedPipeline(); }
public int getErrorCode(){ return hstSiteMapItem.getErrorCode(); }
public int getStatusCode(){ return this.hstSiteMapItem.getStatusCode(); }