View Javadoc

1   /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  
16  package org.kuali.student.r1.common.assembly;
17  
18  import java.util.List;
19  
20  import org.apache.log4j.Logger;
21  import org.kuali.student.r1.common.assembly.data.AssemblyException;
22  import org.kuali.student.r1.common.assembly.data.Metadata;
23  import org.kuali.student.r1.common.assembly.old.Assembler;
24  import org.kuali.student.r1.common.assembly.old.data.SaveResult;
25  import org.kuali.student.r2.common.dto.ValidationResultInfo;
26  
27  public class AddOneAssembler implements Assembler<Integer,Integer>{
28  	final Logger LOG = Logger.getLogger(AddOneAssembler.class);
29  	
30  	@Override
31  	public Integer assemble(Integer input) throws AssemblyException {
32  		// TODO Auto-generated method stub
33  		return null;
34  	}
35  
36  	@Override
37  	public Integer disassemble(Integer input) throws AssemblyException {
38  		// TODO Auto-generated method stub
39  		return null;
40  	}
41  
42  	@Override
43  	public Integer get(String id) throws AssemblyException {
44  		return new Integer(1);
45  	}
46  
47  	@Override
48  	public Metadata getMetadata(String idType, String id, String type, String state)
49  			throws AssemblyException {
50  		// TODO Auto-generated method stub
51  		return null;
52  	}
53  
54  	@Override
55  	public SaveResult<Integer> save(Integer input) throws AssemblyException {
56  		LOG.info("Saving Result, adding 1 to input and returning. Input:"+input);
57  		SaveResult<Integer> result = new SaveResult<Integer>();
58  		result.setValue(input + 1);
59  		return result;
60  	}
61  
62  	@Override
63  	public List<ValidationResultInfo> validate(Integer input)
64  			throws AssemblyException {
65  		// TODO Auto-generated method stub
66  		return null;
67  	}
68  
69  	@Override
70  	public Metadata getDefaultMetadata() throws AssemblyException {
71  		// TODO Auto-generated method stub
72  		return null;
73  	}
74  
75  }