CQHistoryItemWrapper.java 2.09 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.adobe.granite.workflow.exec.HistoryItem
 *  com.adobe.granite.workflow.exec.WorkItem
 *  com.day.cq.workflow.exec.HistoryItem
 *  com.day.cq.workflow.exec.WorkItem
 */
package com.day.cq.workflow.impl.exec;

import com.adobe.granite.workflow.exec.HistoryItem;
import com.adobe.granite.workflow.exec.WorkItem;
import com.day.cq.workflow.impl.exec.CQWorkItemWrapper;
import java.util.Date;

public class CQHistoryItemWrapper
implements com.day.cq.workflow.exec.HistoryItem {
    HistoryItem graniteHistoryItem;

    public CQHistoryItemWrapper(HistoryItem item) {
        if (item == null) {
            throw new RuntimeException("Workflow Wrappers cannot be instantiated with null values");
        }
        this.graniteHistoryItem = item;
    }

    public String getComment() {
        return this.graniteHistoryItem.getComment();
    }

    public String getAction() {
        return this.graniteHistoryItem.getAction();
    }

    public Date getDate() {
        return this.graniteHistoryItem.getDate();
    }

    public String getUserId() {
        return this.graniteHistoryItem.getUserId();
    }

    public com.day.cq.workflow.exec.HistoryItem getPreviousHistoryItem() {
        HistoryItem previousHistoryItem = this.graniteHistoryItem.getPreviousHistoryItem();
        if (previousHistoryItem != null) {
            return new CQHistoryItemWrapper(previousHistoryItem);
        }
        return null;
    }

    public com.day.cq.workflow.exec.HistoryItem getNextHistryItem() {
        HistoryItem nextHistryItem = this.graniteHistoryItem.getNextHistryItem();
        if (nextHistryItem != null) {
            return new CQHistoryItemWrapper(nextHistryItem);
        }
        return null;
    }

    public com.day.cq.workflow.exec.WorkItem getWorkItem() {
        if (this.graniteHistoryItem.getWorkItem() != null) {
            return new CQWorkItemWrapper(this.graniteHistoryItem.getWorkItem());
        }
        return null;
    }

    public HistoryItem getGraniteHistoryItem() {
        return this.graniteHistoryItem;
    }
}