001/* 002 * (C) Copyright 2015 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 * Nuxeo 018 */ 019 020package org.nuxeo.ecm.platform.ui.web.auth.service; 021 022import java.io.Serializable; 023 024import org.nuxeo.common.xmap.annotation.XNode; 025import org.nuxeo.common.xmap.annotation.XObject; 026import org.nuxeo.runtime.api.Framework; 027 028/** 029 * @author <a href="mailto:[email protected]">Arnaud Kervern</a> 030 * @since 7.10 031 */ 032@XObject("loginVideo") 033public class LoginVideo implements Serializable { 034 035 private static final long serialVersionUID = 1L; 036 037 @XNode("@src") 038 protected String src; 039 040 @XNode("@type") 041 protected String type; 042 043 public String getType() { 044 return type; 045 } 046 047 public void setType(String type) { 048 this.type = type; 049 } 050 051 public String getSrc() { 052 return src; 053 } 054 055 public void setSrc(String src) { 056 this.src = Framework.expandVars(src); 057 } 058 059 @Override 060 public boolean equals(Object o) { 061 if (this == o) { 062 return true; 063 } 064 if (o == null || getClass() != o.getClass()) { 065 return false; 066 } 067 068 LoginVideo that = (LoginVideo) o; 069 070 if (src != null ? !src.equals(that.src) : that.src != null) { 071 return false; 072 } 073 return !(type != null ? !type.equals(that.type) : that.type != null); 074 } 075 076 @Override 077 public int hashCode() { 078 int result = src != null ? src.hashCode() : 0; 079 result = 31 * result + (type != null ? type.hashCode() : 0); 080 return result; 081 } 082 083 @Override 084 public LoginVideo clone() { 085 LoginVideo clone = new LoginVideo(); 086 clone.src = src; 087 clone.type = type; 088 return clone; 089 } 090 091}