001/* 002 * (C) Copyright 2006-2011 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Thomas Roger <troger@nuxeo.com> 018 */ 019 020package org.nuxeo.ecm.platform.video; 021 022/** 023 * Simple data transfer object to report on the state of a video conversion. 024 * 025 * @author <a href="mailto:troger@nuxeo.com">Thomas Roger</a> 026 * @since 5.5 027 */ 028public class VideoConversionStatus { 029 030 public static final String STATUS_CONVERSION_QUEUED = "status.video.conversionQueued"; 031 032 public static final String STATUS_CONVERSION_PENDING = "status.video.conversionPending"; 033 034 public final String message; 035 036 public final long positionInQueue; 037 038 public final long queueSize; 039 040 public VideoConversionStatus(String message) { 041 this.message = message; 042 positionInQueue = 0; 043 queueSize = 0; 044 } 045 046 public VideoConversionStatus(String message, long positionInQueue, long queueSize) { 047 this.message = message; 048 this.positionInQueue = positionInQueue; 049 this.queueSize = queueSize; 050 } 051 052 public String getMessage() { 053 return message; 054 } 055 056 public long getPositionInQueue() { 057 return positionInQueue; 058 } 059 060 public long getQueueSize() { 061 return queueSize; 062 } 063 064}