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