KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > syndication > feed > synd > impl > Converters


1 /*
2  * Copyright 2004 Sun Microsystems, Inc.
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  */

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 JavaDoc;
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 JavaDoc CONVERTERS_KEY = "Converter.classes";
38
39     public Converters() {
40         super(CONVERTERS_KEY);
41     }
42
43     public Converter getConverter(String JavaDoc feedType) {
44         return (Converter) getPlugin(feedType);
45     }
46
47     protected String JavaDoc getKey(Object JavaDoc obj) {
48         return ((Converter)obj).getType();
49     }
50
51     public List JavaDoc getSupportedFeedTypes() {
52         return getKeys();
53     }
54
55 }
56
Popular Tags