Examples of MethodInterfaceType


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

        }

    }

    private MethodIntf getMethodIntf(final MethodMetaData method) {
        final MethodInterfaceType methodInterfaceType = method.getMethodIntf();
        if (methodInterfaceType == null) {
            return null;
        }
        switch (methodInterfaceType) {
            case Local:
View Full Code Here

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

            }
        }
    }

    private MethodIntf getMethodIntf(final MethodMetaData method) {
        final MethodInterfaceType methodInterfaceType = method.getMethodIntf();
        if (methodInterfaceType == null) {
            return null;
        }
        switch (methodInterfaceType) {
            case Local:
View Full Code Here

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

/*     */             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)
/* 108 */             params = (String[])mmd.getMethodParams().toArray(params);
/* 109 */           String methodName = mmd.getMethodName();
/* 110 */           if ((methodName != null) && (methodName.equals("*")))
/* 111 */             methodName = null;
/* 112 */           MethodInterfaceType miType = mmd.getMethodIntf();
/* 113 */           String iface = miType != null ? miType.name() : null;
/* 114 */           EJBMethodPermission p = new EJBMethodPermission(mmd.getEjbName(), methodName, iface, params);
/*     */
/* 116 */           pc.addToExcludedPolicy(p);
/*     */         }
/*     */       }
View Full Code Here

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

            }
        }
    }

    private MethodIntf getMethodIntf(final MethodMetaData method) {
        final MethodInterfaceType methodInterfaceType = method.getMethodIntf();
        if (methodInterfaceType == null) {
            return null;
        }
        switch (methodInterfaceType) {
            case Local:
View Full Code Here

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

        }

    }

    private MethodIntf getMethodIntf(final MethodMetaData method) {
        final MethodInterfaceType methodInterfaceType = method.getMethodIntf();
        if (methodInterfaceType == null) {
            return null;
        }
        switch (methodInterfaceType) {
            case Local:
View Full Code Here

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

                viewClass = classIndex.classIndex(viewClassName);
            } catch (ClassNotFoundException e) {
                throw EjbMessages.MESSAGES.failToLoadEjbViewClass(e);
            }
            MethodIntf methodIntf = ((EJBViewDescription) view).getMethodIntf();
            MethodInterfaceType type = getMethodInterfaceType(methodIntf);
            EJBMethodSecurityAttribute classLevel = perms.getClassLevelAttribute(ejbClassName);
            if (classLevel != null && !classLevel.isDenyAll()) {
                denyOnAllViews = false;
            } else {
                EJBMethodPermission p = new EJBMethodPermission(ejbName, null, type.name(), null);
                permissions.add(p);
            }
            if (classLevel != null && !classLevel.isPermitAll()) {
                permitOnAllViews = false;
            } else {
                EJBMethodPermission p = new EJBMethodPermission(ejbName, null, type.name(), null);
                uncheckedPermissions.add(p);
            }
            if (classLevel != null) {
                for (String role : classLevel.getRolesAllowed()) {
                    config.addRole(role, new EJBMethodPermission(ejbName, null, null, null));
                }
            }

            for (Method method : viewClass.getClassMethods()) {
                final MethodIdentifier identifier = MethodIdentifier.getIdentifierForMethod(method);
                EJBMethodSecurityAttribute methodLevel = component.getMethodPermissions().getAttribute(methodIntf, method.getDeclaringClass().getName(), method.getName(), identifier.getParameterTypes());
                // check method level
                if (methodLevel == null) {
                    continue;
                }
                EJBMethodPermission p = new EJBMethodPermission(ejbName, identifier.getName(), type.name(), identifier.getParameterTypes());

                if (methodLevel.isDenyAll()) {
                    config.addDeny(p);
                }
                if (methodLevel.isPermitAll()) {
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.