001/* 002 * Copyright (c) 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 Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 * 009 * Contributors: 010 * Nuxeo - initial API and implementation 011 * 012 * $Id$ 013 */ 014 015package org.nuxeo.ecm.core.convert.api; 016 017import java.io.Serializable; 018import java.util.List; 019 020/** 021 * Result object for an availability check on a Converter. 022 * <p> 023 * Contains an availability flag + error and installation message is needed. 024 * 025 * @author tiry 026 */ 027public class ConverterCheckResult implements Serializable { 028 029 private static final long serialVersionUID = 1L; 030 031 protected boolean available; 032 033 protected String installationMessage; 034 035 protected String errorMessage; 036 037 protected List<String> supportedInputMimeTypes; 038 039 public ConverterCheckResult() { 040 available = true; 041 } 042 043 public ConverterCheckResult(String installationMessage, String errorMessage) { 044 available = false; 045 this.installationMessage = installationMessage; 046 this.errorMessage = errorMessage; 047 } 048 049 public boolean isAvailable() { 050 return available; 051 } 052 053 // Never used. Remove? 054 public void setAvailable(boolean available) { 055 this.available = available; 056 } 057 058 public String getInstallationMessage() { 059 return installationMessage; 060 } 061 062 public String getErrorMessage() { 063 return errorMessage; 064 } 065 066 public List<String> getSupportedInputMimeTypes() { 067 return supportedInputMimeTypes; 068 } 069 070 public void setSupportedInputMimeTypes(List<String> supportedInputMimeTypes) { 071 this.supportedInputMimeTypes = supportedInputMimeTypes; 072 } 073 074}