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 * matic 011 */ 012package org.nuxeo.ecm.automation.client.model; 013 014import java.util.Date; 015 016import org.nuxeo.ecm.automation.client.OperationRequest; 017 018/** 019 * @author matic 020 * @deprecated in 5.7 (did not work in 5.6 either): pass Date instance directly to the {@link OperationRequest#setInput} 021 * method. 022 */ 023@Deprecated 024public class DateInput implements OperationInput { 025 026 private static final long serialVersionUID = -240778472381265434L; 027 028 public DateInput(Date date) { 029 this.date = date; 030 } 031 032 protected final Date date; 033 034 @Override 035 public boolean isBinary() { 036 return false; 037 } 038 039 @Override 040 public String getInputType() { 041 return "date"; 042 } 043 044 @Override 045 public String getInputRef() { 046 return "date:" + DateUtils.formatDate(date); 047 } 048 049}