1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.syncope.core.spring.security;
20
21 import java.util.Optional;
22 import org.apache.syncope.common.lib.types.AnyTypeKind;
23
24 public class DelegatedAdministrationException extends RuntimeException {
25
26 private static final long serialVersionUID = 7540587364235915081L;
27
28 public DelegatedAdministrationException(final String realm, final String type, final String key) {
29 super("Missing entitlement or realm administration under " + realm + " for "
30 + Optional.ofNullable(key).map(s -> type + ' ' + s).orElseGet(() -> "new " + type));
31 }
32
33 public DelegatedAdministrationException(final AnyTypeKind type, final String key) {
34 super("The requested UPDATE would alter the set of dynamic realms for " + type + ' ' + key);
35 }
36 }