com.globallink.api.pss.rewriters.CompositeRewriter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of globallink-connect-api Show documentation
Show all versions of globallink-connect-api Show documentation
GlobalLink Connect Java is a library to connect your system to GlobalLink Project Director SOAP API.
The newest version!
package com.globallink.api.pss.rewriters;
import java.util.ArrayList;
import java.util.List;
import org.jsoup.nodes.Document;
import com.globallink.api.pss.DownloadedFileInfo;
public class CompositeRewriter implements IFileTagRewriter {
private List rewriters;
public CompositeRewriter() {
rewriters = new ArrayList();
}
public void Add(IFileTagRewriter rewriter) {
rewriters.add(rewriter);
}
public void Remove(IFileTagRewriter rewriter) {
rewriters.remove(rewriter);
}
public List RewriteLinks(Document document) {
List fileInfos = new ArrayList();
for (IFileTagRewriter rewriter : rewriters) {
fileInfos.addAll(rewriter.RewriteLinks(document));
}
return fileInfos;
}
}