private void checkAndLogAccessibleRootComponents(final HstComponentsConfiguration hstComponentsConfiguration, final HstSiteMap sm) { for(HstSiteMapItem hstSiteMapItem : sm.getSiteMapItems()){ sanitizeSiteMapItem(hstSiteMapItem, hstComponentsConfiguration); } }
public static final void view(StringBuffer buf, String indent, HstSiteMap hstSiteMap) { if(hstSiteMap == null) { buf.append("\n").append(indent).append("+HstSiteMap: null"); return; } buf.append("\n").append(indent).append("+HstSiteMap: (").append(hstSiteMap.hashCode()).append(")"); for(HstSiteMapItem siteMapItem : hstSiteMap.getSiteMapItems()) { view(buf, indent+SMALL_INDENT, siteMapItem); } }
/** * @throws ClientException if not found */ public static HstSiteMapItem getSiteMapItem(HstSiteMap siteMap, String siteMapItemId) { for (HstSiteMapItem hstSiteMapItem : siteMap.getSiteMapItems()) { final HstSiteMapItem siteMapItem = getSiteMapItem(hstSiteMapItem, siteMapItemId); if (siteMapItem != null) { return siteMapItem; } } final String message = String.format("SiteMap item with id '%s' is not part of currently edited preview site.", siteMapItemId); throw new ClientException(message, ClientError.ITEM_NOT_IN_PREVIEW); }
@Override public boolean containsMultipleSchemes() { if (containsMultipleSchemes != null) { return containsMultipleSchemes.booleanValue(); } synchronized (this) { if (containsMultipleSchemes != null) { return containsMultipleSchemes.booleanValue(); } if (hstSite == null) { containsMultipleSchemes = Boolean.FALSE; return false; } containsMultipleSchemes = multipleSchemesUsed(hstSite.getSiteMap().getSiteMapItems()); return containsMultipleSchemes.booleanValue(); } }
public LocationMapTree getLocationMapTree() { if (locationMapTree != null) { return locationMapTree; } synchronized (hstModelMutex) { if (locationMapTree != null) { return locationMapTree; } locationMapTree = new LocationMapTreeSiteMap(getSiteMap().getSiteMapItems()); return locationMapTree; } }
private static Set<String> getAllUsersWithSiteMapItemLock(final HstSite previewHstSite) { Set<String> usersWithLock = new HashSet<>(); for (HstSiteMapItem siteMapItem : previewHstSite.getSiteMap().getSiteMapItems()) { addUsersWithSiteMapItemLock(siteMapItem, usersWithLock, previewHstSite.getConfigurationPath()); } return usersWithLock; }
this.locationMapTree = new LocationMapTreeImpl(this.getSiteMap().getSiteMapItems());
@Override public LocationMapTree getLocationMapTreeComponentDocuments() { if (locationMapTreeComponentDocuments != null) { return locationMapTreeComponentDocuments; } synchronized (hstModelMutex) { if (locationMapTreeComponentDocuments != null) { return locationMapTreeComponentDocuments; } locationMapTreeComponentDocuments = new LocationMapTreeComponentDocuments(getSiteMap().getSiteMapItems(), getComponentsConfiguration(), mountSiteMapConfiguration.getMountContentPath(), mountSiteMapConfiguration.getMountContextPath()); return locationMapTreeComponentDocuments; } }
public SiteMapPagesRepresentation represent(final HstSiteMap siteMap, final Mount mount, final String previewConfigurationPath) throws IllegalArgumentException { id = ((CanonicalInfo)siteMap).getCanonicalIdentifier(); host = mount.getVirtualHost().getHostName(); this.mount = mount.getMountPath(); final String homePagePathInfo = HstSiteMapUtils.getPath(mount, mount.getHomePage()); for (HstSiteMapItem child : siteMap.getSiteMapItems()) { addPages(child, null, homePagePathInfo, previewConfigurationPath); } Collections.sort(pages, (o1, o2) -> o1.getPathInfo().compareTo(o2.getPathInfo())); // move homepage to first location return this; }
params.clear(); for(HstSiteMapItem item : hstSite.getSiteMap().getSiteMapItems()) { HstSiteMapItemService service = (HstSiteMapItemService)item; if(service.containsWildCard() && service.patternMatch(elements[0], service.getPrefix(), service.getPostfix())) { params.clear(); for(HstSiteMapItem item : hstSite.getSiteMap().getSiteMapItems()) { HstSiteMapItemService service = (HstSiteMapItemService)item; if(service.containsAny() && service.patternMatch(pathInfo, service.getPrefix(), service.getPostfix())) {
params.clear(); for(HstSiteMapItem item : siteMap.getSiteMapItems()) { if (item.isMarkedDeleted()) { continue; params.clear(); for(HstSiteMapItem item : siteMap.getSiteMapItems()) { if (item.isMarkedDeleted()) { continue;
private AbstractTreePickerRepresentation represent(final PageComposerContextService pageComposerContextService, final HstSiteMap hstSiteMap, final List<HstSiteMapItem> expansionList) { if (!(hstSiteMap instanceof CanonicalInfo)) { throw new ClientException(String.format("hstSiteMap '%s' expected to be of type '%s'", hstSiteMap, CanonicalInfo.class), ClientError.UNKNOWN); } setPickerType(PickerType.PAGES.getName()); setId(((CanonicalInfo) hstSiteMap).getCanonicalIdentifier()); setType(Type.PAGE.getName()); setNodeName(hstSiteMap.getSite().getName()); setDisplayName(hstSiteMap.getSite().getName()); setNodePath(((CanonicalInfo) hstSiteMap).getCanonicalPath()); setCollapsed(false); setExpandable(true); setSelectable(false); final String pageNotFound = pageComposerContextService.getEditingMount().getPageNotFound(); for (HstSiteMapItem child : hstSiteMap.getSiteMapItems()) { if (isInvisibleItem(child, pageNotFound)) { continue; } setLeaf(false); AbstractTreePickerRepresentation childRepresentation = loadItemRepresentation(pageComposerContextService, expansionList, child); getItems().add(childRepresentation); } Collections.sort(getItems(), comparator); return this; }