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