1 /*
2  * Copyright 2004-2008 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.codehaus.groovy.grails.web.converters.configuration;
17 
18 import org.codehaus.groovy.grails.web.converters.Converter;
19 import org.codehaus.groovy.grails.web.converters.marshaller.ObjectMarshaller;
20 
21 /**
22  * A Spring Bean that can be used to register an ObjectMarshaller.
23  *
24  * @author Siegfried Puchbauer
25  * @since 1.1
26  */
27 @SuppressWarnings("rawtypes")
28 public class ObjectMarshallerRegisterer {
29 
30     private ObjectMarshaller marshaller;
31     private Class<? extends Converter> converterClass;
32     private int priority = DefaultConverterConfiguration.DEFAULT_PRIORITY;
33 
getMarshaller()34     public ObjectMarshaller getMarshaller() {
35         return marshaller;
36     }
37 
setMarshaller(ObjectMarshaller marshaller)38     public void setMarshaller(ObjectMarshaller marshaller) {
39         this.marshaller = marshaller;
40     }
41 
getConverterClass()42     public Class<? extends Converter> getConverterClass() {
43         return converterClass;
44     }
45 
setConverterClass(Class<? extends Converter> converterClass)46     public void setConverterClass(Class<? extends Converter> converterClass) {
47         this.converterClass = converterClass;
48     }
49 
getPriority()50     public int getPriority() {
51         return priority;
52     }
53 
setPriority(int priority)54     public void setPriority(int priority) {
55         this.priority = priority;
56     }
57 }
58