uidesigner/com.nokia.sdt.uimodel/src/com/nokia/sdt/component/NewComponentReferenceParameter.java
changeset 0 fb279309251b
equal deleted inserted replaced
-1:000000000000 0:fb279309251b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 package com.nokia.sdt.component;
       
    18 
       
    19 /**
       
    20  * The object is used in conjunction with component
       
    21  * reference properties and the ISetValueCommandExtender
       
    22  * interface.
       
    23  * 
       
    24  * When a component reference property uses the "creationKeys"
       
    25  * attribute to enable creation of new instances, instances
       
    26  * of NewComponentReferenceMarker are passed to the
       
    27  * ISetValueCommandExtender in order to signal the
       
    28  * type of new object to create.
       
    29  * 
       
    30  * The NewComponentReferenceParameter is accessed through
       
    31  * the SetValueCommand which is passed as a parameter to
       
    32  * ISetValueCommandExtender.getExtendedCommand.
       
    33  *
       
    34  */
       
    35 public class NewComponentReferenceParameter {
       
    36 
       
    37 	private String creationKey;
       
    38 	
       
    39 	public NewComponentReferenceParameter(String creationKey) {
       
    40 		this.creationKey = creationKey;
       
    41 	}
       
    42 	
       
    43 	/**
       
    44 	 * Retrieve the key that indicates what type of object
       
    45 	 * to create. The string is opaque to the component system
       
    46 	 * and is meaningful only to the ISetValueCommandExtender
       
    47 	 * implementation.
       
    48 	 */
       
    49 	public String getCreationKey() {
       
    50 		return creationKey;
       
    51 	}
       
    52 
       
    53 	@Override
       
    54 	public String toString() {
       
    55 		return creationKey;
       
    56 	}
       
    57 }