Package org.meshcms.core

Examples of org.meshcms.core.Configuration


    return false;
  }

  public void process() {
    // Avoid to store generated pages in cache
    Configuration conf = webSite.getConfiguration();
    int cacheType = conf.getCacheType();
    conf.setCacheType(Configuration.NO_CACHE);
   
    write("base url: " + contextURL);

    // Update the site map to make sure everything is up to date
    long time = System.currentTimeMillis();
    webSite.updateSiteMap(true);
    write("site map updated in " + (System.currentTimeMillis() - time) + " ms");

    write("");
    super.process();
   
    // Restore cache
    conf.setCacheType(cacheType);
  }
View Full Code Here


/**
* Writes some site and system data.
*/
public final class Info extends AbstractTag {
  public void writeTag() throws IOException {
    Configuration c = webSite.getConfiguration();
    String result = null;

    if (id != null) {
      id = id.toLowerCase();

      if (id.equals("host") || id.equals("domain")) {
        result = c.getSiteHost();
      } else if (id.equals("description")) {
        result = c.getSiteDescription();
      } else if (id.equals("keywords")) {
        result = c.getSiteKeywords();
      } else if (id.equals("author")) {
        result = c.getSiteAuthor();
      } else if (id.equals("authorurl")) {
        result = c.getSiteAuthorURL();
      } else if (id.equals("meshcms")) {
        result = WebSite.APP_NAME + " " + WebSite.VERSION_ID;
      } else if (id.equals("charset")) {
        result = Utils.SYSTEM_CHARSET;
      } else if (id.equals("lang")) {
        result = WebUtils.getPageLocale(pageContext).toString();
      }
    }

    if (result == null) {
      result = Utils.encodeHTML(Utils.noNull(c.getSiteName()));
    }

    getOut().write(result);
  }
View Full Code Here

TOP

Related Classes of org.meshcms.core.Configuration

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.