Package ru.org.linux.util

Examples of ru.org.linux.util.LorURL


    List<Comment> commentsFiltred = cv.getCommentsForPage(true, 0, RSS_DEFAULT, ImmutableSet.<Integer>of());

    List<PreparedRSSComment> commentsPrepared = prepareService.prepareCommentListRSS(commentsFiltred, request.isSecure());

    params.put("commentsPrepared", commentsPrepared);
    LorURL lorURL = new LorURL(siteConfig.getMainURI(), siteConfig.getMainUrl());
    params.put("mainURL", lorURL.fixScheme(request.isSecure()));

    return new ModelAndView("view-message-rss", params);
  }
View Full Code Here


          boolean nofollow,
          @Nonnull StringBuilder out,
          @Nonnull String urlHref,
          @Nullable String linktext
  ) throws URIException {
    LorURL url = new LorURL(siteConfig.getMainURI(), urlHref);

    if(url.isMessageUrl()) {
      processMessageUrl(secure, out, url, linktext);
    } else if(url.isTrueLorUrl()) {
      processGenericLorUrl(secure, out, url, linktext);
    } else {
      // ссылка не из lorsource
      String fixedUrlHref = url.toString();
      String fixedUrlBody = url.formatUrlBody(maxLength);

      out.append("<a href=\"").append(fixedUrlHref).append("\"");
      if (nofollow) {
        out.append(" rel=nofollow");
      }
View Full Code Here

  private RootNode prepareTopicRootNode(boolean minimizeCut, String cutURL, boolean secure, boolean nofollow) {
    RootNode rootNode = defaultParser.getRootNode();
    if(minimizeCut) {
      try {
        LorURL lorCutURL = new LorURL(siteConfig.getMainURI(), cutURL);
        if(lorCutURL.isTrueLorUrl()) {
          URI fixURI = new URI(lorCutURL.fixScheme(secure), true, "UTF-8");
          rootNode.setMinimizedTopicCutOptions(fixURI);
        } else {
          rootNode.setMaximizedTopicCutOptions();
        }
      } catch (Exception e) {
View Full Code Here

    }

    try {
      ImageInfo mediumImageInfo = new ImageInfo(htmlPath + mediumName);
      ImageInfo fullInfo = new ImageInfo(htmlPath + image.getOriginal());
      LorURL medURI = new LorURL(siteConfig.getMainURI(), siteConfig.getMainUrl()+mediumName);
      LorURL fullURI = new LorURL(siteConfig.getMainURI(), siteConfig.getMainUrl()+image.getOriginal());

      return new PreparedImage(medURI.fixScheme(secure), mediumImageInfo, fullURI.fixScheme(secure), fullInfo, image);
    } catch (BadImageException e) {
      logger.warn("Failed to prepare image", e);
      return null;
    } catch (IOException e) {
      logger.warn("Failed to prepare image", e);
View Full Code Here

TOP

Related Classes of ru.org.linux.util.LorURL

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.