/**
  * Description of the Method
  *
  * @param context Description of the Parameter
  * @return Description of the Return Value
  */
 public String executeCommandSaveMove(ActionContext context) {
   // Parameters
   String newFolderId = (String) context.getRequest().getParameter("folderId");
   String itemId = (String) context.getRequest().getParameter("id");
   Connection db = null;
   try {
     db = getConnection(context);
     // Load the ticket and the organization
     Ticket thisTicket = addTicket(context, db);
     int ticketId = thisTicket.getId();
     // Check access permission to organization record
     if (!isRecordAccessPermitted(context, db, thisTicket.getOrgId())) {
       return ("PermissionError");
     }
     // Load the current folder
     FileFolder thisFolder = new FileFolder(db, Integer.parseInt(itemId));
     int folderId = Integer.parseInt(newFolderId);
     if (folderId != 0 && folderId != -1) {
       FileFolder newParent = new FileFolder(db, folderId);
       FileFolderHierarchy thisHierarchy = new FileFolderHierarchy();
       thisHierarchy.setLinkModuleId(Constants.DOCUMENTS_TICKETS);
       thisHierarchy.setLinkItemId(ticketId);
       thisHierarchy.build(db, thisFolder.getId());
       if (thisHierarchy.getHierarchy().hasFolder(Integer.parseInt(newFolderId))) {
         thisFolder.buildSubFolders(db);
         Iterator iterator = (Iterator) thisFolder.getSubFolders().iterator();
         while (iterator.hasNext()) {
           FileFolder childFolder = (FileFolder) iterator.next();
           childFolder.updateParentId(db, thisFolder.getParentId());
         }
       }
     }
     thisFolder.updateParentId(db, folderId);
     return "PopupCloseOK";
   } catch (Exception e) {
     context.getRequest().setAttribute("Error", e);
     return ("SystemError");
   } finally {
     this.freeConnection(context, db);
   }
 }