1 package org.apache.velocity.tools.view;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "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 /**
23 * Interface to simplify and abstract tool handling.
24 *
25 * Implementations of this class should hold both the context
26 * key for the tool and sufficient information to return
27 * an instance of the tool.
28 *
29 * @author Nathan Bubna
30 * @deprecated Use {@link org.apache.velocity.tools.ToolInfo}
31 * @version $Id: ToolInfo.java 961796 2010-07-08 15:18:15Z apetrelli $
32 */
33 @Deprecated
34 public interface ToolInfo
35 {
36
37
38 /**
39 * @return the context key for the tool
40 */
41 String getKey();
42
43
44 /**
45 * @return the fully qualified classname for the tool
46 */
47 String getClassname();
48
49
50 /**
51 * Returns an instance of the tool.
52 *
53 * Instances returned may be new on each call, pooled, or
54 * the be same instance every time depending on the
55 * implementation. The object passed to this method may
56 * be used to initialize or create the tool that is returned,
57 * or it may be null if no such data is required.
58 *
59 * @param initData an object that may be used to initialize the instance
60 * @return an instance of the tool
61 */
62 Object getInstance(Object initData);
63
64
65 }