01: /*
02: * The contents of this file are subject to the terms of the Common Development
03: * and Distribution License (the License). You may not use this file except in
04: * compliance with the License.
05: *
06: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
07: * or http://www.netbeans.org/cddl.txt.
08: *
09: * When distributing Covered Code, include this CDDL Header Notice in each file
10: * and include the License file at http://www.netbeans.org/cddl.txt.
11: * If applicable, add the following below the CDDL Header, with the fields
12: * enclosed by brackets [] replaced by your own identifying information:
13: * "Portions Copyrighted [year] [name of copyright owner]"
14: *
15: * The Original Software is NetBeans. The Initial Developer of the Original
16: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17: * Microsystems, Inc. All Rights Reserved.
18: */
19:
20: /**
21: *
22: */package org.netbeans.modules.bpel.model.api.references;
23:
24: import org.netbeans.modules.xml.schema.model.ReferenceableSchemaComponent;
25: import org.netbeans.modules.xml.wsdl.model.ReferenceableWSDLComponent;
26: import org.netbeans.modules.xml.xam.Reference;
27:
28: /**
29: * This interface should be implemented by entities that refers to some other
30: * entities. They are contain reference to other OM element and when this
31: * element is changed in some way they should be changed. F.e. Receive contains
32: * reference to Variable. When someone change variable name Receive should
33: * change attribute to new name.
34: *
35: * @author ads
36: */
37: public interface ReferenceCollection {
38:
39: /**
40: * Returns array of references.
41: *
42: * @return array of references.
43: */
44: Reference[] getReferences();
45:
46: /**
47: * Creates reference inside BPEL OM to specified referenceable element.
48: * @param <T> Referencable OM class.
49: * @param target Object for which needs to create reference.
50: * @param type Type of referenceable object.
51: * @return Reference to <code>target</code> object.
52: */
53: <T extends BpelReferenceable> BpelReference<T> createReference(
54: T target, Class<T> type);
55:
56: /**
57: * Creates reference to specified Schema OM referenceable element.
58: * @param <T> Referencable OM class.
59: * @param target Object for which needs to create reference.
60: * @param type Type of referenceable object.
61: * @return Reference to <code>target</code> object.
62: */
63: <T extends ReferenceableSchemaComponent> SchemaReference<T> createSchemaReference(
64: T target, Class<T> type);
65:
66: /**
67: * Creates reference to specified WSDL OM referenceable element.
68: * @param <T> Referencable OM class.
69: * @param target Object for which needs to create reference.
70: * @param type Type of referenceable object.
71: * @return Reference to <code>target</code> object.
72: */
73: <T extends ReferenceableWSDLComponent> WSDLReference<T> createWSDLReference(
74: T target, Class<T> type);
75: }
|