Examples of ItemTypeDescriptor


Examples of org.openbp.core.model.item.ItemTypeDescriptor

   * @param processType Process type in case of a process item
   * @return The new item
   */
  public static Item createItem(Model model, String suggestedName, String suggestedDisplayName, String itemType, String processType)
  {
    ItemTypeDescriptor itd = ModelConnector.getInstance().getItemTypeDescriptor(itemType);
    return createItem(model, suggestedName, suggestedDisplayName, itd, processType);
  }
View Full Code Here

Examples of org.openbp.core.model.item.ItemTypeDescriptor

    ModelQualifier modelQualifier = ModelQualifier.constructModelQualifier(itemQualifier.getModel());
    Model model = getOptionalModelByQualifier(modelQualifier);
    if (model != null)
    {
      String itemType = itemQualifier.getItemType();
      ItemTypeDescriptor itd = getItemTypeDescriptor(itemType);
      if (itd == null)
      {
        throw new ModelException("UnknownItemType", "Unknown item type '" + itemType + "'.");
      }
View Full Code Here

Examples of org.openbp.core.model.item.ItemTypeDescriptor

   */
  protected byte[] serializeItemToByteArray(Item item)
  {
    Object obj = item;

    ItemTypeDescriptor itd = getItemTypeDescriptor(item.getItemType());
    if (itd.isContainedItem())
    {
      // Item is wrapped by a container class in its xml file
      obj = new ItemContainer(item);
    }

View Full Code Here

Examples of org.openbp.core.model.item.ItemTypeDescriptor

   * @param item Item to reload
   */
  protected void reloadItemAfterModelUpdate(Item item)
  {
    String itemType = item.getItemType();
    ItemTypeDescriptor itd = getItemTypeDescriptor(itemType);

    Item newItem = readItemFromStore(item.getModel(), item.getName(), itd);
    try
    {
      item.copyFrom(newItem, Copyable.COPY_SHALLOW);
View Full Code Here

Examples of org.openbp.core.model.item.ItemTypeDescriptor

    ModelQualifier modelQualifier = ModelQualifier.constructModelQualifier(itemQualifier.getModel());
    Model model = getOptionalModelByQualifier(modelQualifier);
    if (model != null)
    {
      String itemType = itemQualifier.getItemType();
      ItemTypeDescriptor itd = getItemTypeDescriptor(itemType);
      if (itd == null)
        throw new ModelException("UnknownItemType", "Unknown item type '" + itemType + "'.");

      return readItemFromStore(model, itemQualifier.getItem(), itd);
    }
View Full Code Here

Examples of org.openbp.core.model.item.ItemTypeDescriptor

        for (int i = 0; i < supportedItemTypes.length; i++)
        {
          String itemType = supportedItemTypes [i];

          ItemTypeDescriptor itd = ModelConnector.getInstance().getItemTypeDescriptor(itemType);

          ItemTypeToggleAction action = new ItemTypeToggleAction(getPlugin(), itd);

          String filterDescription = filterPrefix;
          ObjectDescriptor od = ItemUtil.obtainObjectDescriptor(itd);
View Full Code Here

Examples of org.openbp.core.model.item.ItemTypeDescriptor

    dbModel.setXml(xml);
  }

  private Item dbModelItemToItem(DbModelItem dbModelItem)
  {
    ItemTypeDescriptor itd = getItemTypeDescriptor(dbModelItem.getItemType());
    ByteArrayInputStream in = new ByteArrayInputStream(dbModelItem.getXml().getBytes());

    Item item = null;

    // Deserialize item descriptor file
    try
    {
      if (itd.isContainedItem())
      {
        // Item is wrapped by a container class in its xml file
        ItemContainer container = (ItemContainer) XMLDriver.getInstance().deserializeStream(ItemContainer.class, in);
        item = container.getItem();
      }
      else
      {
        item = (Item) XMLDriver.getInstance().deserializeStream(itd.getItemClass(), in);
      }
    }
    catch (XMLDriverException e)
    {
      getMsgContainer().addMsg(item, "Error reading component descriptor from database for component $0.", new Object[]
      {
        new ModelQualifier(dbModelItem.getModelName(), dbModelItem.getItemName(), dbModelItem.getItemType()).toUntypedString(), e
      });
      return null;
    }

    // Explicitely make this item an item of the specified type
    item.setItemType(itd.getItemType());

    return item;
  }
View Full Code Here

Examples of org.openbp.core.model.item.ItemTypeDescriptor

  {
    String [] itemTypes = ModelConnector.getInstance().getItemTypes(ItemTypeRegistry.SKIP_INVISIBLE);

    for (int i = 0; i < itemTypes.length; ++i)
    {
      ItemTypeDescriptor itd = ModelConnector.getInstance().getItemTypeDescriptor(itemTypes [i]);

      NewAction action = new NewAction(itd);
      action.setPriority(i);

      group.addMenuChild(action);
View Full Code Here

Examples of org.openbp.core.model.item.ItemTypeDescriptor

  {
    String [] itemTypes = ModelConnector.getInstance().getItemTypes(ItemTypeRegistry.SKIP_INVISIBLE);

    for (int i = 0; i < itemTypes.length; ++i)
    {
      ItemTypeDescriptor itd = ModelConnector.getInstance().getItemTypeDescriptor(itemTypes [i]);

      NewAction action = new NewAction(itd);
      action.setPriority(i);

      iae.add(action);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.