FvctxNodeCanonicalizeImagePath.java 2.43 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.scene7.is.provider.catalog.Catalog
 *  com.scene7.is.util.error.ApplicationException
 *  org.jetbrains.annotations.NotNull
 */
package com.scene7.is.ps.provider.fvctx;

import com.scene7.is.provider.catalog.Catalog;
import com.scene7.is.ps.provider.Request;
import com.scene7.is.ps.provider.fvctx.FvctxImagePath;
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.MediaSetVideoProps;
import com.scene7.is.util.error.ApplicationException;
import org.jetbrains.annotations.NotNull;

class FvctxNodeCanonicalizeImagePath
extends FvctxNodeNull {
    @NotNull
    private final Catalog catalog;

    FvctxNodeCanonicalizeImagePath(@NotNull Catalog catalog, @NotNull FvctxNode next) {
        super(next);
        this.catalog = catalog;
    }

    @Override
    public void startFrame(@NotNull String netPath, @NotNull String query, Request parsedRequest, FvctxImageProps imageProps, boolean hasNestedFrame, boolean isMediaSetItem) throws ApplicationException {
        String cleanPath = FvctxImagePath.canonicalizeImagePath(this.catalog, netPath);
        this.getNext().startFrame(cleanPath, query, parsedRequest, imageProps, hasNestedFrame, isMediaSetItem);
    }

    @Override
    public void startVideoFrame(@NotNull String netPath, @NotNull String query, @NotNull MediaSetVideoProps videoProps) throws ApplicationException {
        String cleanPath = FvctxImagePath.canonicalizeVideoPath(this.catalog, netPath);
        this.getNext().startVideoFrame(cleanPath, query, videoProps);
    }

    @Override
    public void image(@NotNull String netPath, @NotNull String query, Request parsedRequest, FvctxImageProps imageProps) throws ApplicationException {
        String cleanPath = FvctxImagePath.canonicalizeImagePath(this.catalog, netPath);
        this.getNext().image(cleanPath, query, parsedRequest, imageProps);
    }

    @Override
    public void swatch(@NotNull String netPath, @NotNull String query, Request parsedRequest, FvctxImageProps imageProps, boolean hasNestedFrame, boolean isMediaItemSwatch) throws ApplicationException {
        String cleanPath = FvctxImagePath.canonicalizeImagePath(this.catalog, netPath);
        this.getNext().swatch(cleanPath, query, parsedRequest, imageProps, hasNestedFrame, isMediaItemSwatch);
    }
}