01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18:
19: /* $Id: Item.java 499016 2007-01-23 13:18:39Z andreas $ */
20:
21: package org.apache.lenya.ac;
22:
23: import org.apache.avalon.framework.configuration.Configuration;
24: import org.apache.avalon.framework.configuration.ConfigurationException;
25: import org.apache.avalon.framework.logger.LogEnabled;
26:
27: /**
28: * An item can be initialized from a configuration.
29: */
30: public interface Item extends LogEnabled {
31:
32: /**
33: * Returns the ID.
34: * @return A string.
35: */
36: String getId();
37:
38: /**
39: * Returns the name.
40: * @return A string.
41: */
42: String getName();
43:
44: /**
45: * Sets the name.
46: * @param name A string.
47: */
48: void setName(String name);
49:
50: /**
51: * Returns the description.
52: * @return A string.
53: */
54: String getDescription();
55:
56: /**
57: * Sets the description.
58: * @param description A string.
59: */
60: void setDescription(String description);
61:
62: /**
63: * Configures this item.
64: * @param configuration The configuration.
65: * @throws ConfigurationException when something went wrong.
66: */
67: void configure(Configuration configuration)
68: throws ConfigurationException;
69:
70: /**
71: * @return The item manager this item belongs to.
72: */
73: ItemManager getItemManager();
74:
75: }
|