Codota Logo
KeycloakAdapterConfigService
Code IndexAdd Codota to your IDE (free)

How to use
KeycloakAdapterConfigService
in
org.keycloak.subsystem.server.as7

Best Java code snippets using org.keycloak.subsystem.server.as7.KeycloakAdapterConfigService (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: org.keycloak/keycloak-as7-server-subsystem

@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
  DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
  KeycloakAdapterConfigService config = KeycloakAdapterConfigService.INSTANCE;
  String deploymentName = deploymentUnit.getName();
  if (!config.isKeycloakServerDeployment(deploymentName)) {
    return;
  }
  final EEModuleDescription description = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION);
  String webContext = config.getWebContext();
  if (webContext == null) {
    throw new DeploymentUnitProcessingException("Can't determine web context/module for Keycloak Server");
  }
  description.setModuleName(webContext);
}
origin: org.keycloak/keycloak-eap6-server-subsystem

@Override
protected void performRemove(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
  String deploymentName = ServerUtil.getDeploymentName(operation);
  KeycloakAdapterConfigService.INSTANCE.setWebContext(null);
  if (requiresRuntime(context)) { // don't do this on a domain controller
    addStepToRemoveServerWar(context, deploymentName);
  }
  super.performRemove(context, operation, model);
}
origin: org.keycloak/keycloak-eap6-server-subsystem

@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
  DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
  KeycloakAdapterConfigService config = KeycloakAdapterConfigService.INSTANCE;
  String deploymentName = deploymentUnit.getName();
  if (!config.isKeycloakServerDeployment(deploymentName)) {
    return;
  }
  final EEModuleDescription description = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION);
  String webContext = config.getWebContext();
  if (webContext == null) {
    throw new DeploymentUnitProcessingException("Can't determine web context/module for Keycloak Server");
  }
  description.setModuleName(webContext);
}
origin: org.keycloak/keycloak-as7-server-subsystem

@Override
protected void performRemove(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
  String deploymentName = ServerUtil.getDeploymentName(operation);
  KeycloakAdapterConfigService.INSTANCE.setWebContext(null);
  if (requiresRuntime(context)) { // don't do this on a domain controller
    addStepToRemoveServerWar(context, deploymentName);
  }
  super.performRemove(context, operation, model);
}
origin: org.keycloak/keycloak-as7-server-subsystem

@Override
protected void finishModelStage(OperationContext context, ModelNode operation, String attributeName, ModelNode newValue, ModelNode oldValue, Resource model) throws OperationFailedException {
  if (!context.isNormalServer() || attribNotChanging(attributeName, newValue, oldValue)) {
    super.finishModelStage(context, operation, attributeName, newValue, oldValue, model);
    return;
  }
  String deploymentName = ServerUtil.getDeploymentName(operation);
  if (attributeName.equals(KeycloakSubsystemDefinition.WEB_CONTEXT.getName())) {
    KeycloakAdapterConfigService.INSTANCE.setWebContext(newValue.asString());
    ServerUtil.addStepToRedeployServerWar(context, deploymentName);
  }
  super.finishModelStage(context, operation, attributeName, newValue, oldValue, model);
}
origin: org.keycloak/keycloak-eap6-server-subsystem

@Override
protected void finishModelStage(OperationContext context, ModelNode operation, String attributeName, ModelNode newValue, ModelNode oldValue, Resource model) throws OperationFailedException {
  if (!context.isNormalServer() || attribNotChanging(attributeName, newValue, oldValue)) {
    super.finishModelStage(context, operation, attributeName, newValue, oldValue, model);
    return;
  }
  String deploymentName = ServerUtil.getDeploymentName(operation);
  if (attributeName.equals(KeycloakSubsystemDefinition.WEB_CONTEXT.getName())) {
    KeycloakAdapterConfigService.INSTANCE.setWebContext(newValue.asString());
    ServerUtil.addStepToRedeployServerWar(context, deploymentName);
  }
  super.finishModelStage(context, operation, attributeName, newValue, oldValue, model);
}
origin: org.keycloak/keycloak-as7-server-subsystem

  protected void populateModel(final OperationContext context, final ModelNode operation, final Resource resource) throws  OperationFailedException {
    ModelNode model = resource.getModel();

    // set attribute values from parsed model
    for (AttributeDefinition attrDef : KeycloakSubsystemDefinition.ALL_ATTRIBUTES) {
      attrDef.validateAndSet(operation, model);
    }

    // returns early if on domain controller
    if (!requiresRuntime(context)) {
      return;
    }

    // don't want to try to start server on host controller
    if (!context.isNormalServer()) {
      return;
    }

    ModelNode webContextNode = resource.getModel().get(KeycloakSubsystemDefinition.WEB_CONTEXT.getName());
    if (!webContextNode.isDefined()) {
      webContextNode = KeycloakSubsystemDefinition.WEB_CONTEXT.getDefaultValue();
    }
    String webContext = webContextNode.asString();

    ServerUtil serverUtil = new ServerUtil(operation);
    serverUtil.addStepToUploadServerWar(context);
    KeycloakAdapterConfigService.INSTANCE.setWebContext(webContext);
  }
}
origin: org.keycloak/keycloak-eap6-server-subsystem

  protected void populateModel(final OperationContext context, final ModelNode operation, final Resource resource) throws  OperationFailedException {
    ModelNode model = resource.getModel();

    // set attribute values from parsed model
    for (AttributeDefinition attrDef : KeycloakSubsystemDefinition.ALL_ATTRIBUTES) {
      attrDef.validateAndSet(operation, model);
    }

    // returns early if on domain controller
    if (!requiresRuntime(context)) {
      return;
    }

    // don't want to try to start server on host controller
    if (!context.isNormalServer()) {
      return;
    }

    ModelNode webContextNode = resource.getModel().get(KeycloakSubsystemDefinition.WEB_CONTEXT.getName());
    if (!webContextNode.isDefined()) {
      webContextNode = KeycloakSubsystemDefinition.WEB_CONTEXT.getDefaultValue();
    }
    String webContext = webContextNode.asString();

    ServerUtil serverUtil = new ServerUtil(operation);
    serverUtil.addStepToUploadServerWar(context);
    KeycloakAdapterConfigService.INSTANCE.setWebContext(webContext);
  }
}
org.keycloak.subsystem.server.as7KeycloakAdapterConfigService

Javadoc

This service keeps track of the entire Keycloak management model so as to provide adapter configuration to each deployment at deploy time.

Most used methods

  • getWebContext
  • isKeycloakServerDeployment
  • setWebContext

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • orElseThrow (Optional)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now