public ContentRewriterFeature get(GadgetSpec spec)
        {
            ContentRewriterFeature rewriterFeature =
                (ContentRewriterFeature)spec.getAttribute("content-rewriter");

            if (rewriterFeature != null)
            {
                return(rewriterFeature);
            }
            rewriterFeature = new ContentRewriterFeature(spec, includeUrls, excludeUrls, expires, includeTags);
            spec.setAttribute("content-rewriter", rewriterFeature);
            return(rewriterFeature);
        }
 protected ContentRewriterFeatureFactory(
     IGadgetSpecFactory specFactory,
     String includeUrls,
     String excludeUrls,
     String expires,
     String includeTags) 
 {
     this.specFactory = specFactory;
     this.includeUrls = includeUrls;
     this.excludeUrls = excludeUrls;
     this.expires = expires;
     this.includeTags = new HashSet<String>();
     foreach(String s in includeTags.Split(','))
     {
         if (s != null && s.Trim().Length > 0) 
         {
             this.includeTags.Add(s.Trim().ToLower());
         }
     }
     defaultFeature = new ContentRewriterFeature(null, includeUrls, excludeUrls, expires,
                                                 this.includeTags);
 }
 protected ContentRewriterFeatureFactory(
     IGadgetSpecFactory specFactory,
     String includeUrls,
     String excludeUrls,
     String expires,
     String includeTags)
 {
     this.specFactory = specFactory;
     this.includeUrls = includeUrls;
     this.excludeUrls = excludeUrls;
     this.expires     = expires;
     this.includeTags = new HashSet <String>();
     foreach (String s in includeTags.Split(','))
     {
         if (s != null && s.Trim().Length > 0)
         {
             this.includeTags.Add(s.Trim().ToLower());
         }
     }
     defaultFeature = new ContentRewriterFeature(null, includeUrls, excludeUrls, expires,
                                                 this.includeTags);
 }
 public ContentRewriterFeature get(GadgetSpec spec)
 {
     ContentRewriterFeature rewriterFeature =
         (ContentRewriterFeature)spec.getAttribute("content-rewriter");
     if (rewriterFeature != null) 
         return rewriterFeature;
     rewriterFeature = new ContentRewriterFeature(spec, includeUrls, excludeUrls, expires, includeTags);
     spec.setAttribute("content-rewriter", rewriterFeature);
     return rewriterFeature;
 }
예제 #5
0
 public ProxyingLinkRewriter(Uri gadgetUri, ContentRewriterFeature rewriterFeature, String prefix)
 {
     this.prefix = prefix;
     this.rewriterFeature = rewriterFeature;
     this.gadgetUri = gadgetUri;
 }
예제 #6
0
 public ProxyingLinkRewriter(Uri gadgetUri, ContentRewriterFeature rewriterFeature, String prefix)
 {
     this.prefix          = prefix;
     this.rewriterFeature = rewriterFeature;
     this.gadgetUri       = gadgetUri;
 }