gpt4 book ai didi

org.jboss.as.web.deployment.WarMetaData.getMergedJBossWebMetaData()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 21:07:05 27 4
gpt4 key购买 nike

本文整理了Java中org.jboss.as.web.deployment.WarMetaData.getMergedJBossWebMetaData()方法的一些代码示例,展示了WarMetaData.getMergedJBossWebMetaData()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WarMetaData.getMergedJBossWebMetaData()方法的具体详情如下:
包路径:org.jboss.as.web.deployment.WarMetaData
类名称:WarMetaData
方法名:getMergedJBossWebMetaData

WarMetaData.getMergedJBossWebMetaData介绍

暂无

代码示例

代码示例来源:origin: camunda/camunda-bpm-platform

JBossWebMetaData mergedJBossWebMetaData = warMetaData.getMergedJBossWebMetaData();
List<ListenerMetaData> listeners = mergedJBossWebMetaData.getListeners();
if(listeners == null) {

代码示例来源:origin: org.keycloak/keycloak-saml-as7-subsystem

public static boolean isDistributable(final DeploymentUnit deploymentUnit) {
  WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
  if (warMetaData == null) {
    return false;
  }
  JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
  if (webMetaData == null) {
    return false;
  }
  return webMetaData.getDistributable() != null || webMetaData.getReplicationConfig() != null;
}

代码示例来源:origin: org.keycloak/keycloak-saml-as7-subsystem

public static boolean isKeycloakSamlAuthMethod(final DeploymentUnit deploymentUnit) {
  WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
  if (warMetaData == null) {
    return false;
  }
  JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
  if (webMetaData == null) {
    return false;
  }
  if (Configuration.INSTANCE.isSecureDeployment(deploymentUnit)) {
    return true;
  }
  LoginConfigMetaData loginConfig = webMetaData.getLoginConfig();
  return loginConfig != null && Objects.equals(loginConfig.getAuthMethod(), "KEYCLOAK-SAML");
}

代码示例来源:origin: org.keycloak/keycloak-as7-subsystem

private String preferredDeploymentName(DeploymentUnit deploymentUnit) {
    String deploymentName = deploymentUnit.getName();
    WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
    if (warMetaData == null) {
      return deploymentName;
    }
    
    JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
    if (webMetaData == null) {
      return deploymentName;
    }
    
    String moduleName = webMetaData.getModuleName();
    if (moduleName != null) return moduleName + ".war";
    
    return deploymentName;
  }
}

代码示例来源:origin: org.keycloak/keycloak-saml-as7-subsystem

private String preferredDeploymentName(DeploymentUnit deploymentUnit) {
    String deploymentName = deploymentUnit.getName();
    WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
    if (warMetaData == null) {
      return deploymentName;
    }
    
    JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
    if (webMetaData == null) {
      return deploymentName;
    }
    
    String moduleName = webMetaData.getModuleName();
    if (moduleName != null) return moduleName + ".war";
    
    return deploymentName;
  }
}

代码示例来源:origin: org.jboss.as/jboss-as-webservices-server-integration

/**
 * Gets the JBossWebMetaData from the WarMetaData attached to the provided deployment unit, if any.
 *
 * @param unit
 * @return the JBossWebMetaData or null if either that or the parent WarMetaData are not found.
 */
public static JBossWebMetaData getJBossWebMetaData(final DeploymentUnit unit) {
  final WarMetaData warMetaData = getOptionalAttachment(unit, WarMetaData.ATTACHMENT_KEY);
  JBossWebMetaData result = null;
  if (warMetaData != null) {
    result = warMetaData.getMergedJBossWebMetaData();
    if (result == null) {
      result = warMetaData.getJBossWebMetaData();
    }
  } else {
    result = getOptionalAttachment(unit, WSAttachmentKeys.JBOSSWEB_METADATA_KEY);
  }
  return result;
}

代码示例来源:origin: org.picketlink/picketlink-as-extension

/**
 * <p>Configures the {@link WarMetaData}.</p>
 * 
 * @param deploymentUnit
 */
private void configureWarMetadata(DeploymentUnit deploymentUnit) {
  WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
  
  warMetaData.getMergedJBossWebMetaData().setSecurityDomain(this.getConfiguration().getSecurityDomain());
}

代码示例来源:origin: org.keycloak/keycloak-saml-as7-subsystem

private void addXMLData(String xml, WarMetaData warMetaData) {
  JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
  if (webMetaData == null) {
    webMetaData = new JBossWebMetaData();
    warMetaData.setMergedJBossWebMetaData(webMetaData);
  }
  List<ParamValueMetaData> contextParams = webMetaData.getContextParams();
  if (contextParams == null) {
    contextParams = new ArrayList<>();
  }
  ParamValueMetaData param = new ParamValueMetaData();
  param.setParamName(AdapterConstants.AUTH_DATA_PARAM_NAME);
  param.setParamValue(xml);
  contextParams.add(param);
  webMetaData.setContextParams(contextParams);
}

