keycloak
公開メンバ関数 | 限定公開メンバ関数 | 非公開メンバ関数 | 全メンバ一覧
org.keycloak.subsystem.server.extension.KeycloakSubsystemWriteAttributeHandler クラス
org.keycloak.subsystem.server.extension.KeycloakSubsystemWriteAttributeHandler の継承関係図
Inheritance graph
org.keycloak.subsystem.server.extension.KeycloakSubsystemWriteAttributeHandler 連携図
Collaboration graph

公開メンバ関数

 KeycloakSubsystemWriteAttributeHandler (List< AttributeDefinition > definitions)
 
 KeycloakSubsystemWriteAttributeHandler (AttributeDefinition... definitions)
 

限定公開メンバ関数

void finishModelStage (OperationContext context, ModelNode operation, String attributeName, ModelNode newValue, ModelNode oldValue, Resource model) throws OperationFailedException
 

非公開メンバ関数

boolean attribNotChanging (String attributeName, ModelNode newValue, ModelNode oldValue)
 

詳解

Update an attribute on an Auth Server.

著者
Stan Silvert ssilv.nosp@m.ert@.nosp@m.redha.nosp@m.t.co.nosp@m.m (C) 2014 Red Hat Inc.

構築子と解体子

◆ KeycloakSubsystemWriteAttributeHandler() [1/2]

org.keycloak.subsystem.server.extension.KeycloakSubsystemWriteAttributeHandler.KeycloakSubsystemWriteAttributeHandler ( List< AttributeDefinition >  definitions)
inline
35  {
36  this(definitions.toArray(new AttributeDefinition[definitions.size()]));
37  }

◆ KeycloakSubsystemWriteAttributeHandler() [2/2]

org.keycloak.subsystem.server.extension.KeycloakSubsystemWriteAttributeHandler.KeycloakSubsystemWriteAttributeHandler ( AttributeDefinition...  definitions)
inline
39  {
40  super(definitions);
41  }

関数詳解

◆ attribNotChanging()

boolean org.keycloak.subsystem.server.extension.KeycloakSubsystemWriteAttributeHandler.attribNotChanging ( String  attributeName,
ModelNode  newValue,
ModelNode  oldValue 
)
inlineprivate
60  {
61  AttributeDefinition attribDef = KeycloakSubsystemDefinition.lookup(attributeName);
62  if (!oldValue.isDefined()) {
63  oldValue = attribDef.getDefaultValue();
64  }
65  if (!newValue.isDefined()) {
66  newValue = attribDef.getDefaultValue();
67  }
68  return newValue.equals(oldValue);
69  }

◆ finishModelStage()

void org.keycloak.subsystem.server.extension.KeycloakSubsystemWriteAttributeHandler.finishModelStage ( OperationContext  context,
ModelNode  operation,
String  attributeName,
ModelNode  newValue,
ModelNode  oldValue,
Resource  model 
) throws OperationFailedException
inlineprotected
44  {
45  if (!context.isNormalServer() || attribNotChanging(attributeName, newValue, oldValue)) {
46  super.finishModelStage(context, operation, attributeName, newValue, oldValue, model);
47  return;
48  }
49 
50  String deploymentName = ServerUtil.getDeploymentName(operation);
51 
52  if (attributeName.equals(KeycloakSubsystemDefinition.WEB_CONTEXT.getName())) {
53  KeycloakAdapterConfigService.INSTANCE.setWebContext(newValue.asString());
54  ServerUtil.addStepToRedeployServerWar(context, deploymentName);
55  }
56 
57  super.finishModelStage(context, operation, attributeName, newValue, oldValue, model);
58  }
boolean attribNotChanging(String attributeName, ModelNode newValue, ModelNode oldValue)
Definition: KeycloakSubsystemWriteAttributeHandler.java:60

このクラス詳解は次のファイルから抽出されました: