gpt4 book ai didi

org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration.getAnnotation()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 14:39:05 25 4
gpt4 key购买 nike

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

WebServiceDeclaration.getAnnotation介绍

[英]Get a unified meta data view represented by an annotation.
[中]获取由注释表示的统一元数据视图。

代码示例

代码示例来源:origin: org.jboss.ws/jbossws-jboss600M2

/**
* Returns true if EJB container is webservice endpoint.
* 
* @param ejbContainerAdapter EJB container adapter
* @return true if EJB container is webservice endpoint, false otherwise
*/
public static boolean isWebServiceBean(final WebServiceDeclaration ejbContainerAdapter)
{
 final boolean isWebService = ejbContainerAdapter.getAnnotation(WebService.class) != null;
 final boolean isWebServiceProvider = ejbContainerAdapter.getAnnotation(WebServiceProvider.class) != null;
 return isWebService || isWebServiceProvider;
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss510x

private boolean isWebServiceBean(WebServiceDeclaration container)
  {
   boolean isWebServiceBean = false;
   boolean isWebService = container.getAnnotation(WebService.class) != null;
   boolean isWebServiceProvider = container.getAnnotation(WebServiceProvider.class) != null;
   isWebServiceBean = isWebService || isWebServiceProvider;

   return isWebServiceBean;
  }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss501CR1

private boolean isWebServiceBean(WebServiceDeclaration container)
  {
   boolean isWebServiceBean = false;
   boolean isWebService = container.getAnnotation(WebService.class) != null;
   boolean isWebServiceProvider = container.getAnnotation(WebServiceProvider.class) != null;
   isWebServiceBean = isWebService || isWebServiceProvider;

   return isWebServiceBean;
  }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss600x

private boolean isWebServiceBean(WebServiceDeclaration container)
  {
   boolean isWebServiceBean = false;
   boolean isWebService = container.getAnnotation(WebService.class) != null;
   boolean isWebServiceProvider = container.getAnnotation(WebServiceProvider.class) != null;
   isWebServiceBean = isWebService || isWebServiceProvider;

   return isWebServiceBean;
  }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss500x

private boolean isWebServiceBean(WebServiceDeclaration container)
  {
   boolean isWebServiceBean = false;
   boolean isWebService = container.getAnnotation(WebService.class) != null;
   boolean isWebServiceProvider = container.getAnnotation(WebServiceProvider.class) != null;
   isWebServiceBean = isWebService || isWebServiceProvider;

   return isWebServiceBean;
  }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss501

/**
* Returns true if EJB container is webservice endpoint.
* 
* @param ejbContainerAdapter EJB container adapter
* @return true if EJB container is webservice endpoint, false otherwise
*/
public static boolean isWebServiceBean(final WebServiceDeclaration ejbContainerAdapter)
{
 final boolean isWebService = ejbContainerAdapter.getAnnotation(WebService.class) != null;
 final boolean isWebServiceProvider = ejbContainerAdapter.getAnnotation(WebServiceProvider.class) != null;
 return isWebService || isWebServiceProvider;
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss510

/**
* Returns true if EJB container is webservice endpoint.
* 
* @param ejbContainerAdapter EJB container adapter
* @return true if EJB container is webservice endpoint, false otherwise
*/
public static boolean isWebServiceBean(final WebServiceDeclaration ejbContainerAdapter)
{
 final boolean isWebService = ejbContainerAdapter.getAnnotation(WebService.class) != null;
 final boolean isWebServiceProvider = ejbContainerAdapter.getAnnotation(WebServiceProvider.class) != null;
 return isWebService || isWebServiceProvider;
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss600M2

/**
* @see org.jboss.webservices.integration.tomcat.AbstractSecurityMetaDataAccessorEJB#getSecurityDomain(Deployment)
*
* @param dep webservice deployment
* @return security domain associated with EJB 3 deployment
*/
public String getSecurityDomain(final Deployment dep)
{
 final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
 String securityDomain = null;
 final Iterator<WebServiceDeclaration> ejbContainers = wsDeployment.getServiceEndpoints().iterator();
 while (ejbContainers.hasNext())
 {
   final WebServiceDeclaration ejbContainer = ejbContainers.next();
   final SecurityDomain nextSecurityDomain = ejbContainer.getAnnotation(SecurityDomain.class);
   securityDomain = this.getDomain(securityDomain, nextSecurityDomain);
 }
 return super.appendJaasPrefix(securityDomain);
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss501

/**
* @see org.jboss.webservices.integration.tomcat.AbstractSecurityMetaDataAccessorEJB#getSecurityDomain(Deployment)
*
* @param dep webservice deployment
* @return security domain associated with EJB 3 deployment
*/
public String getSecurityDomain(final Deployment dep)
{
 final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
 String securityDomain = null;
 final Iterator<WebServiceDeclaration> ejbContainers = wsDeployment.getServiceEndpoints().iterator();
 while (ejbContainers.hasNext())
 {
   final WebServiceDeclaration ejbContainer = ejbContainers.next();
   final SecurityDomain nextSecurityDomain = ejbContainer.getAnnotation(SecurityDomain.class);
   securityDomain = this.getDomain(securityDomain, nextSecurityDomain);
 }
 return super.appendJaasPrefix(securityDomain);
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss510x

public void addSecurityDomain(JBossWebMetaData jbossWeb, Deployment dep)
{
 String securityDomain = null;
 WebServiceDeployment webServiceDeployment = dep.getAttachment(WebServiceDeployment.class);
 if (webServiceDeployment != null)
 {
   Iterator<WebServiceDeclaration> it = webServiceDeployment.getServiceEndpoints().iterator();
   while (it.hasNext())
   {
    WebServiceDeclaration container = it.next();
    SecurityDomain anSecurityDomain = container.getAnnotation(SecurityDomain.class);
    if (anSecurityDomain != null)
    {
      if (securityDomain != null && !securityDomain.equals(anSecurityDomain.value()))
       throw new IllegalStateException("Multiple security domains not supported");
      securityDomain = anSecurityDomain.value();
    }
   }
 }
 if (securityDomain != null)
 {
   if (securityDomain.startsWith("java:/jaas/") == false)
    securityDomain = "java:/jaas/" + securityDomain;
   jbossWeb.setSecurityDomain(securityDomain);
 }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss510

/**
* @see org.jboss.webservices.integration.tomcat.AbstractSecurityMetaDataAccessorEJB#getSecurityDomain(Deployment)
*
* @param dep webservice deployment
* @return security domain associated with EJB 3 deployment
*/
public String getSecurityDomain(final Deployment dep)
{
 final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
 String securityDomain = null;
 final Iterator<WebServiceDeclaration> ejbContainers = wsDeployment.getServiceEndpoints().iterator();
 while (ejbContainers.hasNext())
 {
   final WebServiceDeclaration ejbContainer = ejbContainers.next();
   final SecurityDomain nextSecurityDomain = ejbContainer.getAnnotation(SecurityDomain.class);
   securityDomain = this.getDomain(securityDomain, nextSecurityDomain);
 }
 return super.appendJaasPrefix(securityDomain);
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss500x

public void addSecurityDomain(JBossWebMetaData jbossWeb, Deployment dep)
{
 String securityDomain = null;
 WebServiceDeployment webServiceDeployment = dep.getAttachment(WebServiceDeployment.class);
 if (webServiceDeployment != null)
 {
   Iterator<WebServiceDeclaration> it = webServiceDeployment.getServiceEndpoints().iterator();
   while (it.hasNext())
   {
    WebServiceDeclaration container = it.next();
    SecurityDomain anSecurityDomain = container.getAnnotation(SecurityDomain.class);
    if (anSecurityDomain != null)
    {
      if (securityDomain != null && !securityDomain.equals(anSecurityDomain.value()))
       throw new IllegalStateException("Multiple security domains not supported");
      securityDomain = anSecurityDomain.value();
    }
   }
 }
 if (securityDomain != null)
 {
   if (securityDomain.startsWith("java:/jaas/") == false)
    securityDomain = "java:/jaas/" + securityDomain;
   jbossWeb.setSecurityDomain(securityDomain);
 }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss500x

public void addSecurityRoles(JBossWebMetaData webApp, Deployment dep)
  {
   WebServiceDeployment webServiceDeployment = dep.getAttachment(WebServiceDeployment.class);
   if (webServiceDeployment != null)
   {
     Iterator<WebServiceDeclaration> it = webServiceDeployment.getServiceEndpoints().iterator();
     while (it.hasNext())
     {
      WebServiceDeclaration container = it.next();
      RolesAllowed anRolesAllowed = container.getAnnotation(RolesAllowed.class);
      if (anRolesAllowed != null)
      {
        SecurityRolesMetaData securityRoles = webApp.getSecurityRoles();
        for (String roleName : anRolesAllowed.value())
        {
         SecurityRoleMetaData role = new SecurityRoleMetaData();
         role.setRoleName(roleName);
         securityRoles.add(role);
        }
      }
     }
   }
  }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss600x

public void addSecurityRoles(JBossWebMetaData webApp, Deployment dep)
  {
   WebServiceDeployment webServiceDeployment = dep.getAttachment(WebServiceDeployment.class);
   if (webServiceDeployment != null)
   {
     Iterator<WebServiceDeclaration> it = webServiceDeployment.getServiceEndpoints().iterator();
     while (it.hasNext())
     {
      WebServiceDeclaration container = it.next();
      RolesAllowed anRolesAllowed = container.getAnnotation(RolesAllowed.class);
      if (anRolesAllowed != null)
      {
        SecurityRolesMetaData securityRoles = webApp.getSecurityRoles();
        for (String roleName : anRolesAllowed.value())
        {
         SecurityRoleMetaData role = new SecurityRoleMetaData();
         role.setRoleName(roleName);
         securityRoles.add(role);
        }
      }
     }
   }
  }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss510x

public void addSecurityRoles(JBossWebMetaData webApp, Deployment dep)
  {
   WebServiceDeployment webServiceDeployment = dep.getAttachment(WebServiceDeployment.class);
   if (webServiceDeployment != null)
   {
     Iterator<WebServiceDeclaration> it = webServiceDeployment.getServiceEndpoints().iterator();
     while (it.hasNext())
     {
      WebServiceDeclaration container = it.next();
      RolesAllowed anRolesAllowed = container.getAnnotation(RolesAllowed.class);
      if (anRolesAllowed != null)
      {
        SecurityRolesMetaData securityRoles = webApp.getSecurityRoles();
        for (String roleName : anRolesAllowed.value())
        {
         SecurityRoleMetaData role = new SecurityRoleMetaData();
         role.setRoleName(roleName);
         securityRoles.add(role);
        }
      }
     }
   }
  }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss501CR1

public void addSecurityRoles(JBossWebMetaData webApp, Deployment dep)
  {
   WebServiceDeployment webServiceDeployment = dep.getAttachment(WebServiceDeployment.class);
   if (webServiceDeployment != null)
   {
     Iterator<WebServiceDeclaration> it = webServiceDeployment.getServiceEndpoints().iterator();
     while (it.hasNext())
     {
      WebServiceDeclaration container = it.next();
      RolesAllowed anRolesAllowed = container.getAnnotation(RolesAllowed.class);
      if (anRolesAllowed != null)
      {
        SecurityRolesMetaData securityRoles = webApp.getSecurityRoles();
        for (String roleName : anRolesAllowed.value())
        {
         SecurityRoleMetaData role = new SecurityRoleMetaData();
         role.setRoleName(roleName);
         securityRoles.add(role);
        }
      }
     }
   }
  }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss510

/**
* @see org.jboss.webservices.integration.tomcat.AbstractSecurityMetaDataAccessorEJB#getSecurityRoles(Deployment)
*
* @param dep webservice deployment
* @return security roles associated with EJB 21 deployment
*/
public SecurityRolesMetaData getSecurityRoles(final Deployment dep)
{
 final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
 final SecurityRolesMetaData securityRolesMD = new SecurityRolesMetaData();
 final Iterator<WebServiceDeclaration> ejbContainers = wsDeployment.getServiceEndpoints().iterator();
 while (ejbContainers.hasNext())
 {
   final WebServiceDeclaration ejbContainer = ejbContainers.next();
   final RolesAllowed allowedRoles = ejbContainer.getAnnotation(RolesAllowed.class);
   final boolean hasAllowedRoles = allowedRoles != null;
   if (hasAllowedRoles)
   {
    for (final String roleName : allowedRoles.value())
    {
      final SecurityRoleMetaData securityRoleMD = new SecurityRoleMetaData();
      securityRoleMD.setRoleName(roleName);
      securityRolesMD.add(securityRoleMD);
    }
   }
 }
 return securityRolesMD;
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss501

/**
* Creates new JBoss agnostic EJB bean meta data model.
*
* @param jbossEjbMD jboss EJB meta data
* @return webservices EJB meta data
*/
private EJBMetaData newEjbMetaData(final WebServiceDeclaration jbossEjbMD)
{
 final MessageDriven mdbAnnotation = jbossEjbMD.getAnnotation(MessageDriven.class);
 if (mdbAnnotation == null)
 {
   this.log.debug("Creating JBoss agnostic EJB3 meta data for session bean: "
      + jbossEjbMD.getComponentClassName());
   return new SLSBMetaData();
 }
 else
 {
   this.log.debug("Creating JBoss agnostic EJB3 meta data for message driven bean: "
      + jbossEjbMD.getComponentClassName());
   final MDBMetaData mdbMD = new MDBMetaData();
   final String destinationName = this.getActivationProperty("destination", mdbAnnotation.activationConfig());
   mdbMD.setDestinationJndiName(destinationName);
   return mdbMD;
 }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss510

/**
* Creates new JBoss agnostic EJB bean meta data model.
*
* @param jbossEjbMD jboss EJB meta data
* @return webservices EJB meta data
*/
private EJBMetaData newEjbMetaData(final WebServiceDeclaration jbossEjbMD)
{
 final MessageDriven mdbAnnotation = jbossEjbMD.getAnnotation(MessageDriven.class);
 if (mdbAnnotation == null)
 {
   this.log.debug("Creating JBoss agnostic EJB3 meta data for session bean: "
      + jbossEjbMD.getComponentClassName());
   return new SLSBMetaData();
 }
 else
 {
   this.log.debug("Creating JBoss agnostic EJB3 meta data for message driven bean: "
      + jbossEjbMD.getComponentClassName());
   final MDBMetaData mdbMD = new MDBMetaData();
   final String destinationName = this.getActivationProperty("destination", mdbAnnotation.activationConfig());
   mdbMD.setDestinationJndiName(destinationName);
   return mdbMD;
 }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss600M2

/**
* Creates new JBoss agnostic EJB bean meta data model.
*
* @param jbossEjbMD jboss EJB meta data
* @return webservices EJB meta data
*/
private EJBMetaData newEjbMetaData(final WebServiceDeclaration jbossEjbMD)
{
 final MessageDriven mdbAnnotation = jbossEjbMD.getAnnotation(MessageDriven.class);
 if (mdbAnnotation == null)
 {
   this.log.debug("Creating JBoss agnostic EJB3 meta data for session bean: "
      + jbossEjbMD.getComponentClassName());
   return new SLSBMetaData();
 }
 else
 {
   this.log.debug("Creating JBoss agnostic EJB3 meta data for message driven bean: "
      + jbossEjbMD.getComponentClassName());
   final MDBMetaData mdbMD = new MDBMetaData();
   final String destinationName = this.getActivationProperty("destination", mdbAnnotation.activationConfig());
   mdbMD.setDestinationJndiName(destinationName);
   return mdbMD;
 }
}

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