/**
  * Get refactoring preview. Preview is tree of refactoring changes.
  *
  * @param refactoringSession the refactoring session.
  * @return refactoring preview tree
  * @throws RefactoringException when there are no corresponding refactoring session
  */
 @POST
 @Path("get/preview")
 @Produces("application/json")
 @Consumes("application/json")
 public RefactoringPreview getRefactoringPreview(RefactoringSession refactoringSession)
     throws RefactoringException {
   return manager.getRefactoringPreview(refactoringSession.getSessionId());
 }
 /**
  * Apply refactoring.
  *
  * @param session the refactoring session
  * @return the result fo applied refactoring
  * @throws RefactoringException when there are no corresponding refactoring session
  */
 @POST
 @Path("apply")
 @Produces("application/json")
 @Consumes("application/json")
 public RefactoringResult applyRefactoring(RefactoringSession session)
     throws RefactoringException {
   return manager.applyRefactoring(session.getSessionId());
 }
 /**
  * Create refactoring change. Creation of the change starts final checking for refactoring.
  * Without creating change refactoring can't be applied.
  *
  * @param refactoringSession the refactoring session.
  * @return result of creation of the change.
  * @throws RefactoringException when there are no corresponding refactoring session
  */
 @POST
 @Path("create/change")
 @Produces("application/json")
 @Consumes("application/json")
 public ChangeCreationResult createChange(RefactoringSession refactoringSession)
     throws RefactoringException {
   return manager.createChange(refactoringSession.getSessionId());
 }