@Inject public AbsolutePathReferenceVisitor(Tags... resourceTags) { Map<String, String> tagsToMakeAbsolute = new HashMap<String, String>(); for (Tags r : resourceTags) { tagsToMakeAbsolute.putAll(r.getResourceTags()); } this.tagsToMakeAbsolute = tagsToMakeAbsolute; }
@Inject(optional=true) public void setAbsolutePathTags(@Named("shindig.gadgets.rewriter.absolutePath.tags") String absolutePathTags) { if(LOG.isLoggable(Level.FINE)) { LOG.fine("Tags that should have the reference resolved to absolute path: " + absolutePathTags); } String[] tagsArray = absolutePathTags.split(","); List<AbsolutePathReferenceVisitor.Tags> tagsList = Lists.newArrayList(); for(String tagValue : tagsArray) { try { AbsolutePathReferenceVisitor.Tags tag = AbsolutePathReferenceVisitor.Tags.valueOf(tagValue); if(!tagsList.contains(tag)) { tagsList.add(tag); } } catch (Exception ex) { LOG.warning("Invalid absolute path tag name : " + tagValue); continue; } } this.tags = tagsList.toArray(new AbsolutePathReferenceVisitor.Tags[tagsList.size()]); }
Map<String, String> resourceTags = new HashMap<String, String>(); resourceTags.putAll(AbsolutePathReferenceVisitor.Tags .RESOURCES.getResourceTags()); resourceTags.putAll(AbsolutePathReferenceVisitor.Tags .HYPERLINKS.getResourceTags()); String validAttr = resourceTags.get(lcTag); String invalidAttr = validAttr + "whoknows";
Map<String, String> resourceTags = new HashMap<String, String>(); resourceTags.putAll(AbsolutePathReferenceVisitor.Tags .RESOURCES.getResourceTags()); resourceTags.putAll(AbsolutePathReferenceVisitor.Tags .HYPERLINKS.getResourceTags()); String validAttr = resourceTags.get(lcTag); String invalidAttr = validAttr + "whoknows";
Map<String, String> resourceTags = new HashMap<String, String>(); resourceTags.putAll(AbsolutePathReferenceVisitor.Tags .RESOURCES.getResourceTags()); resourceTags.putAll(AbsolutePathReferenceVisitor.Tags .HYPERLINKS.getResourceTags()); String validAttr = resourceTags.get(lcTag); String invalidAttr = validAttr + "whoknows";
@Inject public AbsolutePathReferenceVisitor(Tags... resourceTags) { Map<String, String> tagsToMakeAbsolute = new HashMap<String, String>(); for (Tags r : resourceTags) { tagsToMakeAbsolute.putAll(r.getResourceTags()); } this.tagsToMakeAbsolute = tagsToMakeAbsolute; }
@Inject public AbsolutePathReferenceVisitor(Tags... resourceTags) { Map<String, String> tagsToMakeAbsolute = new HashMap<String, String>(); for (Tags r : resourceTags) { tagsToMakeAbsolute.putAll(r.getResourceTags()); } this.tagsToMakeAbsolute = tagsToMakeAbsolute; }