Examples of IWidgetService


Examples of org.apache.wookie.beans.IWidgetService

   * @return
   */
  private static IWidgetService getWidgetService(String resourceId) throws ResourceNotFoundException{
    if (resourceId == null) throw new ResourceNotFoundException();
    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    IWidgetService ws = persistenceManager.findById(IWidgetService.class, resourceId);
    if (ws == null) {
      IWidgetService[] wsa = persistenceManager.findByValue(IWidgetService.class, "serviceName", resourceId);
      if (wsa != null && wsa.length == 1) ws = wsa[0];
    }
    if (ws == null) throw new ResourceNotFoundException();
View Full Code Here

Examples of org.apache.wookie.beans.IWidgetService

                // WidgetService
                if (initializing && (persistenceManager.findAll(IWidgetService.class).length == 0))
                {
                    // optional: create only if initializing
                    IWidgetService chatWidgetService = persistenceManager.newInstance(IWidgetService.class);
                    chatWidgetService.setServiceName("chat");
                    persistenceManager.save(chatWidgetService);
                    IWidgetService gamesWidgetService = persistenceManager.newInstance(IWidgetService.class);
                    gamesWidgetService.setServiceName("games");
                    persistenceManager.save(gamesWidgetService);
                    IWidgetService votingWidgetService = persistenceManager.newInstance(IWidgetService.class);
                    votingWidgetService.setServiceName("voting");
                    persistenceManager.save(votingWidgetService);
                    IWidgetService weatherWidgetService = persistenceManager.newInstance(IWidgetService.class);
                    weatherWidgetService.setServiceName("weather");
                    persistenceManager.save(weatherWidgetService);
                }
                else
                {
                    initializing = false;
                }
                if (persistenceManager.findByValue(IWidgetService.class, "serviceName", "unsupported").length == 0)
                {
                    // required: always create if not found
                    IWidgetService unsupportedWidgetService = persistenceManager.newInstance(IWidgetService.class);
                    unsupportedWidgetService.setServiceName("unsupported");
                    persistenceManager.save(unsupportedWidgetService);
                }
                else
                {
                    initializing = 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.