KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > repository > helpers > RepositoryPropertyHelper


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
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.apache.cocoon.components.repository.helpers;
17
18 import java.util.List JavaDoc;
19 import java.util.Map JavaDoc;
20 import java.util.Set JavaDoc;
21
22 import org.apache.cocoon.ProcessingException;
23 import org.apache.cocoon.components.source.helpers.SourceProperty;
24 import org.w3c.dom.Node JavaDoc;
25
26 /**
27  * A property helper interface intended to be used
28  * by flowscripts or corresponding wrapper components.
29  */

30 public interface RepositoryPropertyHelper {
31     
32     /**
33      * get a single property
34      *
35      * @param uri the uri of the resource.
36      * @param name the name of the property.
37      * @param namespace the namespace of the property.
38      * @return the property.
39      * @throws ProcessingException
40      */

41     SourceProperty getProperty(String JavaDoc uri, String JavaDoc name, String JavaDoc namespace) throws ProcessingException;
42
43     /**
44      * get multiple properties
45      *
46      * @param uri the uri of the resource.
47      * @param propNames a Set containing the property names.
48      * @return a Map containing the property values.
49      * @throws ProcessingException
50      */

51     Map JavaDoc getProperties(String JavaDoc uri, Set JavaDoc propNames) throws ProcessingException;
52
53     /**
54      * get all properties
55      *
56      * @param uri the uri of the resource.
57      * @return a List containing the property values.
58      * @throws ProcessingException
59      */

60     List JavaDoc getAllProperties(String JavaDoc uri) throws ProcessingException;
61
62     /**
63      * set a single property to a String value
64      *
65      * @param uri the uri of the resource.
66      * @param name the name of the property.
67      * @param namespace the namespace of the property.
68      * @param value the String value to set the property to.
69      * @return a boolean indicating success.
70      * @throws ProcessingException
71      */

72     boolean setProperty(String JavaDoc uri, String JavaDoc name, String JavaDoc namespace, String JavaDoc value) throws ProcessingException;
73
74     /**
75      * set a single property to a W3C Node value
76      *
77      * @param uri the uri of the resource.
78      * @param name the name of the property.
79      * @param namespace the namespace of the property.
80      * @param value the DOM value to set the property to.
81      * @return a boolean indicating success.
82      * @throws ProcessingException
83      */

84     boolean setProperty(String JavaDoc uri, String JavaDoc name, String JavaDoc namespace, Node JavaDoc value) throws ProcessingException;
85
86     /**
87      * set multiple properties
88      *
89      * @param uri the uri of the resource.
90      * @param properties a Map containing the properties to set.
91      * @return a boolean indicating success.
92      * @throws ProcessingException
93      */

94     boolean setProperties(String JavaDoc uri, Map JavaDoc properties) throws ProcessingException;
95
96 }
Popular Tags