01: /*
02: * Copyright 2004 Sun Microsystems, Inc.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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: */
17: package com.sun.syndication.feed.synd.impl;
18:
19: import com.sun.syndication.io.impl.PluginManager;
20: import com.sun.syndication.feed.synd.Converter;
21:
22: import java.util.List;
23:
24: /**
25: * Created by IntelliJ IDEA.
26: * User: tucu
27: * Date: May 21, 2004
28: * Time: 5:26:04 PM
29: * To change this template use Options | File Templates.
30: */
31: public class Converters extends PluginManager {
32:
33: /**
34: * Converter.classes= [className] ...
35: *
36: */
37: public static final String CONVERTERS_KEY = "Converter.classes";
38:
39: public Converters() {
40: super (CONVERTERS_KEY);
41: }
42:
43: public Converter getConverter(String feedType) {
44: return (Converter) getPlugin(feedType);
45: }
46:
47: protected String getKey(Object obj) {
48: return ((Converter) obj).getType();
49: }
50:
51: public List getSupportedFeedTypes() {
52: return getKeys();
53: }
54:
55: }
|