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 java.util.List;
21:
22: /**
23: * {@link Component Components} may implement this interface to indicated that
24: * they have relations to other components which should not be handled by the
25: * Contelligent System. The system handles any associated resource of components
26: * automatically but for example relations in properties must be handled by the
27: * component itself.
28: *
29: * @see de.finix.contelligent.components.legacy.ComponentReference
30: */
31: public interface ExternalRelationSource {
32:
33: /**
34: * Returns a set of <code>ComponentPath</code> instances which get
35: * interpreted as related targets of this component. The paths may be either
36: * relative or absolute and may still contain
37: * {@link de.finix.contelligent.category.CategoryManager#CATEGORY_TOKEN category tokens}.
38: *
39: * FIXME: describe handling of categories!
40: *
41: * @return a <code>List</code> or null or an empty list if their are no
42: * related targets.
43: */
44: List relatedPaths();
45:
46: /**
47: * Gets called whenever any component gets moved within the Contelligent
48: * System and a component implementing this interface has a relation to it.
49: * The given list contains the new related paths in the same order as
50: * returned by {@link #relatedPaths()}.
51: *
52: * @exception ModificationVetoException
53: * if the component wants to deny the move for any reason or
54: * something went wrong while changing its relations.
55: */
56: void relatedPaths(List newTargetPathsList)
57: throws ModificationVetoException;
58:
59: }
|