Package org.jboss.metadata

Examples of org.jboss.metadata.ApplicationMetaData


/*     */   {
/* 125 */     super.setContainer(container);
/* 126 */     if (container != null)
/*     */     {
/* 128 */       BeanMetaData beanMetaData = container.getBeanMetaData();
/* 129 */       ApplicationMetaData applicationMetaData = beanMetaData.getApplicationMetaData();
/* 130 */       AssemblyDescriptorMetaData assemblyDescriptor = applicationMetaData.getAssemblyDescriptor();
/* 131 */       this.securityRoles = assemblyDescriptor.getSecurityRoles();
/* 132 */       this.deploymentRoles = assemblyDescriptor.getPrincipalVersusRolesMap();
/*     */
/* 134 */       SecurityIdentityMetaData secMetaData = beanMetaData.getSecurityIdentityMetaData();
/* 135 */       if ((secMetaData != null) && (!secMetaData.getUseCallerIdentity()))
/*     */       {
/* 137 */         String roleName = secMetaData.getRunAsRoleName();
/* 138 */         String principalName = secMetaData.getRunAsPrincipalName();
/*     */
/* 141 */         if (principalName == null) {
/* 142 */           principalName = applicationMetaData.getUnauthenticatedPrincipal();
/*     */         }
/*     */
/* 145 */         Set extraRoleNames = assemblyDescriptor.getSecurityRoleNamesByPrincipal(principalName);
/* 146 */         this.runAsIdentity = new RunAsIdentity(roleName, principalName, extraRoleNames);
/*     */       }
View Full Code Here


/*      */
/*      */     }
/*      */
/* 1292 */     Iterator i = beanMetaData.getResourceReferences();
/*      */
/* 1295 */     ApplicationMetaData application = beanMetaData.getApplicationMetaData();
/*      */
/* 1297 */     while (i.hasNext())
/*      */     {
/* 1299 */       ResourceRefMetaData ref = (ResourceRefMetaData)i.next();
/*      */
/* 1301 */       String resourceName = ref.getResourceName();
/* 1302 */       String finalName = application.getResourceByName(resourceName);
/* 1303 */       String resType = ref.getType();
/*      */
/* 1306 */       if (finalName == null) {
/* 1307 */         finalName = ref.getJndiName();
/*      */       }
View Full Code Here

/* 199 */     ejbModule.setObjectName(moduleObjectName);
/*     */
/* 201 */     ServiceConstructorMetaData ctor = new ServiceConstructorMetaData();
/* 202 */     ctor.setSignature(new String[] { VFSDeploymentUnit.class.getName(), ApplicationMetaData.class.getName() });
/*     */
/* 205 */     ApplicationMetaData legacyMD = new ApplicationMetaData(deployment);
/* 206 */     ctor.setParameters(new Object[] { unit, legacyMD });
/* 207 */     ejbModule.setConstructor(ctor);
/*     */
/* 210 */     List attrs = new ArrayList();
/* 211 */     ServiceAttributeMetaData attr = new ServiceAttributeMetaData();
View Full Code Here

*/
public abstract class EJBArchiveMetaDataAdapter
{
   public EJBArchiveMetaData buildUnifiedApplicationMetaData(Deployment dep, DeploymentInfo di)
   {
      ApplicationMetaData apmd = (ApplicationMetaData)di.metaData;
      dep.addAttachment(ApplicationMetaData.class, apmd);

      EJBArchiveMetaData appMetaData = new EJBArchiveMetaData();
      buildUnifiedBeanMetaData(appMetaData, apmd);
      appMetaData.setConfigName(apmd.getConfigName());
      appMetaData.setConfigFile(apmd.getConfigFile());
      appMetaData.setWebServiceContextRoot(apmd.getWebServiceContextRoot());
      appMetaData.setSecurityDomain(apmd.getSecurityDomain());
      appMetaData.setPublishLocationAdapter(getPublishLocationAdpater(apmd));
      return appMetaData;
   }
View Full Code Here

   }

   public void addSecurityRoles(Element webApp, Deployment dep)
   {
      // Fix: http://jira.jboss.org/jira/browse/JBWS-309
      ApplicationMetaData applMetaData = dep.getAttachment(ApplicationMetaData.class);
      AssemblyDescriptorMetaData assemblyDescriptor = applMetaData.getAssemblyDescriptor();
      if (assemblyDescriptor != null)
      {
         Map securityRoles = assemblyDescriptor.getSecurityRoles();
         if (securityRoles != null)
         {
View Full Code Here

      dep.setRuntimeClassLoader(di.ucl);
      dep.setType(getDeploymentType());

      Service service = dep.getService();

      ApplicationMetaData appmd = (ApplicationMetaData)di.metaData;
      if (appmd == null)
         throw new IllegalStateException("Deployment unit does not contain application meta data");

      WebservicesMetaData wsMetaData = getWebservicesMetaData(di, null);
      if (wsMetaData == null)
         throw new IllegalStateException("Deployment unit does not contain webservices meta data");

      // Copy the attachments
      dep.addAttachment(WebservicesMetaData.class, wsMetaData);
      dep.addAttachment(ApplicationMetaData.class, appmd);

      for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
      {
         for (PortComponentMetaData pcmd : wsd.getPortComponents())
         {
            String ejbLink = pcmd.getEjbLink();
            if (ejbLink == null)
               throw new IllegalStateException("ejb-link cannot be null");

            BeanMetaData beanMetaData = appmd.getBeanByEjbName(ejbLink);
            if (beanMetaData == null)
               throw new IllegalStateException("Cannot obtain bean meta data for: " + ejbLink);

            String ejbClass = beanMetaData.getEjbClass();
           
View Full Code Here

TOP

Related Classes of org.jboss.metadata.ApplicationMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.