FvctxNodeDefaultSwatches.java
1.85 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
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.scene7.is.util.error.ApplicationException
* org.jetbrains.annotations.NotNull
*/
package com.scene7.is.ps.provider.fvctx;
import com.scene7.is.ps.provider.IZoomException;
import com.scene7.is.ps.provider.Request;
import com.scene7.is.ps.provider.fvctx.FvctxImageProps;
import com.scene7.is.ps.provider.fvctx.FvctxNode;
import com.scene7.is.ps.provider.fvctx.FvctxNodeNull;
import com.scene7.is.ps.provider.fvctx.ImageInfo;
import com.scene7.is.util.error.ApplicationException;
import org.jetbrains.annotations.NotNull;
class FvctxNodeDefaultSwatches
extends FvctxNodeNull {
private ImageInfo frameInfo;
private boolean frameAnonymous;
FvctxNodeDefaultSwatches(@NotNull FvctxNode next) {
super(next);
}
@Override
public void startFrame(@NotNull String netPath, @NotNull String query, @NotNull Request parsedRequest, @NotNull FvctxImageProps imageProps, boolean hasNestedFrame, boolean isMediaSetItem) throws ApplicationException {
this.frameInfo = new ImageInfo(netPath, query, parsedRequest, imageProps);
this.frameAnonymous = false;
this.getNext().startFrame(netPath, query, parsedRequest, imageProps, hasNestedFrame, isMediaSetItem);
}
@Override
public void startAnonymousFrame() throws IZoomException {
this.frameInfo = null;
this.frameAnonymous = true;
this.getNext().startAnonymousFrame();
}
@Override
public void defaultSwatch() throws ApplicationException {
if (this.frameAnonymous) {
throw new IZoomException(IZoomException.FVCTX_SWATCH_ERROR, "Attempt to use default swatch in anonymous frame", null);
}
this.getNext().swatch(this.frameInfo.netPath, this.frameInfo.query, this.frameInfo.parsedRequest, this.frameInfo.imageProps, false, false);
}
}