01: package org.apache.velocity.tools.view;
02:
03: /*
04: * Licensed to the Apache Software Foundation (ASF) under one
05: * or more contributor license agreements. See the NOTICE file
06: * distributed with this work for additional information
07: * regarding copyright ownership. The ASF licenses this file
08: * to you under the Apache License, Version 2.0 (the
09: * "License"); you may not use this file except in compliance
10: * with the License. You may obtain a copy of the License at
11: *
12: * http://www.apache.org/licenses/LICENSE-2.0
13: *
14: * Unless required by applicable law or agreed to in writing,
15: * software distributed under the License is distributed on an
16: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17: * KIND, either express or implied. See the License for the
18: * specific language governing permissions and limitations
19: * under the License.
20: */
21:
22: import java.util.Map;
23:
24: /**
25: * Common interface for toolbox manager implementations.
26: *
27: * @author Nathan Bubna
28: * @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
29: * @author <a href="mailto:sidler@teamup.com">Gabe Sidler</a>
30: * @author <a href="mailto:henning@schmiedehausen.org">Henning P. Schmiedehausen</a>
31: * @version $Id: ToolboxManager.java 479724 2006-11-27 18:49:37Z nbubna $
32: */
33: public interface ToolboxManager {
34:
35: /**
36: * Adds a tool to be managed
37: */
38: void addTool(ToolInfo info);
39:
40: /**
41: * Adds a data object for the context.
42: *
43: * @param info An object that implements ToolInfo
44: */
45: void addData(ToolInfo info);
46:
47: /**
48: * Retrieves a map of the tools and data being managed. Tools
49: * that have an init(Object) method will be (re)initialized
50: * using the specified initData.
51: *
52: * @param initData data used to initialize tools
53: * @return the created ToolboxContext
54: * @since VelocityTools 1.2
55: */
56: Map getToolbox(Object initData);
57:
58: }
|