Package edu.wpi.cs.wpisuitetng.exceptions

Examples of edu.wpi.cs.wpisuitetng.exceptions.WPISuiteException


      }
      throw new BadRequestException();
    }

    if(!db.save(newDefect, s.getProject())) {
      throw new WPISuiteException();
    }
    return newDefect;
  }
View Full Code Here


    } else {
      // add changeset to Defect events, save to database
      existingDefect.getEvents().add(changeset);
      // TODO: events field doesn't persist without explicit save - is this a bug?
      if(!db.save(existingDefect, session.getProject()) || !db.save(existingDefect.getEvents())) {
        throw new WPISuiteException();
      }
    }
   
    return existingDefect;
  }
View Full Code Here

    final PostBoardMessage newMessage = PostBoardMessage.fromJson(content);

    // Save the message in the database if possible, otherwise throw an exception
    // We want the message to be associated with the project the user logged in to
    if (!db.save(newMessage, s.getProject())) {
      throw new WPISuiteException();
    }

    // Return the newly created message (this gets passed back to the client)
    return newMessage;
  }
View Full Code Here

  @Override
  public PostBoardMessage[] getEntity(Session s, String id)
      throws NotFoundException, WPISuiteException {
    // Throw an exception if an ID was specified, as this module does not support
    // retrieving specific PostBoardMessages.
    throw new WPISuiteException();
  }
View Full Code Here

  @Override
  public PostBoardMessage update(Session s, String content)
      throws WPISuiteException {

    // This module does not allow PostBoardMessages to be modified, so throw an exception
    throw new WPISuiteException();
  }
View Full Code Here

   */
  @Override
  public boolean deleteEntity(Session s, String id) throws WPISuiteException {

    // This module does not allow PostBoardMessages to be deleted, so throw an exception
    throw new WPISuiteException();
  }
View Full Code Here

   */
  @Override
  public void deleteAll(Session s) throws WPISuiteException {

    // This module does not allow PostBoardMessages to be deleted, so throw an exception
    throw new WPISuiteException();
  }
View Full Code Here

      }
    }
    final Method theGetter = methodToBeSaved;
    if(theGetter == null){
      logger.log(Level.WARNING, "Getter method was null during retrieve attempt");
      throw new WPISuiteException("Null getter method.");
    }

    List<Model> result = theDB.query(new Predicate<Model>(){
      public boolean match(Model anObject){
        try {
View Full Code Here

    }

    final Method theGetter = methodToBeSaved;
    if(theGetter == null){
      logger.log(Level.WARNING, "Getter method was null during retrieve attempt");
      throw new WPISuiteException("Null getter method.");
    }


    List<Model> result = theDB.query(new Predicate<Model>(){
      public boolean match(Model anObject){
View Full Code Here

        }
      }
      final Method theSetter = methodToBeSaved;
      if(theSetter == null){
        logger.log(Level.WARNING, "Setter method was null during retrieve attempt");
        throw new WPISuiteException("Null setter method.");
      }

      try {
        theObject = (Object) theSetter.invoke(objectsToUpdate.get(i), changeValue);
        save(theObject, aProject);
View Full Code Here

TOP

Related Classes of edu.wpi.cs.wpisuitetng.exceptions.WPISuiteException

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.