Examples of MethodsMetaData


Examples of org.jboss.metadata.ejb.spec.MethodsMetaData

/* 64 */       method = (Method)type;
/*    */     }
/* 66 */     String ejbName = (String)EjbNameThreadLocal.ejbName.get();
/* 67 */     MethodMetaData mmd = ProcessorUtils.createMethod(ejbName, method);
/* 68 */     MethodPermissionMetaData perm = new MethodPermissionMetaData();
/* 69 */     MethodsMetaData methods = perm.getMethods();
/* 70 */     if (methods == null)
/*    */     {
/* 72 */       methods = new MethodsMetaData();
/* 73 */       perm.setMethods(methods);
/*    */     }
/* 75 */     perm.setUnchecked(new EmptyMetaData());
/* 76 */     Descriptions descriptions = ProcessorUtils.getDescription("@PermitAll for: " + type);
/* 77 */     mmd.setDescriptions(descriptions);
/* 78 */     methods.add(mmd);
/* 79 */     metaData.add(perm);
/*    */   }
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.MethodsMetaData

/*    */   }
/*    */
/*    */   protected abstract ContainerTransactionMetaData createContainerTransaction(String paramString, TransactionAttribute paramTransactionAttribute, E paramE);
/*    */
/*    */   protected MethodsMetaData createMethods(String ejbName, Method method) {
/* 57 */     MethodsMetaData methods = new MethodsMetaData();
/* 58 */     methods.add(ProcessorUtils.createMethod(ejbName, method));
/* 59 */     return methods;
/*    */   }
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.MethodsMetaData

/* 65 */       method = (Method)type;
/*    */     }
/* 67 */     String ejbName = (String)EjbNameThreadLocal.ejbName.get();
/* 68 */     MethodMetaData mmd = ProcessorUtils.createMethod(ejbName, method);
/* 69 */     MethodPermissionMetaData perm = new MethodPermissionMetaData();
/* 70 */     MethodsMetaData methods = perm.getMethods();
/* 71 */     if (methods == null)
/*    */     {
/* 73 */       methods = new MethodsMetaData();
/* 74 */       perm.setMethods(methods);
/*    */     }
/* 76 */     HashSet roles = new HashSet();
/* 77 */     for (String role : allowed.value())
/* 78 */       roles.add(role);
/* 79 */     perm.setRoles(roles);
/* 80 */     Descriptions descriptions = ProcessorUtils.getDescription("@RolesAllowed for: " + type);
/* 81 */     mmd.setDescriptions(descriptions);
/* 82 */     methods.add(mmd);
/* 83 */     metaData.add(perm);
/*    */   }
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.MethodsMetaData

/*    */   {
/* 58 */     DenyAll deny = (DenyAll)this.finder.getAnnotation(method, DenyAll.class);
/* 59 */     if (deny == null) {
/* 60 */       return;
/*    */     }
/* 62 */     MethodsMetaData methods = metaData.getMethods();
/* 63 */     if (methods == null)
/*    */     {
/* 65 */       methods = new MethodsMetaData();
/* 66 */       metaData.setMethods(methods);
/*    */     }
/* 68 */     String ejbName = (String)EjbNameThreadLocal.ejbName.get();
/* 69 */     if (ejbName == null)
/* 70 */       ejbName = "*";
/* 71 */     MethodMetaData mmd = ProcessorUtils.createMethod(ejbName, method);
/* 72 */     Descriptions descriptions = ProcessorUtils.getDescription("@DenyAll for: " + method);
/* 73 */     mmd.setDescriptions(descriptions);
/* 74 */     log.trace("add " + mmd);
/* 75 */     methods.add(mmd);
/*    */   }
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.MethodsMetaData

