View Javadoc
1   /*
2    * Copyright 2009-2010 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.springframework.batch.admin.integration;
17  
18  /**
19   * Convenient model object for binding XML configuration data from a form
20   * submission.
21   * 
22   * @author Dave Syer
23   * 
24   */
25  public class JobConfigurationRequest {
26  
27  	private String xml;
28  
29  	private String filename = "unknown-origin.xml";
30  
31  	public void setXml(String xml) {
32  		this.xml = xml;
33  	}
34  
35  	public String getXml() {
36  		return xml;
37  	}
38  
39  	@Override
40  	public String toString() {
41  		return "[filename: " + filename + ", xml: " + (xml == null ? null : xml.substring(0, Math.min(255, xml.length())))+"]";
42  	}
43  
44  	/**
45  	 * @param filename the file name to load
46  	 */
47  	public void setFileName(String filename) {
48  		this.filename = filename;
49  	}
50  
51  	/**
52  	 * @return the filename loaded
53  	 */
54  	public String getFilename() {
55  		return filename;
56  	}
57  
58  }