1 /* 2 * ==================================================================== 3 * This software is subject to the terms of the Common Public License 4 * Agreement, available at the following URL: 5 * http://www.opensource.org/licenses/cpl.html . 6 * Copyright (C) 2003-2004 TONBELLER AG. 7 * All Rights Reserved. 8 * You must accept the terms of that agreement to use this software. 9 * ==================================================================== 10 * 11 * 12 */ 13 package com.tonbeller.jpivot.core; 14 15 /** 16 * An optional extension to a model 17 * @see Model 18 * @author av 19 */ 20 21 public interface Extension { 22 23 /** 24 * Set the model that is extended. 25 */ 26 void setModel(Model model); 27 28 /** 29 * returns the id of this extension. The id identifies the extension within the model. 30 */ 31 String getId(); 32 33 /** 34 * allow an extension to decorate the model. The default implementation should 35 * return <code>modelToDecorate</code> 36 * @param modelToDecorate the model to decorate. It may be different from the model 37 * passed to setModel() because other extensions may already have decorated 38 * modelToDecorate. 39 */ 40 Model decorate(Model modelToDecorate); 41 42 /** 43 * Notification after model initialization is complete 44 */ 45 void modelInitialized(); 46 47 } 48