public static ArrayList<Rental> postPropertiesRentals(
			HashMap<String, String> map) throws ConnectionDatabaseException, IllegalCommandException, FileException{
		ArrayList<Rental> list = new ArrayList<Rental>();
		try{
			link = new DataBaseManager();
			int yearActual = Calendar.getInstance().get(Calendar.YEAR);
			
			if(!checkDigit(map.get("year")) || !checkDigit(map.get("cw")))
				throw new IllegalCommandException("year or cw is not a digit");
			
			if(Integer.parseInt(map.get("year")) < yearActual || Integer.parseInt(map.get("cw")) > 52 || Integer.parseInt(map.get("cw")) < 1)
			{
				throw new IllegalCommandException("Invalid Date");
			}
			if (!checkAuth(map.get("auth_username"), map.get("auth_password"), link.getConnetion()))
			{
				throw new ConnectionDatabaseException("Invalid login");	
			}
			
			if(checkIfExists("select [year],[cw] from rental where [year] = ? and [cw] = ? and [property] = ?",new String[] {map.get("year"),map.get("cw"),map.get("pid")}, link.getConnetion()))
			{
				throw new IllegalCommandException("a rent for the chosen date already exists");
			}
			prep = link.getConnetion().prepareStatement("insert into rental ([property],[renter],[year],[cw],[status],[reserved_date]) values(?,?,?,?,?,getDate())");
			prep.setString(1, map.get("pid"));
			prep.setString(2, map.get("auth_username"));
			prep.setString(3, map.get("year"));
			prep.setString(4, map.get("cw"));
			prep.setString(5, "pending");
			int count = prep.executeUpdate();
			if(count >0)
			{
				prep = link.getConnetion().prepareStatement("select [property],[renter],[year],[cw],[status],[reserved_date],[confirmed_date] from rental where [year] = ? and [cw] = ?");
				prep.setString(1, map.get("year"));
				prep.setString(2, map.get("cw"));
				rs = prep.executeQuery();
				list = resultSetToRentalArrayList();
			}
			return list;
		} catch(SQLException e)
		{
			throw new ConnectionDatabaseException("Connection error",e);
		} 
		finally
		{
			close(prep,link);
		}
	}