KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > riotfamily > components > PropertyProcessor


1 /* ***** BEGIN LICENSE BLOCK *****
2  * Version: MPL 1.1
3  * The contents of this file are subject to the Mozilla Public License Version
4  * 1.1 (the "License"); you may not use this file except in compliance with
5  * the License. You may obtain a copy of the License at
6  * http://www.mozilla.org/MPL/
7  *
8  * Software distributed under the License is distributed on an "AS IS" basis,
9  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
10  * for the specific language governing rights and limitations under the
11  * License.
12  *
13  * The Original Code is Riot.
14  *
15  * The Initial Developer of the Original Code is
16  * Neteye GmbH.
17  * Portions created by the Initial Developer are Copyright (C) 2006
18  * the Initial Developer. All Rights Reserved.
19  *
20  * Contributor(s):
21  * Felix Gnass [fgnass at neteye dot de]
22  *
23  * ***** END LICENSE BLOCK ***** */

24 package org.riotfamily.components;
25
26 import java.util.Map JavaDoc;
27
28 import org.riotfamily.components.property.FileStoreProperyProcessor;
29
30 public interface PropertyProcessor {
31
32     /**
33      * Replaces strings in the map by objects suitable for rendering or
34      * editing. The method is invoked before a component is rendered or edited
35      * using a form.
36      */

37     public void resolveStrings(Map JavaDoc map);
38     
39     /**
40      * Replaces objects in the map by their string representation. The method
41      * is invoked after a component model has been edited using a form and
42      * before it is persisted.
43      */

44     public void convertToStrings(Map JavaDoc map);
45     
46     /**
47      * Copies strings from one map to another. The method is invoked when a
48      * copy of a component model needs to be created. Implementors can use this
49      * hook to clone referenced objects. See {@link FileStoreProperyProcessor}
50      * for an example.
51      */

52     public void copy(Map JavaDoc source, Map JavaDoc dest);
53     
54     /**
55      * Deletes orphaned resources. The method is invoked when a component model
56      * is deleted. Implementors can use this hook to delete referenced objects
57      * or resources. See {@link FileStoreProperyProcessor}
58      * for an example.
59      */

60     public void delete(Map JavaDoc map);
61     
62     /**
63      * Implementors may return an array of Strings that are used to tag the
64      * CacheItem that contains the rendered component markup.
65      */

66     public String JavaDoc[] getCacheTags(Map JavaDoc map);
67     
68 }
69
Popular Tags