Package org.apache.wookie.beans

Examples of org.apache.wookie.beans.IWidgetType


        widget.setAuthor(author);
      }
  }

  private static void createTypes(IPersistenceManager persistenceManager, String[] widgetTypes, IWidget widget){
    IWidgetType widgetType;
    if (widgetTypes!=null){
      for(int i=0;i<widgetTypes.length;i++){
        widgetType = persistenceManager.newInstance(IWidgetType.class);
        widgetType.setWidgetContext(widgetTypes[i]);
        widget.getWidgetTypes().add(widgetType);
      }
    }
  }
View Full Code Here


                    widget.getStartFiles().add(widgetFRStartFile);
                    IStartFile widgetENStartFile = persistenceManager.newInstance(IStartFile.class);
                    widgetENStartFile.setUrl(WidgetRuntimeHelper.getWebContextPath() + "/wservices/notsupported/locales/en/index.htm");
                    widgetENStartFile.setLang("en");
                    widget.getStartFiles().add(widgetENStartFile);
                    IWidgetType widgetType = persistenceManager.newInstance(IWidgetType.class);
                    widgetType.setWidgetContext("unsupported");
                    widget.getWidgetTypes().add(widgetType);
                    IWidgetIcon widgetIcon = persistenceManager.newInstance(IWidgetIcon.class);
                    widgetIcon.setSrc(WidgetRuntimeHelper.getWebContextPath() + "/shared/images/defaultwidget.png");
                    widgetIcon.setHeight(80);
                    widgetIcon.setWidth(80);
View Full Code Here

    if (widgets == null||widgets.length==0) return true;
    for(IWidget widget : widgets){
      // remove any widget types for this widget
        Iterator<IWidgetType> typesIter = widget.getWidgetTypes().iterator();
        while(typesIter.hasNext()) {
            IWidgetType widgetType = typesIter.next();
                if(serviceName.equalsIgnoreCase(widgetType.getWidgetContext())){
                    typesIter.remove();
                }
        }
        persistenceManager.save(widget);
    }         
View Full Code Here

        widget.setAuthor(author);
      }
  }

  private static void createTypes(IPersistenceManager persistenceManager, String[] widgetTypes, IWidget widget){
    IWidgetType widgetType;
    if (widgetTypes!=null){
      for(int i=0;i<widgetTypes.length;i++){
        widgetType = persistenceManager.newInstance(IWidgetType.class);
        widgetType.setWidgetContext(widgetTypes[i]);
        widget.getWidgetTypes().add(widgetType);
      }
    }
  }
View Full Code Here

    if (widgets == null||widgets.length==0) return true;
    for(IWidget widget : widgets){
      // remove any widget types for this widget
        Iterator<IWidgetType> typesIter = widget.getWidgetTypes().iterator();
        while(typesIter.hasNext()) {
            IWidgetType widgetType = typesIter.next();
                if(serviceName.equalsIgnoreCase(widgetType.getWidgetContext())){
                    typesIter.remove();
                }
        }
        persistenceManager.save(widget);
    }         
View Full Code Here

                    widget.getStartFiles().add(widgetFRStartFile);
                    IStartFile widgetENStartFile = persistenceManager.newInstance(IStartFile.class);
                    widgetENStartFile.setUrl("/wookie/wservices/notsupported/locales/en/index.htm");
                    widgetENStartFile.setLang("en");
                    widget.getStartFiles().add(widgetENStartFile);
                    IWidgetType widgetType = persistenceManager.newInstance(IWidgetType.class);
                    widgetType.setWidgetContext("unsupported");
                    widget.getWidgetTypes().add(widgetType);
                    IWidgetIcon widgetIcon = persistenceManager.newInstance(IWidgetIcon.class);
                    widgetIcon.setSrc("/wookie/shared/images/defaultwidget.png");
                    widgetIcon.setHeight(80);
                    widgetIcon.setWidth(80);
View Full Code Here

    widget.setVersion(model.getVersion());
    return widget;
  }

  private static void createTypes(IPersistenceManager persistenceManager, String[] widgetTypes, IWidget widget){
    IWidgetType widgetType;
    if (widgetTypes!=null){
      for(int i=0;i<widgetTypes.length;i++){
        widgetType = persistenceManager.newInstance(IWidgetType.class);
        widgetType.setWidgetContext(widgetTypes[i]);
        widget.getWidgetTypes().add(widgetType);
      }
    }
  }
View Full Code Here

        IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
        IWidget widget = persistenceManager.findById(IWidget.class, dbkey);
        Iterator<IWidgetType> typesIter = widget.getWidgetTypes().iterator();
        while (typesIter.hasNext())
        {
            IWidgetType type = typesIter.next();
            if (type.getWidgetContext().equalsIgnoreCase(serviceType))
            {
                return true;
            }
        }
    return false;         
View Full Code Here

        IWidget widget = persistenceManager.findById(IWidget.class, widgetId);
    // remove any widget types for this widget
        Iterator<IWidgetType> typesIter = widget.getWidgetTypes().iterator();
        while (typesIter.hasNext())
        {
            IWidgetType type = typesIter.next();
            if (type.getWidgetContext().equalsIgnoreCase(widgetType))
            {
                typesIter.remove();
                response = true;
            }
        }
View Full Code Here

        boolean widgetTypesSet = false;
    if (widgetTypes!=null){
      for(int i=0;i<widgetTypes.length;i++){ 
        if(!doesServiceExistForWidget(widget.getId(), widgetTypes[i])){
            IWidgetType widgetType = persistenceManager.newInstance(IWidgetType.class);
          widgetType.setWidgetContext(widgetTypes[i]);
          widget.getWidgetTypes().add(widgetType);
          widgetTypesSet = true;
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.wookie.beans.IWidgetType

Copyright © 2018 www.massapicom. 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.