代码示例来源:origin: org.keycloak/keycloak-as7-subsystem

private void addJSONData(String json, WarMetaData warMetaData) {
  JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
  if (webMetaData == null) {
    webMetaData = new JBossWebMetaData();
    warMetaData.setMergedJBossWebMetaData(webMetaData);
  }
  List<ParamValueMetaData> contextParams = webMetaData.getContextParams();
  if (contextParams == null) {
    contextParams = new ArrayList<ParamValueMetaData>();
  }
  ParamValueMetaData param = new ParamValueMetaData();
  param.setParamName(AUTH_DATA_PARAM_NAME);
  param.setParamValue(json);
  contextParams.add(param);
  webMetaData.setContextParams(contextParams);
}

代码示例来源:origin: org.jboss.as/jboss-as-weld

return;
JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
if (webMetaData == null) {
  WeldLogger.DEPLOYMENT_LOGGER.debug("Not installing Weld web tier integration as no merged web metadata found");

代码示例来源:origin: org.jboss.as/jboss-as-jaxrs

final JBossWebMetaData webdata = warMetaData.getMergedJBossWebMetaData();

代码示例来源:origin: org.keycloak/keycloak-saml-as7-subsystem

@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
  final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
  if (Configuration.INSTANCE.getSecureDeployment(deploymentUnit) == null) {
    WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
    if (warMetaData == null) {
      return;
    }
    JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
    if (webMetaData == null) {
      return;
    }
    LoginConfigMetaData loginConfig = webMetaData.getLoginConfig();
    if (loginConfig == null) return;
    if (loginConfig.getAuthMethod() == null) return;
    if (!loginConfig.getAuthMethod().equals("KEYCLOAK-SAML")) return;
  }
  final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
  final ModuleLoader moduleLoader = Module.getBootModuleLoader();
  addCommonModules(moduleSpecification, moduleLoader);
  addPlatformSpecificModules(moduleSpecification, moduleLoader);
}

代码示例来源:origin: org.keycloak/keycloak-as7-subsystem

@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
  final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
  if (!KeycloakAdapterConfigService.getInstance().isSecureDeployment(deploymentUnit)) {
    WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
    if (warMetaData == null) {
      return;
    }
    JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
    if (webMetaData == null) {
      return;
    }
    LoginConfigMetaData loginConfig = webMetaData.getLoginConfig();
    if (loginConfig == null) return;
    if (loginConfig.getAuthMethod() == null) return;
    if (!loginConfig.getAuthMethod().equals("KEYCLOAK")) return;
  }
  final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
  final ModuleLoader moduleLoader = Module.getBootModuleLoader();
  addCommonModules(moduleSpecification, moduleLoader);
  addPlatformSpecificModules(moduleSpecification, moduleLoader);
}

代码示例来源:origin: org.keycloak/keycloak-saml-as7-subsystem

JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
if (webMetaData == null) {
  webMetaData = new JBossWebMetaData();

代码示例来源:origin: org.jboss.as/jboss-as-webservices-server-integration

/**
 * Creates web meta data for EJB deployments.
 *
 * @param dep webservice deployment
 */
void create(final Deployment dep) {
  final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
  WarMetaData warMD = ASHelper.getOptionalAttachment(unit, WarMetaData.ATTACHMENT_KEY);
  JBossWebMetaData jbossWebMD = warMD != null ? warMD.getMergedJBossWebMetaData() : null;
  if (warMD == null) {
    warMD = new WarMetaData();
  }
  if (jbossWebMD == null) {
    jbossWebMD = new JBossWebMetaData();
    warMD.setMergedJBossWebMetaData(jbossWebMD);
    unit.putAttachment(WarMetaData.ATTACHMENT_KEY, warMD);
  }
  createWebAppDescriptor(dep, jbossWebMD);
  createJBossWebAppDescriptor(dep, jbossWebMD);
  dep.addAttachment(JBossWebMetaData.class, jbossWebMD);
}

代码示例来源:origin: org.keycloak/keycloak-as7-subsystem

return;
JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
if (webMetaData == null) {
  webMetaData = new JBossWebMetaData();

代码示例来源:origin: org.jboss.as/jboss-as-jaxrs

deploymentData.put(moduleIdentifier, resteasyDeploymentData);
} else {
  scanWebDeployment(deploymentUnit, warMetaData.getMergedJBossWebMetaData(), module.getClassLoader(), resteasyDeploymentData);
  scan(deploymentUnit, module.getClassLoader(), resteasyDeploymentData);

代码示例来源:origin: org.keycloak/keycloak-saml-as7-subsystem

JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();
if (webMetaData == null) {
  webMetaData = new JBossWebMetaData();

代码示例来源:origin: org.jboss.as/jboss-as-jaxrs

final JBossWebMetaData webdata = warMetaData.getMergedJBossWebMetaData();

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com