class MarketPlaceApi {

	@Autowired
	private MarketPlaceFacade marketPlaceFacade;

	@Autowired
	private UserFacade userFacade;

	@Inject
	private StoreFacade storeFacade;

	@Inject
	private LanguageUtils languageUtils;

	/**
	 * Get a marketplace from storeCode returns market place details and
	 * merchant store
	 */
	@GetMapping("/private/marketplace/{store}")
	@ApiOperation(httpMethod = "GET", value = "Get market place meta-data", notes = "", produces = "application/json", response = ReadableMarketPlace.class)
	public ReadableMarketPlace marketPlace(@PathVariable String store,
			@RequestParam(value = "lang", required = false) String lang) {

		Language language = languageUtils.getServiceLanguage(lang);
		return marketPlaceFacade.get(store, language);
	}

	// signup new merchant
	@PostMapping("/store/signup")
	@ApiOperation(httpMethod = "POST", value = "Signup store", notes = "", produces = "application/json", response = Void.class)
	public void signup(@RequestBody SignupStore store, @ApiIgnore Language language) {<FILL_FUNCTION_BODY>}
	
	@ResponseStatus(HttpStatus.OK)
	@GetMapping(value = { "/store/{store}/signup/{token}" }, produces = MediaType.APPLICATION_JSON_VALUE)
	@ApiOperation(httpMethod = "GET", value = "Validate store signup token", notes = "", response = Void.class)
	@ApiImplicitParams({ @ApiImplicitParam(name = "store", dataType = "String", defaultValue = "DEFAULT"),
			@ApiImplicitParam(name = "lang", dataType = "String", defaultValue = "en") })
	public void storeSignupVerify(@PathVariable String store, @PathVariable String token,
			@ApiIgnore MerchantStore merchantStore, 
			@ApiIgnore Language language) {

		/**
		 * Receives signup token. Needs to validate if a store
		 * to validate if token has expired
		 * 
		 * If no problem void is returned otherwise throw OperationNotAllowed
		 */

		//TBD

	}
}


		ReadableUser user = null;
		try {
			// check if user exists
			user = userFacade.findByUserName(store.getEmail());

		} catch (ResourceNotFoundException ignore) {//that is what will happen if user does not exists
		}

		if (user != null) {
			throw new OperationNotAllowedException(
					"User [" + store.getEmail() + "] already exist and cannot be registered");
		}

		// check if store exists
		if (storeFacade.existByCode(store.getCode())) {
			throw new OperationNotAllowedException(
					"Store [" + store.getCode() + "] already exist and cannot be registered");
		}

		// create user

		// create store

		// send notification

	
<no_super_class>