Package org.meshcms.core

Examples of org.meshcms.core.SiteMap


  public String getSeparator() {
    return separator;
  }
 
  public void writeTag() throws IOException, JspException {
    SiteMap siteMap = webSite.getSiteMap();
   
    boolean notTranslatable =
        pagePath.isRoot() || siteMap.getPageInfo(pagePath) == null;
   
    List langList = siteMap.getLangList();
   
    if (langList.size() > 1) {
      Iterator iter = langList.iterator();
      boolean putSeparator = false;
      Writer w = getOut();
     
      if (pre != null) {
        w.write(pre);
      }
     
      Path baseIconPath = Utils.isTrue(flags) ? webSite.getAdminPath().add("flags") : null;
     
      while (iter.hasNext()) {
        if (putSeparator) {
          w.write(separator);
        }
       
        putSeparator = true;
        SiteMap.CodeLocalePair lang = (SiteMap.CodeLocalePair) iter.next();
        String langCode = lang.getCode();
        String localeName = Utils.encodeHTML(lang.getName());
        Path link = null;
        String onClick = null;
       
        if (notTranslatable) {
          link = webSite.getLink(new Path(langCode), pageDirPath);
        } else {
          if (!langCode.equalsIgnoreCase(pagePath.getElementAt(0))) {
            Path path = siteMap.getServedPath(pagePath.replace(0, langCode));

            if (!webSite.getFile(path).isFile()) {
              if (userInfo != null && userInfo.canWrite(webSite, path)) {
                PageInfo ppi = siteMap.getParentPageInfo(pagePath);

                if (ppi != null && ppi.getLevel() > 0) {
                  Path pPath = ppi.getPath().replace(0, langCode);

                  if (siteMap.getPageInfo(pPath) != null) {
                    ResourceBundle bundle =
                        ResourceBundle.getBundle("org/meshcms/webui/Locales",
                        WebUtils.getPageLocale(pageContext));
                    String msg = Utils.replace(bundle.getString("confirmTranslation"),
                        '\'', "\\'");
View Full Code Here


      WebSite webSite =
          (WebSite) request.getAttribute(HitFilter.WEBSITE_ATTRIBUTE);

      if (webSite != null) {
        SiteMap siteMap = webSite.getSiteMap();
        List pagesList = siteMap.getPagesList();

        for (Iterator iter = pagesList.iterator(); iter.hasNext();) {
          PageInfo pageInfo = (PageInfo) iter.next();

          if (pageInfo.getPath().isRoot() &&
              webSite.getConfiguration().isRedirectRoot() &&
              HitFilter.getPreferredLanguage(request) != null) {
            continue;
          }

          Element url = doc.createElement("url");
          urlset.appendChild(url);

          Element loc = doc.createElement("loc");
          url.appendChild(loc);
          loc.appendChild(doc.createTextNode(baseURL +
              siteMap.getServedPath(pageInfo.getPath())));

          Element lastmod = doc.createElement("lastmod");
          url.appendChild(lastmod);
          lastmod.appendChild(doc.createTextNode(ISO_8601_FORMAT.format(new Date(pageInfo.getLastModified()))));
View Full Code Here

  public void setStyle(String style) {
    this.style = style;
  }

  public void writeTag() throws IOException {
    SiteMap siteMap = webSite.getSiteMap();
    SiteInfo siteInfo = webSite.getSiteInfo();
    Path rootPath = (path == null) ? siteInfo.getThemeRoot(pagePath) : new Path(path);
    Path pathInMenu = webSite.getSiteMap().getPathInMenu(pagePath);
    int baseLevel = rootPath.getElementCount() + 1;
    int spc = Utils.parseInt(space, 8);
View Full Code Here

TOP

Related Classes of org.meshcms.core.SiteMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.