KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > struts > tiles > ComponentDefinitionsFactory


1 /*
2  * $Id: ComponentDefinitionsFactory.java 54929 2004-10-16 16:38:42Z germuska $
3  *
4  * Copyright 1999-2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19
20 package org.apache.struts.tiles;
21
22 import java.io.Serializable JavaDoc;
23 import java.util.Map JavaDoc;
24
25 import javax.servlet.ServletContext JavaDoc;
26 import javax.servlet.ServletRequest JavaDoc;
27
28 /**
29  * Component repository interface.
30  * This interface allows to retrieve an definition by its name, independently of the
31  * factory implementation.
32  * Implementation must be Serializable, in order to be compliant with web Container
33  * having this constraint (Weblogic 6.x).
34  * @deprecated Use DefinitionsFactory instead.
35 */

36 public interface ComponentDefinitionsFactory extends Serializable JavaDoc
37 {
38
39    /**
40      * Get a definition by its name.
41      * @param name Name of requested definition.
42      * @param request Current servelet request
43      * @param servletContext current servlet context
44      * @throws DefinitionsFactoryException An error occur while getting definition.
45      * @throws NoSuchDefinitionException No definition found for specified name
46      * Implementation can throw more accurate exception as a subclass of this exception
47    */

48    public ComponentDefinition getDefinition(String JavaDoc name, ServletRequest JavaDoc request, ServletContext JavaDoc servletContext) throws NoSuchDefinitionException,DefinitionsFactoryException;
49
50    /**
51      * Init factory.
52      * This method is called exactly once immediately after factory creation in
53      * case of internal creation (by DefinitionUtil).
54      * @param servletContext Servlet Context passed to newly created factory.
55      * @param properties Map of name/property passed to newly created factory.
56      * Map can contains more properties than requested.
57      * @throws DefinitionsFactoryException An error occur during initialization.
58    */

59    public void initFactory(ServletContext JavaDoc servletContext, Map JavaDoc properties) throws DefinitionsFactoryException;
60 }
61
Popular Tags