01: /*
02: * Copyright 2001-2006 C:1 Financial Services GmbH
03: *
04: * This software is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License Version 2.1, as published by the Free Software Foundation.
07: *
08: * This software is distributed in the hope that it will be useful,
09: * but WITHOUT ANY WARRANTY; without even the implied warranty of
10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11: * Lesser General Public License for more details.
12: *
13: * You should have received a copy of the GNU Lesser General Public
14: * License along with this library; if not, write to the Free Software
15: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
16: */
17:
18: package de.finix.contelligent;
19:
20: import de.finix.contelligent.search.Metainfo;
21:
22: /**
23: * The main interface all Contelligent components must implement.
24: *
25: * <P ALIGN=JUSTIFY>
26: * A component is ...
27: * </P>
28: *
29: * Each property is set via set methods according to the JavaBean style.
30: *
31: * Note: if you introduce a new property you must implement a set<property-name>
32: * method, where <property-name> is the name of the property with the first
33: * letter in upper case.
34: */
35: public interface Component {
36:
37: void setComponentContext(ComponentContext ctx);
38:
39: ComponentContext getComponentContext();
40:
41: /**
42: * If a component is dynamic the main servlet will set HTTP header
43: * 'Cache-Control' to 'no-cache' in any HTTP request.
44: */
45: boolean isDynamic();
46:
47: /**
48: * Gets called by the Contelligent system after a component was loaded and
49: * all properties were set. If any exception is thrown by this method the
50: * system assumes that this instance was not properly initialized and the
51: * instance gets removed. <BR>
52: * <B>Important:</B> Any component extending another component has to call
53: * <code>super.postCreate()</code> when implementing this method.
54: */
55: void postCreate() throws Exception;
56:
57: /**
58: * Put the search metainfo of this component to the given metainfo container
59: */
60: void putSearchMetainfo(Metainfo metainfo, CallData callData);
61:
62: /**
63: * Answer true if the content of this component may be changed
64: *
65: * @return
66: */
67: boolean mayChangeContent();
68: }
|