ImageDeliveryImpl.java
1.54 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
48
49
50
51
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.cq.dam.dm.delivery.api.ImageDelivery
* com.adobe.cq.dam.dm.process.api.PTiffRendition
* com.day.cq.dam.api.Asset
* org.apache.felix.scr.annotations.Component
* org.apache.felix.scr.annotations.Reference
* org.apache.felix.scr.annotations.Service
*/
package com.adobe.cq.dam.s7imaging.impl.is;
import com.adobe.cq.dam.dm.delivery.api.ImageDelivery;
import com.adobe.cq.dam.dm.process.api.PTiffRendition;
import com.adobe.cq.dam.dm.process.image.PTiffRenditionFactory;
import com.adobe.cq.dam.s7imaging.impl.is.ImageServerComponent;
import com.day.cq.dam.api.Asset;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
@Component(immediate=1)
@Service
public class ImageDeliveryImpl
implements ImageDelivery {
@Reference
ImageServerComponent imageServer = null;
public boolean isEnabled() {
return this.imageServer.isEnabled();
}
public PTiffRendition getPTiffRendition(Asset asset) {
if (asset != null) {
return PTiffRenditionFactory.getPTiffRendition(asset);
}
return null;
}
protected void bindImageServer(ImageServerComponent imageServerComponent) {
this.imageServer = imageServerComponent;
}
protected void unbindImageServer(ImageServerComponent imageServerComponent) {
if (this.imageServer == imageServerComponent) {
this.imageServer = null;
}
}
}