CQRouteWrapper.java 1.8 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.adobe.granite.workflow.exec.Route
 *  com.adobe.granite.workflow.model.WorkflowTransition
 *  com.day.cq.workflow.exec.Route
 *  com.day.cq.workflow.model.WorkflowTransition
 */
package com.day.cq.workflow.impl.exec;

import com.adobe.granite.workflow.model.WorkflowTransition;
import com.day.cq.workflow.exec.Route;
import com.day.cq.workflow.impl.model.CQWorkflowTransitionWrapper;
import java.util.ArrayList;
import java.util.List;

public class CQRouteWrapper
implements Route {
    com.adobe.granite.workflow.exec.Route graniteRoute;

    public CQRouteWrapper(com.adobe.granite.workflow.exec.Route route) {
        this.graniteRoute = route;
    }

    public String getId() {
        return this.graniteRoute.getId();
    }

    public String getName() {
        return this.graniteRoute.getName();
    }

    public boolean hasDefault() {
        return this.graniteRoute.hasDefault();
    }

    public List<com.day.cq.workflow.model.WorkflowTransition> getDestinations() {
        List graniteDestinations = this.graniteRoute.getDestinations();
        if (graniteDestinations != null) {
            ArrayList<com.day.cq.workflow.model.WorkflowTransition> transitions = new ArrayList<com.day.cq.workflow.model.WorkflowTransition>(graniteDestinations.size());
            for (WorkflowTransition transition : graniteDestinations) {
                if (transition == null) continue;
                transitions.add(new CQWorkflowTransitionWrapper(transition));
            }
            return transitions;
        }
        return null;
    }

    public boolean isBackRoute() {
        return this.graniteRoute.isBackRoute();
    }

    public com.adobe.granite.workflow.exec.Route getGraniteRoute() {
        return this.graniteRoute;
    }
}