[KEYCLOAK-19102] Replace usages of deprecated setAllowNull(boolean) calls in the adapters subsystems with setRequired(boolean)
- WildFly will remove deprecated APIs, code needs to be changed before the next WildFly upgrade.
This commit is contained in:
parent
10e425315f
commit
271033c3a4
7 changed files with 11 additions and 11 deletions
|
@ -60,25 +60,25 @@ public class IdentityProviderDefinition extends SimpleResourceDefinition {
|
||||||
private static final ObjectTypeAttributeDefinition SINGLE_SIGN_ON =
|
private static final ObjectTypeAttributeDefinition SINGLE_SIGN_ON =
|
||||||
ObjectTypeAttributeDefinition.Builder.of(Constants.Model.SINGLE_SIGN_ON,
|
ObjectTypeAttributeDefinition.Builder.of(Constants.Model.SINGLE_SIGN_ON,
|
||||||
SingleSignOnDefinition.ATTRIBUTES)
|
SingleSignOnDefinition.ATTRIBUTES)
|
||||||
.setAllowNull(false)
|
.setRequired(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
private static final ObjectTypeAttributeDefinition SINGLE_LOGOUT =
|
private static final ObjectTypeAttributeDefinition SINGLE_LOGOUT =
|
||||||
ObjectTypeAttributeDefinition.Builder.of(Constants.Model.SINGLE_LOGOUT,
|
ObjectTypeAttributeDefinition.Builder.of(Constants.Model.SINGLE_LOGOUT,
|
||||||
SingleLogoutDefinition.ATTRIBUTES)
|
SingleLogoutDefinition.ATTRIBUTES)
|
||||||
.setAllowNull(false)
|
.setRequired(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
private static final ObjectTypeAttributeDefinition ALLOWED_CLOCK_SKEW =
|
private static final ObjectTypeAttributeDefinition ALLOWED_CLOCK_SKEW =
|
||||||
ObjectTypeAttributeDefinition.Builder.of(Constants.Model.ALLOWED_CLOCK_SKEW,
|
ObjectTypeAttributeDefinition.Builder.of(Constants.Model.ALLOWED_CLOCK_SKEW,
|
||||||
AllowedClockSkew.ATTRIBUTES)
|
AllowedClockSkew.ATTRIBUTES)
|
||||||
.setAllowNull(true)
|
.setRequired(false)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
private static final ObjectTypeAttributeDefinition HTTP_CLIENT =
|
private static final ObjectTypeAttributeDefinition HTTP_CLIENT =
|
||||||
ObjectTypeAttributeDefinition.Builder.of(Constants.Model.HTTP_CLIENT,
|
ObjectTypeAttributeDefinition.Builder.of(Constants.Model.HTTP_CLIENT,
|
||||||
HttpClientDefinition.ATTRIBUTES)
|
HttpClientDefinition.ATTRIBUTES)
|
||||||
.setAllowNull(true)
|
.setRequired(false)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
static final SimpleAttributeDefinition[] ATTRIBUTES = {SIGNATURES_REQUIRED, SIGNATURE_ALGORITHM, SIGNATURE_CANONICALIZATION_METHOD, METADATA_URL};
|
static final SimpleAttributeDefinition[] ATTRIBUTES = {SIGNATURES_REQUIRED, SIGNATURE_ALGORITHM, SIGNATURE_CANONICALIZATION_METHOD, METADATA_URL};
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class KeyDefinition extends SimpleResourceDefinition {
|
||||||
static final ObjectTypeAttributeDefinition KEY_STORE =
|
static final ObjectTypeAttributeDefinition KEY_STORE =
|
||||||
ObjectTypeAttributeDefinition.Builder.of(Constants.Model.KEY_STORE,
|
ObjectTypeAttributeDefinition.Builder.of(Constants.Model.KEY_STORE,
|
||||||
KeyStoreDefinition.ALL_ATTRIBUTES)
|
KeyStoreDefinition.ALL_ATTRIBUTES)
|
||||||
.setAllowNull(true)
|
.setRequired(false)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
static final SimpleAttributeDefinition[] ATTRIBUTES = {SIGNING, ENCRYPTION};
|
static final SimpleAttributeDefinition[] ATTRIBUTES = {SIGNING, ENCRYPTION};
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class ServiceProviderDefinition extends SimpleResourceDefinition {
|
||||||
|
|
||||||
static final ListAttributeDefinition ROLE_ATTRIBUTES =
|
static final ListAttributeDefinition ROLE_ATTRIBUTES =
|
||||||
new StringListAttributeDefinition.Builder(Constants.Model.ROLE_ATTRIBUTES)
|
new StringListAttributeDefinition.Builder(Constants.Model.ROLE_ATTRIBUTES)
|
||||||
.setAllowNull(true)
|
.setRequired(false)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
static final SimpleAttributeDefinition ROLE_MAPPINGS_PROVIDER_ID =
|
static final SimpleAttributeDefinition ROLE_MAPPINGS_PROVIDER_ID =
|
||||||
|
|
|
@ -27,6 +27,6 @@ public class ModulesListAttributeBuilder extends StringListAttributeDefinition.B
|
||||||
public ModulesListAttributeBuilder() {
|
public ModulesListAttributeBuilder() {
|
||||||
super("modules");
|
super("modules");
|
||||||
setAllowExpression(true);
|
setAllowExpression(true);
|
||||||
setAllowNull(true);
|
setRequired(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class ProvidersListAttributeBuilder extends StringListAttributeDefinition
|
||||||
provider.add("classpath:${jboss.home.dir}/providers/*");
|
provider.add("classpath:${jboss.home.dir}/providers/*");
|
||||||
this.defaultValue = provider;
|
this.defaultValue = provider;
|
||||||
setAllowExpression(true);
|
setAllowExpression(true);
|
||||||
setAllowNull(true);
|
setRequired(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class ProviderResourceDefinition extends SimpleResourceDefinition {
|
||||||
new SimpleAttributeDefinitionBuilder("enabled", ModelType.BOOLEAN, true)
|
new SimpleAttributeDefinitionBuilder("enabled", ModelType.BOOLEAN, true)
|
||||||
.setAllowExpression(true)
|
.setAllowExpression(true)
|
||||||
.setDefaultValue(new ModelNode(true))
|
.setDefaultValue(new ModelNode(true))
|
||||||
.setAllowNull(false)
|
.setRequired(true)
|
||||||
.setRestartAllServices()
|
.setRestartAllServices()
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class ThemeResourceDefinition extends SimpleResourceDefinition {
|
||||||
new SimpleAttributeDefinitionBuilder("cacheThemes", ModelType.BOOLEAN, true)
|
new SimpleAttributeDefinitionBuilder("cacheThemes", ModelType.BOOLEAN, true)
|
||||||
.setAllowExpression(true)
|
.setAllowExpression(true)
|
||||||
.setDefaultValue(new ModelNode(true))
|
.setDefaultValue(new ModelNode(true))
|
||||||
.setAllowNull(false)
|
.setRequired(true)
|
||||||
.setRestartAllServices()
|
.setRestartAllServices()
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ public class ThemeResourceDefinition extends SimpleResourceDefinition {
|
||||||
new SimpleAttributeDefinitionBuilder("cacheTemplates", ModelType.BOOLEAN, true)
|
new SimpleAttributeDefinitionBuilder("cacheTemplates", ModelType.BOOLEAN, true)
|
||||||
.setAllowExpression(true)
|
.setAllowExpression(true)
|
||||||
.setDefaultValue(new ModelNode(true))
|
.setDefaultValue(new ModelNode(true))
|
||||||
.setAllowNull(false)
|
.setRequired(true)
|
||||||
.setRestartAllServices()
|
.setRestartAllServices()
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue