@Override public String toString() { return "HstSiteMapItemService{" + "canonicalPath='" + canonicalPath + '\'' + ", site=" + hstSiteMap.getSite() + '}'; } }
private void validateTarget(final Session session, final String target, final HstSiteMap siteMap) throws RepositoryException { String msg = String.format("Unexpected sitemap for site '%s' because not an instanceof CanonicalInfo", siteMap.getSite().getName()); throw new ClientException(msg, ClientError.UNKNOWN);
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; }
/** * 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(); }
/** * Get the HST Site object from request. */ protected HstSite getHstSite(final HstRequest request){ return request.getRequestContext().getResolvedSiteMapItem().getHstSiteMapItem().getHstSiteMap().getSite(); }
public HstSiteMenusImpl(HstRequestContext hstRequestContext) { // find currently selected hstSiteMenuItemConfiguration's HstSiteMapItem selectedSiteMapItem = hstRequestContext.getResolvedSiteMapItem().getHstSiteMapItem(); HstSiteMenusConfiguration siteMenusConfiguration = selectedSiteMapItem.getHstSiteMap().getSite().getSiteMenusConfiguration(); if(siteMenusConfiguration != null) { for(HstSiteMenuConfiguration siteMenuConfiguration : siteMenusConfiguration.getSiteMenuConfigurations().values()) { HstSiteMenuImpl siteMenu = new HstSiteMenuImpl(this, siteMenuConfiguration, hstRequestContext); siteMenus.put(siteMenu.getName(), siteMenu); } } }
public HstSite getHstSite(HstRequest request){ return request.getRequestContext().getResolvedSiteMapItem().getHstSiteMapItem().getHstSiteMap().getSite(); }
public HstLink create(HstSiteMapItem toHstSiteMapItem) { return postProcess(new HstLinkImpl(getPath(toHstSiteMapItem), toHstSiteMapItem.getHstSiteMap().getSite())); }
public HstSite getHstSite(HstRequest request){ return request.getRequestContext().getResolvedSiteMapItem().getHstSiteMapItem().getHstSiteMap().getSite(); }
HstSiteMap siteMap = requestContext.getResolvedSiteMapItem().getHstSiteMapItem().getHstSiteMap(); HstLink link = linkCreator.create(path, siteMap.getSite());
public HstSiteMenusImpl(HstRequestContext hstRequestContext) { if (hstRequestContext.getResolvedSiteMapItem() == null) { log.info("'{}' does not resolve to a siteMap item hence no siteMenus can be provided", hstRequestContext.getServletRequest()); return; } // find currently selected hstSiteMenuItemConfiguration's HstSiteMapItem selectedSiteMapItem = hstRequestContext.getResolvedSiteMapItem().getHstSiteMapItem(); HstSiteMenusConfiguration siteMenusConfiguration = selectedSiteMapItem.getHstSiteMap().getSite().getSiteMenusConfiguration(); if(siteMenusConfiguration != null) { for(HstSiteMenuConfiguration siteMenuConfiguration : siteMenusConfiguration.getSiteMenuConfigurations().values()) { HstSiteMenuImpl siteMenu = new HstSiteMenuImpl(this, siteMenuConfiguration, hstRequestContext); siteMenus.put(siteMenu.getName(), siteMenu); } } }
this.resolvedSiteMount = resolvedSiteMount; HstSite hstSite = hstSiteMapItem.getHstSiteMap().getSite(); if (hstSiteMapItem.getComponentConfigurationId() == null && hstSiteMapItem.getPortletComponentConfigurationId() == null) { log.debug("The ResolvedSiteMapItemImpl does not have a component configuration id because the sitemap item '{}' does not have one", hstSiteMapItem.getId());
private void resolveComponentConfiguration() { // check whether there is a more specific mapping String componentConfigurationId = resolveMappedConponentConfigurationId(); HstSite hstSite = hstSiteMapItem.getHstSiteMap().getSite(); if (componentConfigurationId == null && hstSiteMapItem.getComponentConfigurationId() == null) { log.debug("The ResolvedSiteMapItemImpl does not have a component configuration id because the sitemap item '{}' does not have one", hstSiteMapItem.getId()); } else { if (componentConfigurationId == null) { log.debug("No mapped component configuration id, getting the default componentconfiguration id"); componentConfigurationId = hstSiteMapItem.getComponentConfigurationId(); } if (componentConfigurationId != null) { final String resolvedComponentConfigurationId = (String)pp.resolveProperty("componentConfigurationId", componentConfigurationId); hstComponentConfiguration = hstSite.getComponentsConfiguration().getComponentConfiguration(resolvedComponentConfigurationId); if (hstComponentConfiguration == null) { log.warn("ResolvedSiteMapItemImpl cannot be created correctly, because the component configuration id {} cannot be found.", componentConfigurationId); } } } isComponentResolved = true; }
if (cc == null) { log.warn("'{}' for site '{}' contains unresolvable hst:componentconfigurationid '{}'.", siteMapItem, siteMapItem.getHstSiteMap().getSite().getName(), siteMapItem.getComponentConfigurationId()); } else {
return reqContext.getHstLinkCreator().create(path, reqContext.getResolvedSiteMapItem().getHstSiteMapItem().getHstSiteMap().getSite()); } else {
HstSite site = reqContext.getResolvedSiteMapItem().getHstSiteMapItem().getHstSiteMap().getSite(); VirtualHost virtualHost = reqContext.getVirtualHost(); boolean containerResource = (virtualHost != null && virtualHost.getVirtualHosts().isExcluded(this.path));
} else { this.namedPipeline = this.getHstSiteMap().getSite().getSiteMount().getNamedPipeline();