/*  61 */     MethodPermissionsMetaData perms = bean.getMethodPermissions();
/*     */     Iterator i$;
/*  62 */     if (perms != null)
/*  63 */       for (i$ = perms.iterator(); i$.hasNext(); ) { perm = (MethodPermissionMetaData)i$.next();
/*     */
/*  65 */         MethodsMetaData methods = perm.getMethods();
/*  66 */         if (methods != null)
/*  67 */           for (org.jboss.metadata.ejb.spec.MethodMetaData mmd : methods)
/*     */           {
/*  69 */             String[] params = new String[0];
/*  70 */             if (mmd.getMethodParams() != null)
/*  71 */               params = (String[])mmd.getMethodParams().toArray(params);
/*     */             else
/*  73 */               params = null;
/*  74 */             String methodName = mmd.getMethodName();
/*  75 */             if ((methodName != null) && (methodName.equals("*")))
/*  76 */               methodName = null;
/*  77 */             MethodInterfaceType miType = mmd.getMethodIntf();
/*  78 */             String iface = miType != null ? miType.name() : null;
/*  79 */             EJBMethodPermission p = new EJBMethodPermission(mmd.getEjbName(), methodName, iface, params);
/*     */
/*  81 */             if (perm.getUnchecked() != null)
/*     */             {
/*  83 */               pc.addToUncheckedPolicy(p);
/*     */             }
/*     */             else
/*     */             {
/*  87 */               Set roles = perm.getRoles();
/*  88 */               Iterator riter = roles.iterator();
/*  89 */               while (riter.hasNext())
/*     */               {
/*  91 */                 String role = (String)riter.next();
/*  92 */                 pc.addToRole(role, p);
/*     */               }
/*     */             }
/*     */           }
/*     */       }
/*     */     MethodPermissionMetaData perm;
/*  99 */     ExcludeListMetaData excluded = bean.getExcludeList();
/* 100 */     if (excluded != null)
/*     */     {
/* 102 */       MethodsMetaData methods = excluded.getMethods();
/* 103 */       if (methods != null) {
/* 104 */         for (org.jboss.metadata.ejb.spec.MethodMetaData mmd : methods)
/*     */         {
/* 106 */           String[] params = new String[0];
/* 107 */           if (mmd.getMethodParams() != null)
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.MethodsMetaData

/*    */   private void bump()
/*    */   {
/* 91 */     while (this.delegate.hasNext())
/*    */     {
/* 93 */       this.permission = ((MethodPermissionMetaData)this.delegate.next());
/* 94 */       MethodsMetaData theMethods = this.permission.getMethods();
/* 95 */       if ((theMethods != null) && (!theMethods.isEmpty()))
/*    */       {
/* 97 */         this.methods = theMethods.iterator();
/* 98 */         break;
/*    */       }
/*    */     }
/*    */   }
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.MethodsMetaData

/*    */   private void bump()
/*    */   {
/* 91 */     while (this.delegate.hasNext())
/*    */     {
/* 93 */       this.transaction = ((ContainerTransactionMetaData)this.delegate.next());
/* 94 */       MethodsMetaData theMethods = this.transaction.getMethods();
/* 95 */       if ((theMethods != null) && (!theMethods.isEmpty()))
/*    */       {
/* 97 */         this.methods = theMethods.iterator();
/* 98 */         break;
/*    */       }
/*    */     }
/*    */   }
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.MethodsMetaData

/*    */   public ExcludedMethodMetaDataIterator(ExcludeListMetaData excluded)
/*    */   {
/* 52 */     if (excluded == null)
/* 53 */       return;
/* 54 */     this.excludeList = excluded;
/* 55 */     MethodsMetaData methods = excluded.getMethods();
/* 56 */     if (methods == null)
/* 57 */       return;
/* 58 */     this.delegate = methods.iterator();
/*    */   }
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.MethodsMetaData

        }
        final ExcludeListMetaData excludeList = assemblyDescriptor.getExcludeListByEjbName(ejbName);
        if (excludeList == null) {
            return;
        }
        final MethodsMetaData methods = excludeList.getMethods();
        if (methods == null || methods.isEmpty()) {
            return;
        }
        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
        final Module module = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE);
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.MethodsMetaData

            throw new DeploymentUnitProcessingException("Could not load EJB class " + beanMetaData.getEjbClass());
        }
        final ClassReflectionIndex classReflectionIndex = deploymentReflectionIndex.getClassIndex(ejbClass);

        for (final MethodPermissionMetaData methodPermission : methodPermissions) {
            final MethodsMetaData methods = methodPermission.getMethods();
            if (methods == null || methods.isEmpty()) {
                continue;
            }
            // if "unchecked" then it means all roles are allowed access
            if (methodPermission.isNotChecked()) {
                continue;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.