001/*
002 * (C) Copyright 2006-2011 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl-2.1.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     Thomas Roger <troger@nuxeo.com>
016 */
017
018package org.nuxeo.ecm.platform.video;
019
020/**
021 * Simple data transfer object to report on the state of a video conversion.
022 *
023 * @author <a href="mailto:troger@nuxeo.com">Thomas Roger</a>
024 * @since 5.5
025 */
026public class VideoConversionStatus {
027
028    public static final String STATUS_CONVERSION_QUEUED = "status.video.conversionQueued";
029
030    public static final String STATUS_CONVERSION_PENDING = "status.video.conversionPending";
031
032    public final String message;
033
034    public final int positionInQueue;
035
036    public final int queueSize;
037
038    public VideoConversionStatus(String message) {
039        this.message = message;
040        positionInQueue = 0;
041        queueSize = 0;
042    }
043
044    public VideoConversionStatus(String message, int positionInQueue, int queueSize) {
045        this.message = message;
046        this.positionInQueue = positionInQueue;
047        this.queueSize = queueSize;
048    }
049
050    public String getMessage() {
051        return message;
052    }
053
054    public int getPositionInQueue() {
055        return positionInQueue;
056    }
057
058    public int getQueueSize() {
059        return queueSize;
060    }
061
062}