Package org.apache.wookie.exceptions

Examples of org.apache.wookie.exceptions.ResourceNotFoundException


   */
  @Override
  protected void show(String resourceId, HttpServletRequest request, HttpServletResponse response) throws ResourceNotFoundException, UnauthorizedAccessException, IOException {
    IWidgetInstance instance = WidgetInstancesController.getLocalizedWidgetInstance(request);
    if (instance == null){
      throw new ResourceNotFoundException();
    } else {
      //
      // Check the API key matches
      //
      String apiKey = request.getParameter("api_key");
View Full Code Here


    if(userId==null || sharedDataKey==null || (serviceType==null && widgetId==null)){
      throw new InvalidParametersException();
    }
    IWidgetInstance instance = WidgetInstancesController.findWidgetInstance(request);
    if(instance==null){
      throw new ResourceNotFoundException();
    }
    else{
      WidgetInstanceFactory.destroy(instance);
      return true;
    }       
View Full Code Here

  @Override
  protected void show(String resourceId, HttpServletRequest request,
      HttpServletResponse response) throws ResourceNotFoundException,
      UnauthorizedAccessException, IOException {
    IWidgetInstance instance = WidgetInstancesController.findWidgetInstance(request);
    if (instance == null) throw new ResourceNotFoundException();
    String name = request.getParameter("propertyname"); //$NON-NLS-1$
    if (name == null || name.trim().equals("")) throw new ResourceNotFoundException();
    String value = null;
    // Note that preferences and shared data keys may be the same!
    // We let the shared data values override.
    IPreference pref = instance.getPreference(name);
    if (pref != null) value = pref.getDvalue();
    ISharedData data = new SharedContext(instance).getSharedData(name);
    if (data != null) value = data.getDvalue();
    if (value == null) throw new ResourceNotFoundException();
    PrintWriter out = response.getWriter();
    out.write(value);
  }
View Full Code Here

      found = new SharedContext(instance).removeSharedData(name);
      Notifier.notifyWidgets(request.getSession(), instance, Notifier.STATE_UPDATED);
    } else {
      found = updatePreference(instance, name, null);
    }
    if (!found) throw new ResourceNotFoundException();
    return true;
 
View Full Code Here

TOP

Related Classes of org.apache.wookie.exceptions.ResourceNotFoundException

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.