Package org.apache.wookie.exceptions

Examples of org.apache.wookie.exceptions.UnauthorizedAccessException


    } else {
      //
      // Check the API key matches
      //
      String apiKey = request.getParameter("api_key");
      if (!instance.getApiKey().equals(apiKey)) throw new UnauthorizedAccessException();

      checkProxy(request);
      String url = getUrl(request, instance);
      String locale = request.getParameter("locale");//$NON-NLS-1$
      response.setStatus(HttpServletResponse.SC_OK);
View Full Code Here


  @Override
  protected void show(String resourceId, HttpServletRequest request,
      HttpServletResponse response) throws ResourceNotFoundException,
      UnauthorizedAccessException, IOException {
    if (!WidgetKeyManager.isValidRequest(request)) throw new UnauthorizedAccessException();
    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;
View Full Code Here

  }

  @Override
  protected boolean remove(String resourceId, HttpServletRequest request)
      throws ResourceNotFoundException,UnauthorizedAccessException,InvalidParametersException {
    if (!WidgetKeyManager.isValidRequest(request)) throw new UnauthorizedAccessException();
    if (request.getParameter("value") != null) throw new InvalidParametersException();//$NON-NLS-1$
    String name = request.getParameter("propertyname"); //$NON-NLS-1$
    IWidgetInstance instance = WidgetInstancesController.findWidgetInstance(request);
    if (instance == null) throw new InvalidParametersException();
    if (name == null || name.trim().equals("")) throw new InvalidParametersException();
View Full Code Here

   * @throws InvalidParametersException
   * @throws UnauthorizedAccessException
   */
  public static void createOrUpdate(HttpServletRequest request)
  throws InvalidParametersException,UnauthorizedAccessException {
    if (!WidgetKeyManager.isValidRequest(request)) throw new UnauthorizedAccessException();
    String name = request.getParameter("propertyname"); //$NON-NLS-1$
    String value = request.getParameter("propertyvalue"); //$NON-NLS-1$
    IWidgetInstance instance = WidgetInstancesController.findWidgetInstance(request);
    if (instance == null) throw new InvalidParametersException();
    if (name == null || name.trim().equals("")) throw new InvalidParametersException();
View Full Code Here

 
  // Implementation
 
  @Override
  public void show(String resourceId,HttpServletRequest request, HttpServletResponse response) throws UnauthorizedAccessException,ResourceNotFoundException, IOException{
    if (!WidgetKeyManager.isValidRequest(request)) throw new UnauthorizedAccessException();
    IWidgetInstance instance = WidgetInstancesController.findWidgetInstance(request);
    if (instance == null) throw new ResourceNotFoundException();
    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    IParticipant[] participants = persistenceManager.findParticipants(instance);
    returnXml(ParticipantHelper.createXMLParticipantsDocument(participants), response);
View Full Code Here

   * @throws UnauthorizedAccessException
   */
  public static boolean create(HttpServletRequest request)
      throws ResourceDuplicationException, InvalidParametersException,
      UnauthorizedAccessException {
    if (!WidgetKeyManager.isValidRequest(request)) throw new UnauthorizedAccessException();

    IWidgetInstance instance = WidgetInstancesController.findWidgetInstance(request);
    if (instance == null) throw new InvalidParametersException();
   
    HttpSession session = request.getSession(true);           
View Full Code Here

    return remove(request);
  }
  public static boolean remove(HttpServletRequest request)
      throws ResourceNotFoundException, UnauthorizedAccessException,
      InvalidParametersException {
    if (!WidgetKeyManager.isValidRequest(request)) throw new UnauthorizedAccessException();
    IWidgetInstance instance = WidgetInstancesController.findWidgetInstance(request);
    if (instance == null) throw new InvalidParametersException();
    HttpSession session = request.getSession(true);           
    String participantId = request.getParameter("participant_id"); //$NON-NLS-1$
    if(removeParticipantFromWidgetInstance(instance, participantId)){
View Full Code Here

    } else {
      //
      // Check the API key matches
      //
      String apiKey = request.getParameter("api_key");
      if (!instance.getApiKey().equals(apiKey)) throw new UnauthorizedAccessException();

      checkProxy(request);
      String url = getUrl(request, instance);
      String locale = request.getParameter("locale");//$NON-NLS-1$
      response.setStatus(HttpServletResponse.SC_OK);
View Full Code Here

    } else {
      //
      // Check the API key matches
      //
      String apiKey = request.getParameter("api_key");
      if (!instance.getApiKey().equals(apiKey)) throw new UnauthorizedAccessException();

      checkProxy(request);
      String url = getUrl(request, instance);
      String locale = request.getParameter("locale");//$NON-NLS-1$
      response.setStatus(HttpServletResponse.SC_OK);
View Full Code Here

    } else {
      //
      // Check the API key matches
      //
      String apiKey = request.getParameter("api_key");
      if (!instance.getApiKey().equals(apiKey)) throw new UnauthorizedAccessException();

      checkProxy(request);
      String url = getUrl(request, instance);
      String locale = request.getParameter("locale");//$NON-NLS-1$
      response.setStatus(HttpServletResponse.SC_OK);
View Full Code Here

TOP

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

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.