cbridgha | 012e1be | 2005-10-03 18:11:38 +0000 | [diff] [blame] | 1 | /******************************************************************************* |
| 2 | * Copyright (c) 2003, 2005 IBM Corporation and others. |
| 3 | * All rights reserved. This program and the accompanying materials |
| 4 | * are made available under the terms of the Eclipse Public License v1.0 |
| 5 | * which accompanies this distribution, and is available at |
| 6 | * http://www.eclipse.org/legal/epl-v10.html |
| 7 | * |
| 8 | * Contributors: |
| 9 | * IBM Corporation - initial API and implementation |
| 10 | *******************************************************************************/ |
| 11 | |
| 12 | package org.eclipse.wst.common.frameworks.internal.datamodel.ui; |
| 13 | |
| 14 | /** |
| 15 | * |
| 16 | * The wizard framework allows page groups to be inserted after other page group. |
| 17 | * If more than one page group inserts itself after a particular page group it may |
| 18 | * not be deterministic which page group should follow each other. This class |
| 19 | * allows a particular page group to determine the order in which subsequent page |
| 20 | * groups should be ordered. |
| 21 | * |
| 22 | * For example: A page group T has three page groups X, Y, and Z that have registered |
| 23 | * via the wizardPageGroup extension point to follow it. |
| 24 | * The wizard framework will call getNextGroup with: |
| 25 | * |
| 26 | * T.getNextGroup( null, { "X", "Y", "Z" } ) |
| 27 | * |
| 28 | * This method should return either "X", "Y", "Z", or null if no page group |
| 29 | * should follow. If "Y" was returned then a subequent call |
| 30 | * will be made by the framework with: |
| 31 | * |
| 32 | * T.getNextGroup( "Y", { "X", "Y", "Z" } ) |
| 33 | * |
| 34 | * Again this method should return either "X", "Y", "Z", or null if no page |
| 35 | * group should follow this page group "Y". |
| 36 | * |
| 37 | * Note: any page group can have a page group handler associated with it so this method |
| 38 | * call is recursive in nature. For example: the page group Y might have page |
| 39 | * groups Y1, Y2, and Y3 following it. This would result in the following calls: |
| 40 | * |
| 41 | * T.getNextGroup( null, { "X", "Y", "Z" } ) // "Y" is selected using Ts handler. |
| 42 | * Y.getNextGroup( null, { "Y1", "Y2", "Y3" } ) // "Y1" is selected using Ys handler. |
| 43 | * |
| 44 | * For this example Y1 has no page groups following it. |
| 45 | * |
| 46 | * T.getNextGroup( "Y", { "X", "Y", "Z" } ) // null is selected using Ts handler. |
| 47 | * |
| 48 | * For this example, the T handler decided that no page group followed Y not even X or Z. |
| 49 | * |
| 50 | */ |
cbridgha | aa96c3b | 2005-10-11 17:02:35 +0000 | [diff] [blame] | 51 | public interface IDMPageGroupHandler |
cbridgha | 012e1be | 2005-10-03 18:11:38 +0000 | [diff] [blame] | 52 | { |
| 53 | /** |
| 54 | * |
| 55 | * @param currentPageGroupID the current page group ID. This value will be null the first time |
| 56 | * this method is called. |
| 57 | * @param pageGroupIDs a list of page group IDs that follow the page group for this handler. |
| 58 | * @return returns the page group id that should follow currentPageGroupID, or it |
| 59 | * should return null if no page group follows currentPageGroupID. |
| 60 | * |
| 61 | */ |
| 62 | public String getNextPageGroup( String currentPageGroupID, String[] pageGroupIDs ); |
| 63 | } |