Class ASHelper

java.lang.Object
org.jboss.as.webservices.util.ASHelper

public final class ASHelper extends Object
JBoss AS integration helper class.
Author:
Richard Opalka, Alessio Soldano
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<org.jboss.jandex.AnnotationInstance>
    getAnnotations(org.jboss.as.server.deployment.DeploymentUnit unit, org.jboss.jandex.DotName annotation)
     
    static String
    getContextRoot(org.jboss.wsf.spi.deployment.Deployment dep, org.jboss.metadata.web.jboss.JBossWebMetaData jbossWebMD)
    Returns context root associated with webservice deployment.
    static String
    getEndpointClassName(org.jboss.metadata.web.spec.ServletMetaData servletMD)
    Returns endpoint class name.
    static String
    getEndpointName(org.jboss.metadata.web.spec.ServletMetaData servletMD)
    Returns endpoint name.
    getJaxwsDeployment(org.jboss.as.server.deployment.DeploymentUnit unit)
     
    getJaxwsEjbs(org.jboss.as.server.deployment.DeploymentUnit unit)
    Gets list of Jakarta XML Web Services Jakarta Enterprise Beans meta data.
    getJaxwsPojos(org.jboss.as.server.deployment.DeploymentUnit unit)
    Gets list of JAXWS POJOs meta data.
    static org.jboss.metadata.web.jboss.JBossWebMetaData
    getJBossWebMetaData(org.jboss.as.server.deployment.DeploymentUnit unit)
    Gets the JBossWebMetaData from the WarMetaData attached to the provided deployment unit, if any.
    static org.jboss.wsf.spi.metadata.webservices.JBossPortComponentMetaData
    getJBossWebserviceMetaDataPortComponent(org.jboss.as.server.deployment.DeploymentUnit unit, String name)
    Return a named port-component from the jboss-webservices.xml
    static <T> T
    getMSCService(org.jboss.msc.service.ServiceName serviceName, Class<T> clazz)
     
    static <A> A
    getOptionalAttachment(org.jboss.as.server.deployment.DeploymentUnit unit, org.jboss.as.server.deployment.AttachmentKey<A> key)
    Returns optional attachment value from deployment unit or null if not bound.
    static <A> A
    getRequiredAttachment(org.jboss.as.server.deployment.DeploymentUnit unit, org.jboss.as.server.deployment.AttachmentKey<A> key)
    Returns required attachment value from deployment unit.
    static List<org.jboss.as.server.deployment.module.ResourceRoot>
    getResourceRoots(org.jboss.as.server.deployment.DeploymentUnit unit)
     
    static org.jboss.metadata.web.spec.ServletMetaData
    getServletForName(org.jboss.metadata.web.jboss.JBossWebMetaData jbossWebMD, String servletName)
    Returns servlet meta data for requested servlet name.
    Returns an EJBEndpoint based upon fully qualified classname.
    getWSRefRegistry(org.jboss.as.server.deployment.DeploymentUnit unit)
     
    static boolean
    hasClassesFromPackage(org.jboss.jandex.Index index, String pck)
     
    static boolean
    isJaxwsEndpoint(EEModuleClassDescription classDescription, org.jboss.as.server.deployment.annotation.CompositeIndex index)
     
    static boolean
    isJaxwsEndpoint(org.jboss.jandex.ClassInfo clazz, org.jboss.as.server.deployment.annotation.CompositeIndex index)
     
    static boolean
    isJaxwsEndpoint(org.jboss.jandex.ClassInfo clazz, org.jboss.as.server.deployment.annotation.CompositeIndex index, boolean log)
     
    static boolean
    isJaxwsEndpointInterface(org.jboss.jandex.ClassInfo clazz)
     
    static boolean
    isJaxwsService(org.jboss.jandex.ClassInfo current, org.jboss.as.server.deployment.annotation.CompositeIndex index)
     
    static boolean
    isJaxwsService(org.jboss.jandex.ClassInfo current, org.jboss.jandex.Index index)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getJaxwsEjbs

      public static List<EJBEndpoint> getJaxwsEjbs(org.jboss.as.server.deployment.DeploymentUnit unit)
      Gets list of Jakarta XML Web Services Jakarta Enterprise Beans meta data.
      Parameters:
      unit - deployment unit
      Returns:
      list of Jakarta XML Web Services Jakarta Enterprise Beans meta data
    • getJaxwsPojos

      public static List<POJOEndpoint> getJaxwsPojos(org.jboss.as.server.deployment.DeploymentUnit unit)
      Gets list of JAXWS POJOs meta data.
      Parameters:
      unit - deployment unit
      Returns:
      list of JAXWS POJOs meta data
    • getEndpointName

      public static String getEndpointName(org.jboss.metadata.web.spec.ServletMetaData servletMD)
      Returns endpoint name.
      Parameters:
      servletMD - servlet meta data
      Returns:
      endpoint name
    • getEndpointClassName

      public static String getEndpointClassName(org.jboss.metadata.web.spec.ServletMetaData servletMD)
      Returns endpoint class name.
      Parameters:
      servletMD - servlet meta data
      Returns:
      endpoint class name
    • getServletForName

      public static org.jboss.metadata.web.spec.ServletMetaData getServletForName(org.jboss.metadata.web.jboss.JBossWebMetaData jbossWebMD, String servletName)
      Returns servlet meta data for requested servlet name.
      Parameters:
      jbossWebMD - jboss web meta data
      servletName - servlet name
      Returns:
      servlet meta data
    • getRequiredAttachment

      public static <A> A getRequiredAttachment(org.jboss.as.server.deployment.DeploymentUnit unit, org.jboss.as.server.deployment.AttachmentKey<A> key)
      Returns required attachment value from deployment unit.
      Type Parameters:
      A - expected value
      Parameters:
      unit - deployment unit
      key - attachment key
      Returns:
      required attachment
      Throws:
      IllegalStateException - if attachment value is null
    • getOptionalAttachment

      public static <A> A getOptionalAttachment(org.jboss.as.server.deployment.DeploymentUnit unit, org.jboss.as.server.deployment.AttachmentKey<A> key)
      Returns optional attachment value from deployment unit or null if not bound.
      Type Parameters:
      A - expected value
      Parameters:
      unit - deployment unit
      key - attachment key
      Returns:
      optional attachment value or null
    • isJaxwsService

      public static boolean isJaxwsService(org.jboss.jandex.ClassInfo current, org.jboss.as.server.deployment.annotation.CompositeIndex index)
    • isJaxwsService

      public static boolean isJaxwsService(org.jboss.jandex.ClassInfo current, org.jboss.jandex.Index index)
    • isJaxwsEndpointInterface

      public static boolean isJaxwsEndpointInterface(org.jboss.jandex.ClassInfo clazz)
    • hasClassesFromPackage

      public static boolean hasClassesFromPackage(org.jboss.jandex.Index index, String pck)
    • isJaxwsEndpoint

      public static boolean isJaxwsEndpoint(org.jboss.jandex.ClassInfo clazz, org.jboss.as.server.deployment.annotation.CompositeIndex index)
    • isJaxwsEndpoint

      public static boolean isJaxwsEndpoint(org.jboss.jandex.ClassInfo clazz, org.jboss.as.server.deployment.annotation.CompositeIndex index, boolean log)
    • isJaxwsEndpoint

      public static boolean isJaxwsEndpoint(EEModuleClassDescription classDescription, org.jboss.as.server.deployment.annotation.CompositeIndex index)
    • getJBossWebMetaData

      public static org.jboss.metadata.web.jboss.JBossWebMetaData getJBossWebMetaData(org.jboss.as.server.deployment.DeploymentUnit unit)
      Gets the JBossWebMetaData from the WarMetaData attached to the provided deployment unit, if any.
      Parameters:
      unit -
      Returns:
      the JBossWebMetaData or null if either that or the parent WarMetaData are not found.
    • getAnnotations

      public static List<org.jboss.jandex.AnnotationInstance> getAnnotations(org.jboss.as.server.deployment.DeploymentUnit unit, org.jboss.jandex.DotName annotation)
    • getJaxwsDeployment

      public static JAXWSDeployment getJaxwsDeployment(org.jboss.as.server.deployment.DeploymentUnit unit)
    • getJBossWebserviceMetaDataPortComponent

      public static org.jboss.wsf.spi.metadata.webservices.JBossPortComponentMetaData getJBossWebserviceMetaDataPortComponent(org.jboss.as.server.deployment.DeploymentUnit unit, String name)
      Return a named port-component from the jboss-webservices.xml
      Parameters:
      unit -
      name -
      Returns:
    • getWebserviceMetadataEJBEndpoint

      public static EJBEndpoint getWebserviceMetadataEJBEndpoint(JAXWSDeployment jaxwsDeployment, String className)
      Returns an EJBEndpoint based upon fully qualified classname.
      Parameters:
      jaxwsDeployment -
      className -
      Returns:
    • getContextRoot

      public static String getContextRoot(org.jboss.wsf.spi.deployment.Deployment dep, org.jboss.metadata.web.jboss.JBossWebMetaData jbossWebMD)
      Returns context root associated with webservice deployment. If there's application.xml descriptor provided defining nested web module, then context root defined there will be returned. Otherwise context root defined in jboss-web.xml will be returned.
      Parameters:
      dep - webservice deployment
      jbossWebMD - jboss web meta data
      Returns:
      context root
    • getMSCService

      public static <T> T getMSCService(org.jboss.msc.service.ServiceName serviceName, Class<T> clazz)
    • getWSRefRegistry

      public static WSRefRegistry getWSRefRegistry(org.jboss.as.server.deployment.DeploymentUnit unit)
    • getResourceRoots

      public static List<org.jboss.as.server.deployment.module.ResourceRoot> getResourceRoots(org.jboss.as.server.deployment.DeploymentUnit unit)