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.service; 019 020import org.nuxeo.common.xmap.annotation.XNode; 021import org.nuxeo.common.xmap.annotation.XObject; 022 023/** 024 * Object representing a registered video conversion on the {@link VideoService} . 025 * 026 * @author <a href="mailto:troger@nuxeo.com">Thomas Roger</a> 027 * @since 5.5 028 */ 029@XObject("videoConversion") 030public class VideoConversion implements Cloneable { 031 032 @XNode("@name") 033 private String name; 034 035 @XNode("@converter") 036 private String converter; 037 038 @XNode("@height") 039 private long height; 040 041 @XNode("@enabled") 042 private boolean enabled = true; 043 044 /** 045 * @since 7.2 046 */ 047 @XNode("@rendition") 048 private Boolean rendition; 049 050 /** 051 * @since 7.2 052 */ 053 @XNode("@renditionVisible") 054 private Boolean renditionVisible; 055 056 public String getName() { 057 return name; 058 } 059 060 public String getConverter() { 061 return converter; 062 } 063 064 public long getHeight() { 065 return height; 066 } 067 068 public boolean isEnabled() { 069 return enabled; 070 } 071 072 public void setConverter(String converter) { 073 this.converter = converter; 074 } 075 076 public void setEnabled(boolean enabled) { 077 this.enabled = enabled; 078 } 079 080 public void setHeight(long height) { 081 this.height = height; 082 } 083 084 public boolean isRenditionVisible() { 085 return renditionVisible == null || renditionVisible; 086 } 087 088 public boolean isRenditionVisibleSet() { 089 return renditionVisible != null; 090 } 091 092 public boolean isRendition() { 093 return rendition == null || rendition; 094 } 095 096 public boolean isRenditionSet() { 097 return rendition != null; 098 } 099 100 public void setRendition(Boolean rendition) { 101 this.rendition = rendition; 102 } 103 104 public void setRenditionVisible(Boolean renditionVisible) { 105 this.renditionVisible = renditionVisible; 106 } 107 108 @Override 109 public VideoConversion clone() throws CloneNotSupportedException { 110 return (VideoConversion) super.clone(); 111 } 112 113}