Examples of findWidgetByGuid()


Examples of org.apache.wookie.beans.util.IPersistenceManager.findWidgetByGuid()

                 WidgetFactory.addNewWidget(model, upload, true)
                 String message = model.getLocalName("en") +"' - " + localizedMessages.getString("WidgetAdminServlet.19");
                 _logger.info(message);
               } else {
                 String message = model.getLocalName("en") +"' - " + localizedMessages.getString("WidgetAdminServlet.20");
                 WidgetFactory.update(model, persistenceManager.findWidgetByGuid(model.getIdentifier()), true, upload);
                 _logger.info(message);
               }
               persistenceManager.commit();
             } catch (IOException e) {
                            persistenceManager.rollback();
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findWidgetByGuid()

               fac.setOutputDirectory(WIDGETFOLDER);
               fac.setFeatures(Features.getFeatureNames());
               fac.setStartPageProcessor(new StartPageProcessor());
               W3CWidget model = fac.parse(upload);
               WidgetJavascriptSyntaxAnalyzer jsa = new WidgetJavascriptSyntaxAnalyzer(fac.getUnzippedWidgetDirectory());
               if(persistenceManager.findWidgetByGuid(model.getIdentifier()) == null) {
                 WidgetFactory.addNewWidget(model, upload, true)
                 String message = model.getLocalName("en") +"' - " + localizedMessages.getString("WidgetAdminServlet.19");
                 _logger.info(message);
               } else {
                 String message = model.getLocalName("en") +"' - " + localizedMessages.getString("WidgetAdminServlet.20");
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findWidgetByGuid()

                 WidgetFactory.addNewWidget(model, upload, true)
                 String message = model.getLocalName("en") +"' - " + localizedMessages.getString("WidgetAdminServlet.19");
                 _logger.info(message);
               } else {
                 String message = model.getLocalName("en") +"' - " + localizedMessages.getString("WidgetAdminServlet.20");
                 WidgetFactory.update(model, persistenceManager.findWidgetByGuid(model.getIdentifier()), true, upload);
                 _logger.info(message);
               }
               persistenceManager.commit();
             } catch (IOException e) {
                            persistenceManager.rollback();
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findWidgetByGuid()

   * @return an IWidgetInstance for the default widget, typically the "unsupported widget widget"
   */
  public static IWidgetInstance defaultInstance(String locale){
        IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    IWidgetInstance instance = persistenceManager.newInstance(IWidgetInstance.class);
    instance.setWidget(persistenceManager.findWidgetByGuid("http://notsupported")); //$NON-NLS-1$
    instance.setIdKey("0000");
    instance.setLang(locale);
    instance.setOpensocialToken("");
    return instance;
  }
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findWidgetByGuid()

      IWidget widget = null;
      IWidgetInstance widgetInstance;
      // Widget ID or Widget Type?
          IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
      if (widgetId != null){
        widget = persistenceManager.findWidgetByGuid(widgetId);
      }
      // Unsupported
      if (widget == null) return null;

      // generate a nonce
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findWidgetByGuid()

  protected void update(String resourceId, HttpServletRequest request, HttpServletResponse response)
      throws ResourceNotFoundException, InvalidParametersException,
      UnauthorizedAccessException {
   
    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    IWidget widget = persistenceManager.findWidgetByGuid(resourceId);
    // attempt to get specific widget by id
    if (widget == null) {
      persistenceManager = PersistenceManagerFactory.getPersistenceManager();
      widget = persistenceManager.findById(IWidget.class, resourceId);
    }
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findWidgetByGuid()

      HttpServletResponse response) throws ResourceNotFoundException,
      IOException {

    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    // attempt to get specific widget by URI
    IWidget widget = persistenceManager.findWidgetByGuid(resourceId);
    // attempt to get specific widget by id
    if (widget == null) {
      persistenceManager = PersistenceManagerFactory.getPersistenceManager();
      widget = persistenceManager.findById(IWidget.class, resourceId);
    }
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findWidgetByGuid()

   
    //
    // Identify the widget to delete
    //
    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    IWidget widget = persistenceManager.findWidgetByGuid(resourceId);
    // attempt to get specific widget by id
    if (widget == null) {
      persistenceManager = PersistenceManagerFactory.getPersistenceManager();
      widget = persistenceManager.findById(IWidget.class, resourceId);
    }
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findWidgetByGuid()

       // File f = new File();
        //
        // Check if the widget model corresponds to an existing installed widget
        //
        IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
        if (persistenceManager.findWidgetByGuid(widgetModel.getIdentifier()) == null) {
         
          //
          // A new widget was created, so return 201
          //
          WidgetFactory.addNewWidget(widgetModel, zipFile,false);
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findWidgetByGuid()

         
          //
          // Widget already exists, so update the widget metadata and configuration details
          // and return 200
          //
          WidgetFactory.update(widgetModel,persistenceManager.findWidgetByGuid(widgetModel.getIdentifier()),false, zipFile);
          returnXml(WidgetImportHelper.createXMLWidgetDocument(widgetModel, new File(fac.getUnzippedWidgetDirectory(), "config.xml"), getWookieServerURL(request, "").toString(), true), response);
          return false;
         
        }
       
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.