public void createRepository(final CreateRepositoryCommand aCommand) { checkNotNull(aCommand,COMMAND_CANNOT_BE_NULL); final URI location=aCommand.repositoryLocation(); Repository repository = repositoryRepository().repositoryOfLocation(location); checkState(repository==null,"A repository located at '%s' does already exist",location); final URI resource=aCommand.repositoryResource(); repository = Repository.newInstance(location, resource); repositoryRepository().add(repository); }