FOPNGSerializerFactory.java
1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.apache.felix.scr.annotations.Component
* org.apache.felix.scr.annotations.Property
* org.apache.felix.scr.annotations.Reference
* org.apache.felix.scr.annotations.Service
* org.apache.sling.rewriter.Serializer
* org.apache.sling.rewriter.SerializerFactory
*/
package com.day.cq.rewriter.xml.fop;
import com.day.cq.rewriter.xml.fop.FOPNGSerializer;
import com.day.cq.rewriter.xml.fop.FontConfig;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.apache.sling.rewriter.Serializer;
import org.apache.sling.rewriter.SerializerFactory;
@Component
@Service(value={SerializerFactory.class})
@Property(name="pipeline.type", value={"fop"})
public class FOPNGSerializerFactory
implements SerializerFactory {
@Reference
private FontConfig fc;
public Serializer createSerializer() {
FOPNGSerializer serializer = new FOPNGSerializer();
serializer.setFontConfig(this.fc);
return serializer;
}
protected void bindFc(FontConfig fontConfig) {
this.fc = fontConfig;
}
protected void unbindFc(FontConfig fontConfig) {
if (this.fc == fontConfig) {
this.fc = null;
}
}
}