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.apache.commons.lang.builder.EqualsBuilder;
021import org.apache.commons.lang.builder.HashCodeBuilder;
022import org.nuxeo.ecm.core.api.DocumentLocation;
023
024/**
025 * Unique identifier for a given video conversion on one document.
026 *
027 * @author <a href="mailto:troger@nuxeo.com">Thomas Roger</a>
028 * @since 5.5
029 * @deprecated since 5.7.3, use other APIs instead
030 */
031@Deprecated
032public class VideoConversionId {
033
034    private final DocumentLocation documentLocation;
035
036    private final String conversionName;
037
038    public VideoConversionId(DocumentLocation documentLocation, String conversionName) {
039        this.documentLocation = documentLocation;
040        this.conversionName = conversionName;
041    }
042
043    public DocumentLocation getDocumentLocation() {
044        return documentLocation;
045    }
046
047    public String getConversionName() {
048        return conversionName;
049    }
050
051    @Override
052    public int hashCode() {
053        return HashCodeBuilder.reflectionHashCode(this);
054    }
055
056    @Override
057    public boolean equals(Object obj) {
058        return EqualsBuilder.reflectionEquals(this, obj);
059    }
060
061    @Override
062    public String toString() {
063        return String.format("VideoConversionId [documentLocation=%s, conversionName=%s]", documentLocation,
064                conversionName);
065    }
066}