org.openbp.guiclient.model.item
Class ItemUtil

java.lang.Object
  extended by org.openbp.guiclient.model.item.ItemUtil

public class ItemUtil
extends java.lang.Object

Item utility methods.

Author:
Heiko Erhardt

Method Summary
static void ensureUniqueItemName(Item item, Model model)
          Ensures that the name of an item is unique in the specified model and adjusts the item name by appending a running number.
static ObjectDescriptor obtainObjectDescriptor(ItemTypeDescriptor itd)
          Gets an object descriptor for the item's interface class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

ensureUniqueItemName

public static void ensureUniqueItemName(Item item,
                                        Model model)
Ensures that the name of an item is unique in the specified model and adjusts the item name by appending a running number. The method also changes the display name of the item accordingly by appending the running number, e. g. "Name (2)".

Parameters:
item - Item to check
model - Reference model

obtainObjectDescriptor

public static ObjectDescriptor obtainObjectDescriptor(ItemTypeDescriptor itd)
Gets an object descriptor for the item's interface class.

Parameters:
itd - Item type descriptor or null
Returns:
The object descriptor or null on error


Copyright © 2011. All Rights Reserved.