1 /*
2 * Copyright 2004-2008 the Seasar Foundation and the Others.
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,
13 * either express or implied. See the License for the specific language
14 * governing permissions and limitations under the License.
15 */
16 package org.seasar.uruma.rcp.configuration;
17
18 import java.io.Writer;
19
20 /**
21 * {@link ConfigurationElement} の内容を コンフィグレーション XML に書き出すためのインターフェースです。<br />
22 *
23 * @author y-komori
24 */
25 public interface ConfigurationWriter {
26 /**
27 * 開始タグを出力します。<br />
28 *
29 * @param element
30 * 要素名
31 * @param writer
32 * 出力先 {@link Writer} オブジェクト
33 */
34 public void writeStartTag(ConfigurationElement element, Writer writer);
35
36 /**
37 * インデント付きで開始タグを出力します。<br />
38 *
39 * @param element
40 * 要素名
41 * @param writer
42 * 出力先 {@link Writer} オブジェクト
43 * @param level
44 * インデントレベル
45 */
46 public void writeStartTag(ConfigurationElement element, Writer writer,
47 int level);
48
49 /**
50 * 終了タグを出力します。<br />
51 *
52 * @param element
53 * 要素名
54 * @param writer
55 * 出力先 {@link Writer} オブジェクト
56 */
57 public void writeEndTag(ConfigurationElement element, Writer writer);
58
59 /**
60 * インデント付きで終了タグを出力します。<br />
61 *
62 * @param element
63 * 要素名
64 * @param writer
65 * 出力先 {@link Writer} オブジェクト
66 * @param level
67 * インデントレベル
68 */
69 public void writeEndTag(ConfigurationElement element, Writer writer,
70 int level);
71
72 /**
73 * {@link ConfigurationWriter} がサポートする {@link ConfigurationElement}
74 * のクラスオブジェクトを返します。<br />
75 *
76 * @return {@link ConfigurationElement} サブクラスの {@link Class} オブジェクト
77 */
78 public Class<? extends ConfigurationElement> getSupportType();
79 }