Package de.innovationgate.wgpublisher

Examples of de.innovationgate.wgpublisher.WGPDispatcher


  /**
   * Returns the path to the WGAPublisher on this server, excluding any additional path information.
   */
  public String getPublisherPath() {
   
    WGPDispatcher disp = this.getDispatcher();
   
    javax.servlet.http.HttpServletRequest sr = (javax.servlet.http.HttpServletRequest) this._pageContext.getRequest();
   
    String path = (String) disp.getPublisherURL(sr, true);
   
    return path;

  }
View Full Code Here


    }
   
  protected String innerBuildHomepageURL(WGDatabase db, HttpServletRequest request) throws WGException {
        String homepage = (String) db.getAttribute(WGACore.DBATTRIB_HOME_PAGE);
        WGACore core = WGACore.retrieve(request.getSession().getServletContext());
        WGPDispatcher dispatcher = core.getDispatcher();
        // First try: if db homepage attribute set - redirect to homepage
        if (homepage != null && !homepage.trim().equals("")) {
             return dispatcher.getPublisherURL(request) + "/" + db.getDbReference().toLowerCase() + "/" + homepage;
        }

        // Try to find a document named "home" in the relevant languages
        db = core.openContentDB(db, request, false);
        if (db.isSessionOpen()) {
           
            LanguageBehaviour langBehaviour = LanguageBehaviourTools.retrieve(db);
            WGContent content = langBehaviour.requestSelectContentForName(db, request, "home", false);
            if (content != null && content.mayBePublished(false, WGContent.DISPLAYTYPE_NONE)) {
                return dispatcher.getPublisherURL(request) + "/" + db.getDbReference().toLowerCase() + "/home";
            }
        }
    return null;
  }
View Full Code Here

TOP

Related Classes of de.innovationgate.wgpublisher.WGPDispatcher

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.