Skip to content
Permalink
Browse files
Merge pull request #21 from myrle-krantz/develop
multiple re-initialization support.
  • Loading branch information
myrle-krantz committed Jul 13, 2017
2 parents 5de793c + 53587cb commit 3d8b7be7ae64482307eb766157a3e2653146f2d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
@@ -58,7 +58,7 @@ ResponseEntity<Void> create(@RequestBody @Valid final PermittableGroup instance)
throw ServiceException.badRequest("Instance may not be null.");

if (service.findByIdentifier(instance.getIdentifier()).isPresent())
throw ServiceException.conflict("Instance already applicationExists with identifier:" + instance.getIdentifier());
throw ServiceException.conflict("Instance already exists with identifier:" + instance.getIdentifier());

final CreatePermittableGroupCommand createCommand = new CreatePermittableGroupCommand(instance);
this.commandGateway.process(createCommand);
@@ -77,6 +77,7 @@ List<PermittableGroup> findAll() {
@RequestMapping(value= PathConstants.IDENTIFIER_RESOURCE_STRING, method = RequestMethod.GET,
consumes = {MediaType.ALL_VALUE},
produces = {MediaType.APPLICATION_JSON_VALUE})
@Permittable(value = AcceptedTokenType.SYSTEM)
@Permittable(value = AcceptedTokenType.TENANT, groupId = PermittableGroupIds.ROLE_MANAGEMENT)
public @ResponseBody ResponseEntity<PermittableGroup> get(@PathVariable(PathConstants.IDENTIFIER_PATH_VARIABLE) final String identifier)
{
@@ -65,7 +65,7 @@
throw ServiceException.badRequest("Instance may not be null.");

if (service.findByIdentifier(instance.getIdentifier()).isPresent())
throw ServiceException.conflict("Instance already applicationExists with identifier:" + instance.getIdentifier());
throw ServiceException.conflict("Instance already exists with identifier:" + instance.getIdentifier());

final CreateRoleCommand createCommand = new CreateRoleCommand(instance);
this.commandGateway.process(createCommand);

0 comments on commit 3d8b7be

Please sign in to comment.