001/* 002 * (C) Copyright 2006-2016 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 * Tiago Cardoso <[email protected]> 018 */ 019package org.nuxeo.ecm.platform.threed; 020 021/** 022 * Simple data transfer object to report on the state of a 3D content work or conversion 023 * 024 * @since 8.4 025 */ 026public class ThreeDBatchProgress { 027 028 public static final String STATUS_CONVERSION_QUEUED = "status.threed.conversionQueued"; 029 030 public static final String STATUS_CONVERSION_RUNNING = "status.threed.conversionRunning"; 031 032 public static final String STATUS_CONVERSION_UNKNOWN = "status.threed.conversionUnknown"; 033 034 public final String status; 035 036 public final String message; 037 038 public ThreeDBatchProgress(String status, String message) { 039 this.message = message; 040 this.status = status; 041 } 042 043 public String getMessage() { 044 return message; 045 } 046 047 public boolean isUnknown() { 048 return this.status.equals(STATUS_CONVERSION_UNKNOWN); 049 } 050 051 public boolean isQueued() { 052 return this.status.equals(STATUS_CONVERSION_QUEUED); 053 } 054 055 public boolean isRunning() { 056 return this.status.equals(STATUS_CONVERSION_RUNNING); 057 } 058 059}