1 // 2 // This file is part of the prose package. 3 // 4 // The contents of this file are subject to the Mozilla Public License 5 // Version 1.1 (the "License"); you may not use this file except in 6 // compliance with the License. You may obtain a copy of the License at 7 // http://www.mozilla.org/MPL/ 8 // 9 // Software distributed under the License is distributed on an "AS IS" basis, 10 // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 // for the specific language governing rights and limitations under the 12 // License. 13 // 14 // The Original Code is prose. 15 // 16 // The Initial Developer of the Original Code is Andrei Popovici. Portions 17 // created by Andrei Popovici are Copyright (C) 2002 Andrei Popovici. 18 // All Rights Reserved. 19 // 20 // Contributor(s): 21 // $Id: Insertable.java,v 1.1.1.1 2003/07/02 15:30:50 apopovic Exp $ 22 // ===================================================================== 23 // 24 // (history at end) 25 // 26 27 package ch.ethz.prose; 28 29 /** 30 * Interface Insertable should be implemented by all 31 * elements that get inserted into PROSE and need 32 * to be notified. Examples are extensions or crosscuts. 33 * 34 * @version $Revision: 1.1.1.1 $ 35 * @author Andrei Popovici 36 */ 37 public 38 interface Insertable { 39 40 /** Action executed by the extension before/after the 41 * insertion of an element. This method should be used to perform 42 * specific setup actions for the crosscuts of an 43 * extensions (if the insertable is an extension), e.g., 44 * the extension was inserted in order to configure 45 * its crosscut. If the insertable is a crosscut, it may 46 * be told in which VM is running. 47 * 48 * @param before if <code>true</code>, the action 49 * is performed before insertion, otherwise it is 50 * performed after the insertion. 51 */ 52 public void insertionAction(boolean beforeInsertion) throws AspectInsertionException; 53 54 /** Action executed by the extension before/after its 55 * withdrawal. 56 * 57 * @param before if <code>true</code>, the action 58 * is performed before withdrawal, otherwise it is 59 * performed after the withdrawal. 60 */ 61 public void withdrawalAction(boolean beforeWithdrawal); 62 63 64 65 /** Return the priority of this insertable object. 66 */ 67 public int getPriority(); 68 } 69 70 71 //====================================================================== 72 // 73 // $Log: Insertable.java,v $ 74 // Revision 1.1.1.1 2003/07/02 15:30:50 apopovic 75 // Imported from ETH Zurich 76 // 77 // Revision 1.1 2003/05/05 13:58:29 popovici 78 // renaming from runes to prose 79 // 80 // Revision 1.4 2003/04/29 12:41:04 popovici 81 // Feature added: 82 // - the 'setPriority' in class insertable allows now Aspects and Crosscuts to have a priority. 83 // Notitification is done from low int priorities to high int priorities. 84 // - the 'setAspectID' introduced to replace constuctor; used to be cumberstone for subclasses 85 // 86 // Revision 1.3 2003/04/17 15:15:06 popovici 87 // Extension->Aspect renaming 88 // 89 // Revision 1.2 2002/03/28 13:48:36 popovici 90 // Mozilla-ified 91 // 92 // Revision 1.1 2002/02/21 12:36:48 popovici 93 // Interface 'Insertable' added. Extensions and crosscuts 94 // are now insertable objects. 95 // 96