Tabnine Logo
SpecDescriptorPropertyReplacement.propertyReplacer
Code IndexAdd Tabnine to your IDE (free)

How to use
propertyReplacer
method
in
org.jboss.as.ee.structure.SpecDescriptorPropertyReplacement

Best Java code snippets using org.jboss.as.ee.structure.SpecDescriptorPropertyReplacement.propertyReplacer (Showing top 20 results out of 315)

origin: wildfly/wildfly

public PropertyReplacingBeansXmlParser(DeploymentUnit deploymentUnit) {
  this.replacer = SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit);
}
origin: wildfly/wildfly

try {
  XMLStreamReader reader = getXMLStreamReader(stream, descriptor, dtdInfo);
  EjbJarMetaData ejbJarMetaData = EjbJarMetaDataParser.parse(reader, dtdInfo, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
  return ejbJarMetaData;
} catch (XMLStreamException xmlse) {
origin: wildfly/wildfly

XMLStreamReader xmlReader = inputFactory.createXMLStreamReader(is);
WebFragmentMetaData webFragmentMetaData = WebFragmentMetaDataParser.parse(xmlReader, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
webFragments.put(resourceRoot.getRootName(), webFragmentMetaData);
origin: wildfly/wildfly

final XMLStreamReader xmlReader = inputFactory.createXMLStreamReader(is);
WebMetaData webMetaData = WebMetaDataParser.parse(xmlReader, dtdInfo, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
origin: wildfly/wildfly

public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
  final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
  if (!DeploymentTypeMarker.isType(DeploymentType.EAR, deploymentUnit)) {
    return;
  }
  final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT);
  final VirtualFile deploymentFile = deploymentRoot.getRoot();
  EarMetaData earMetaData = handleSpecMetadata(deploymentFile, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
  JBossAppMetaData jbossMetaData = handleJbossMetadata(deploymentFile, JBossDescriptorPropertyReplacement.propertyReplacer(deploymentUnit), deploymentUnit);
  if (earMetaData == null && jbossMetaData == null) {
    return;
  }
  // the jboss-app.xml has a distinct-name configured then attach it to the deployment unit
  if (jbossMetaData != null && jbossMetaData.getDistinctName() != null) {
    deploymentUnit.putAttachment(Attachments.DISTINCT_NAME, jbossMetaData.getDistinctName());
  }
  JBossAppMetaData merged;
  if (earMetaData != null) {
    merged = new JBossAppMetaData(earMetaData.getEarVersion());
  } else {
    merged = new JBossAppMetaData();
  }
  JBossAppMetaDataMerger.merge(merged, jbossMetaData, earMetaData);
  deploymentUnit.putAttachment(Attachments.EAR_METADATA, merged);
  if (merged.getEarEnvironmentRefsGroup() != null) {
    final DeploymentDescriptorEnvironment bindings = new DeploymentDescriptorEnvironment("java:app/env/", merged.getEarEnvironmentRefsGroup());
    deploymentUnit.putAttachment(org.jboss.as.ee.component.Attachments.MODULE_DEPLOYMENT_DESCRIPTOR_ENVIRONMENT, bindings);
  }
}
origin: org.jboss.as/jboss-as-weld

  private BeansXml parseBeansXml(URL beansXmlFile, BeansXmlParser parser, final DeploymentUnit deploymentUnit) throws DeploymentUnitProcessingException {
    return parser.parse(beansXmlFile, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
  }
}
origin: org.jboss.as/jboss-as-weld

private BeansXml parseBeansXml(VirtualFile beansXmlFile, BeansXmlParser parser, final DeploymentUnit deploymentUnit) throws DeploymentUnitProcessingException {
  try {
    return parser.parse(beansXmlFile.asFileURL(), SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
  } catch (MalformedURLException e) {
    throw WeldMessages.MESSAGES.couldNotGetBeansXmlAsURL(beansXmlFile.toString(), e);
  }
}
origin: org.jboss.eap/wildfly-jpa

private void parse(
    final VirtualFile persistence_xml,
    final List<PersistenceUnitMetadataHolder> listPUHolders,
    final DeploymentUnit deploymentUnit)
  throws DeploymentUnitProcessingException {
  ROOT_LOGGER.tracef("parse checking if %s exists, result = %b",persistence_xml.toString(), persistence_xml.exists());
  if (persistence_xml.exists() && persistence_xml.isFile()) {
    InputStream is = null;
    try {
      is = persistence_xml.openStream();
      final XMLInputFactory inputFactory = XMLInputFactory.newInstance();
      inputFactory.setXMLResolver(NoopXMLResolver.create());
      XMLStreamReader xmlReader = inputFactory.createXMLStreamReader(is);
      PersistenceUnitMetadataHolder puHolder = PersistenceUnitXmlParser.parse(xmlReader, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
      postParseSteps(persistence_xml, puHolder, deploymentUnit);
      listPUHolders.add(puHolder);
    } catch (Exception e) {
      throw new DeploymentUnitProcessingException(JpaLogger.ROOT_LOGGER.failedToParse(persistence_xml), e);
    } finally {
      try {
        if (is != null) {
          is.close();
        }
      } catch (IOException e) {
        // Ignore
      }
    }
  }
}
origin: org.wildfly/wildfly-jpa

private void parse(
    final VirtualFile persistence_xml,
    final List<PersistenceUnitMetadataHolder> listPUHolders,
    final DeploymentUnit deploymentUnit)
  throws DeploymentUnitProcessingException {
  ROOT_LOGGER.tracef("parse checking if %s exists, result = %b",persistence_xml.toString(), persistence_xml.exists());
  if (persistence_xml.exists() && persistence_xml.isFile()) {
    InputStream is = null;
    try {
      is = persistence_xml.openStream();
      final XMLInputFactory inputFactory = XMLInputFactory.newInstance();
      inputFactory.setXMLResolver(NoopXMLResolver.create());
      XMLStreamReader xmlReader = inputFactory.createXMLStreamReader(is);
      PersistenceUnitMetadataHolder puHolder = PersistenceUnitXmlParser.parse(xmlReader, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
      postParseSteps(persistence_xml, puHolder, deploymentUnit);
      listPUHolders.add(puHolder);
    } catch (Exception e) {
      throw new DeploymentUnitProcessingException(JpaLogger.ROOT_LOGGER.failedToParse(persistence_xml), e);
    } finally {
      try {
        if (is != null) {
          is.close();
        }
      } catch (IOException e) {
        // Ignore
      }
    }
  }
}
origin: org.wildfly/wildfly-jpa

private PersistenceUnitMetadata getPersistenceUnit(final DeploymentUnit deploymentUnit, final AnnotationInstance annotation, EEModuleClassDescription classDescription)
  throws DeploymentUnitProcessingException {
  final AnnotationValue puName = annotation.value("unitName");
  String searchName = null;   // note:  a null searchName will match the first PU definition found
  if (puName != null && (searchName = puName.asString()) != null) {
    searchName = SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit).replaceProperties(searchName);
  }
  ROOT_LOGGER.debugf("persistence unit search for unitName=%s referenced from class=%s (annotation=%s)", searchName, classDescription.getClassName(), annotation.toString());
  PersistenceUnitMetadata pu = PersistenceUnitSearch.resolvePersistenceUnitSupplier(deploymentUnit, searchName);
  if (null == pu) {
    classDescription.setInvalid(JpaLogger.ROOT_LOGGER.persistenceUnitNotFound(searchName, deploymentUnit));
    return null;
  }
  return pu;
}
origin: org.jboss.eap/wildfly-jpa

private PersistenceUnitMetadata getPersistenceUnit(final DeploymentUnit deploymentUnit, final AnnotationInstance annotation, EEModuleClassDescription classDescription)
  throws DeploymentUnitProcessingException {
  final AnnotationValue puName = annotation.value("unitName");
  String searchName = null;   // note:  a null searchName will match the first PU definition found
  if (puName != null && (searchName = puName.asString()) != null) {
    searchName = SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit).replaceProperties(searchName);
  }
  ROOT_LOGGER.debugf("persistence unit search for unitName=%s referenced from class=%s (annotation=%s)", searchName, classDescription.getClassName(), annotation.toString());
  PersistenceUnitMetadata pu = PersistenceUnitSearch.resolvePersistenceUnitSupplier(deploymentUnit, searchName);
  if (null == pu) {
    classDescription.setInvalid(JpaLogger.ROOT_LOGGER.persistenceUnitNotFound(searchName, deploymentUnit));
    return null;
  }
  return pu;
}
origin: org.jboss.as/jboss-as-ejb3

try {
  XMLStreamReader reader = getXMLStreamReader(stream, descriptor, dtdInfo);
  EjbJarMetaData ejbJarMetaData = EjbJarMetaDataParser.parse(reader, dtdInfo, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
  return ejbJarMetaData;
} catch (XMLStreamException xmlse) {
origin: org.wildfly/wildfly-undertow

XMLStreamReader xmlReader = inputFactory.createXMLStreamReader(is);
WebFragmentMetaData webFragmentMetaData = WebFragmentMetaDataParser.parse(xmlReader, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
webFragments.put(resourceRoot.getRootName(), webFragmentMetaData);
origin: org.jboss.eap/wildfly-undertow

XMLStreamReader xmlReader = inputFactory.createXMLStreamReader(is);
WebFragmentMetaData webFragmentMetaData = WebFragmentMetaDataParser.parse(xmlReader, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
webFragments.put(resourceRoot.getRootName(), webFragmentMetaData);
origin: org.wildfly/wildfly-undertow

final XMLStreamReader xmlReader = inputFactory.createXMLStreamReader(is);
WebMetaData webMetaData = WebMetaDataParser.parse(xmlReader, dtdInfo, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
origin: org.jboss.eap/wildfly-undertow

final XMLStreamReader xmlReader = inputFactory.createXMLStreamReader(is);
WebMetaData webMetaData = WebMetaDataParser.parse(xmlReader, dtdInfo, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
origin: org.jboss.as/jboss-as-appclient

@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
  final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
  if (!DeploymentTypeMarker.isType(DeploymentType.APPLICATION_CLIENT, deploymentUnit)) {
    return;
  }
  final ApplicationClientMetaData appClientMD = parseAppClient(deploymentUnit, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
  final JBossClientMetaData jbossClientMD = parseJBossClient(deploymentUnit, JBossDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
  final JBossClientMetaData merged;
  if (appClientMD == null && jbossClientMD == null) {
    return;
  } else if (appClientMD == null) {
    merged = jbossClientMD;
  } else {
    merged = new JBossClientMetaData();
    merged.setEnvironmentRefsGroupMetaData(new AppClientEnvironmentRefsGroupMetaData());
    merged.merge(jbossClientMD, appClientMD);
  }
  if(merged.isMetadataComplete()) {
    MetadataCompleteMarker.setMetadataComplete(deploymentUnit, true);
  }
  deploymentUnit.putAttachment(AppClientAttachments.APPLICATION_CLIENT_META_DATA, merged);
  final DeploymentDescriptorEnvironment environment = new DeploymentDescriptorEnvironment("java:module/env/", merged.getEnvironmentRefsGroupMetaData());
  deploymentUnit.putAttachment(org.jboss.as.ee.component.Attachments.MODULE_DEPLOYMENT_DESCRIPTOR_ENVIRONMENT, environment);
  //override module name if applicable
  if(merged.getModuleName() != null && !merged.getModuleName().isEmpty()) {
    final EEModuleDescription description = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION);
    description.setModuleName(merged.getModuleName());
  }
}
origin: org.wildfly/wildfly-ee

public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
  final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
  if (!DeploymentTypeMarker.isType(DeploymentType.EAR, deploymentUnit)) {
    return;
  }
  final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT);
  final VirtualFile deploymentFile = deploymentRoot.getRoot();
  EarMetaData earMetaData = handleSpecMetadata(deploymentFile, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
  JBossAppMetaData jbossMetaData = handleJbossMetadata(deploymentFile, JBossDescriptorPropertyReplacement.propertyReplacer(deploymentUnit), deploymentUnit);
  if (earMetaData == null && jbossMetaData == null) {
    return;
  }
  // the jboss-app.xml has a distinct-name configured then attach it to the deployment unit
  if (jbossMetaData != null && jbossMetaData.getDistinctName() != null) {
    deploymentUnit.putAttachment(Attachments.DISTINCT_NAME, jbossMetaData.getDistinctName());
  }
  JBossAppMetaData merged;
  if (earMetaData != null) {
    merged = new JBossAppMetaData(earMetaData.getEarVersion());
  } else {
    merged = new JBossAppMetaData();
  }
  JBossAppMetaDataMerger.merge(merged, jbossMetaData, earMetaData);
  deploymentUnit.putAttachment(Attachments.EAR_METADATA, merged);
  if (merged.getEarEnvironmentRefsGroup() != null) {
    final DeploymentDescriptorEnvironment bindings = new DeploymentDescriptorEnvironment("java:app/env/", merged.getEarEnvironmentRefsGroup());
    deploymentUnit.putAttachment(org.jboss.as.ee.component.Attachments.MODULE_DEPLOYMENT_DESCRIPTOR_ENVIRONMENT, bindings);
  }
}
origin: org.jboss.eap/wildfly-ee

public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
  final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
  if (!DeploymentTypeMarker.isType(DeploymentType.EAR, deploymentUnit)) {
    return;
  }
  final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT);
  final VirtualFile deploymentFile = deploymentRoot.getRoot();
  EarMetaData earMetaData = handleSpecMetadata(deploymentFile, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
  JBossAppMetaData jbossMetaData = handleJbossMetadata(deploymentFile, JBossDescriptorPropertyReplacement.propertyReplacer(deploymentUnit), deploymentUnit);
  if (earMetaData == null && jbossMetaData == null) {
    return;
  }
  // the jboss-app.xml has a distinct-name configured then attach it to the deployment unit
  if (jbossMetaData != null && jbossMetaData.getDistinctName() != null) {
    deploymentUnit.putAttachment(Attachments.DISTINCT_NAME, jbossMetaData.getDistinctName());
  }
  JBossAppMetaData merged;
  if (earMetaData != null) {
    merged = new JBossAppMetaData(earMetaData.getEarVersion());
  } else {
    merged = new JBossAppMetaData();
  }
  JBossAppMetaDataMerger.merge(merged, jbossMetaData, earMetaData);
  deploymentUnit.putAttachment(Attachments.EAR_METADATA, merged);
  if (merged.getEarEnvironmentRefsGroup() != null) {
    final DeploymentDescriptorEnvironment bindings = new DeploymentDescriptorEnvironment("java:app/env/", merged.getEarEnvironmentRefsGroup());
    deploymentUnit.putAttachment(org.jboss.as.ee.component.Attachments.MODULE_DEPLOYMENT_DESCRIPTOR_ENVIRONMENT, bindings);
  }
}
origin: org.jboss.as/jboss-as-ee

public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
  final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
  if (!DeploymentTypeMarker.isType(DeploymentType.EAR, deploymentUnit)) {
    return;
  }
  final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT);
  final VirtualFile deploymentFile = deploymentRoot.getRoot();
  EarMetaData earMetaData = handleSpecMetadata(deploymentFile, SpecDescriptorPropertyReplacement.propertyReplacer(deploymentUnit));
  JBossAppMetaData jbossMetaData = handleJbossMetadata(deploymentFile, JBossDescriptorPropertyReplacement.propertyReplacer(deploymentUnit), deploymentUnit);
  if (earMetaData == null && jbossMetaData == null) {
    return;
  }
  // the jboss-app.xml has a distinct-name configured then attach it to the deployment unit
  if (jbossMetaData != null && jbossMetaData.getDistinctName() != null) {
    deploymentUnit.putAttachment(Attachments.DISTINCT_NAME, jbossMetaData.getDistinctName());
  }
  JBossAppMetaData merged;
  if (earMetaData != null) {
    merged = new JBossAppMetaData(earMetaData.getEarVersion());
  } else {
    merged = new JBossAppMetaData();
  }
  JBossAppMetaDataMerger.merge(merged, jbossMetaData, earMetaData);
  deploymentUnit.putAttachment(Attachments.EAR_METADATA, merged);
  if (merged.getEarEnvironmentRefsGroup() != null) {
    final DeploymentDescriptorEnvironment bindings = new DeploymentDescriptorEnvironment("java:app/env/", merged.getEarEnvironmentRefsGroup());
    deploymentUnit.putAttachment(org.jboss.as.ee.component.Attachments.MODULE_DEPLOYMENT_DESCRIPTOR_ENVIRONMENT, bindings);
  }
}
org.jboss.as.ee.structureSpecDescriptorPropertyReplacementpropertyReplacer

Popular methods of SpecDescriptorPropertyReplacement

    Popular in Java

    • Reading from database using SQL prepared statement
    • getSharedPreferences (Context)
    • setContentView (Activity)
    • getExternalFilesDir (Context)
    • GridBagLayout (java.awt)
      The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
    • SocketTimeoutException (java.net)
      This exception is thrown when a timeout expired on a socket read or accept operation.
    • TimeZone (java.util)
      TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
    • Semaphore (java.util.concurrent)
      A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
    • ZipFile (java.util.zip)
      This class provides random read access to a zip file. You pay more to read the zip file's central di
    • DateTimeFormat (org.joda.time.format)
      Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
    • Top 12 Jupyter Notebook extensions
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now