Package org.jboss.as.ejb3

Examples of org.jboss.as.ejb3.EJBMethodIdentifier


    private Set<String> getRolesAllowed(final ComponentConfiguration componentConfiguration, final String viewClassName, final Method viewMethod) {
        final EJBComponentDescription ejbComponentDescription = (EJBComponentDescription) componentConfiguration.getComponentDescription();
        // find the component method corresponding to this view method
        final Method componentMethod = this.findComponentMethod(componentConfiguration, viewMethod);
        final EJBMethodIdentifier ejbMethodIdentifier = EJBMethodIdentifier.fromMethod(componentMethod);
        final Set<String> rolesAllowed = ejbComponentDescription.getRolesAllowed(viewClassName, ejbMethodIdentifier);
        final boolean methodMarkedForDenyAll = this.isMethodMarkedForDenyAll(ejbComponentDescription, viewClassName, ejbMethodIdentifier);
        final boolean methodMarkedForPermitAll = this.isMethodMarkedForPermitAll(ejbComponentDescription, viewClassName, ejbMethodIdentifier);
        if (!rolesAllowed.isEmpty()) {
            return rolesAllowed;
View Full Code Here


                if (target instanceof ClassInfo) {
                    final String className = ((ClassInfo) target).name().toString();
                    componentDescription.setRolesAllowedOnAllViewsForClass(className, new HashSet(Arrays.asList(roles)));

                } else if (target instanceof MethodInfo) {
                    final EJBMethodIdentifier ejbMethodIdentifier = EJBMethodIdentifier.fromMethodInfo((MethodInfo) target);
                    componentDescription.setRolesAllowedOnAllViewsForMethod(ejbMethodIdentifier, new HashSet(Arrays.asList(roles)));
                }
            }
            // move to super class
            klass = this.getSuperClass(klass, index);
View Full Code Here

                final AnnotationTarget target = denyAllAnnotation.target();
                if (target instanceof ClassInfo) {
                    componentDescription.applyDenyAllOnAllViewsForClass(((ClassInfo) target).name().toString());
                } else if (target instanceof MethodInfo) {
                    final MethodInfo methodInfo = (MethodInfo) target;
                    final EJBMethodIdentifier ejbMethodIdentifier = EJBMethodIdentifier.fromMethodInfo(methodInfo);
                    componentDescription.applyDenyAllOnAllViewsForMethod(ejbMethodIdentifier);
                }
            }
            // move to super class
            klass = this.getSuperClass(klass, index);
View Full Code Here

                final AnnotationTarget target = permitAllAnnotation.target();
                if (target instanceof ClassInfo) {
                    componentDescription.applyPermitAllOnAllViewsForClass(((ClassInfo) target).name().toString());
                } else if (target instanceof MethodInfo) {
                    final MethodInfo methodInfo = (MethodInfo) target;
                    final EJBMethodIdentifier ejbMethodIdentifier = EJBMethodIdentifier.fromMethodInfo(methodInfo);
                    componentDescription.applyPermitAllOnAllViewsForMethod(ejbMethodIdentifier);
                }
            }
            // move to super class
            klass = this.getSuperClass(klass, index);
View Full Code Here

        }
    }

    private void applyDenyAll(final EJBComponentDescription ejbComponentDescription, final MethodIntf viewType, final Collection<Method> denyAllApplicableMethods) {
        for (final Method denyAllApplicableMethod : denyAllApplicableMethods) {
            final EJBMethodIdentifier ejbMethodIdentifier = EJBMethodIdentifier.fromMethod(denyAllApplicableMethod);
            if (viewType == null) {
                ejbComponentDescription.applyDenyAllOnAllViewsForMethod(ejbMethodIdentifier);
            } else {
                ejbComponentDescription.applyDenyAllOnViewTypeForMethod(viewType, ejbMethodIdentifier);
            }
View Full Code Here

        }
    }

    private void setRolesAllowed(final EJBComponentDescription ejbComponentDescription, final MethodIntf viewType, final Collection<Method> rolesAllowedApplicableMethods, Collection<String> roles) {
        for (final Method denyAllApplicableMethod : rolesAllowedApplicableMethods) {
            final EJBMethodIdentifier ejbMethodIdentifier = EJBMethodIdentifier.fromMethod(denyAllApplicableMethod);
            if (viewType == null) {
                ejbComponentDescription.setRolesAllowedOnAllViewsForMethod(ejbMethodIdentifier, new HashSet(roles));
            } else {
                ejbComponentDescription.setRolesAllowedForMethodOnViewType(viewType, ejbMethodIdentifier, new HashSet(roles));
            }
View Full Code Here

                final AnnotationTarget target = permitAllAnnotation.target();
                if (target instanceof ClassInfo) {
                    componentDescription.applyPermitAllOnAllViewsForClass(((ClassInfo) target).name().toString());
                } else if (target instanceof MethodInfo) {
                    final MethodInfo methodInfo = (MethodInfo) target;
                    final EJBMethodIdentifier ejbMethodIdentifier = EJBMethodIdentifier.fromMethodInfo(methodInfo);
                    componentDescription.applyPermitAllOnAllViewsForMethod(ejbMethodIdentifier);
                }
            }
            // move to super class
            klass = this.getSuperClass(klass, index);
View Full Code Here

                if (target instanceof ClassInfo) {
                    final String className = ((ClassInfo) target).name().toString();
                    componentDescription.setRolesAllowedOnAllViewsForClass(className, new HashSet(Arrays.asList(roles)));

                } else if (target instanceof MethodInfo) {
                    final EJBMethodIdentifier ejbMethodIdentifier = EJBMethodIdentifier.fromMethodInfo((MethodInfo) target);
                    componentDescription.setRolesAllowedOnAllViewsForMethod(ejbMethodIdentifier, new HashSet(Arrays.asList(roles)));
                }
            }
            // move to super class
            klass = this.getSuperClass(klass, index);
View Full Code Here

                final AnnotationTarget target = denyAllAnnotation.target();
                if (target instanceof ClassInfo) {
                    componentDescription.applyDenyAllOnAllViewsForClass(((ClassInfo) target).name().toString());
                } else if (target instanceof MethodInfo) {
                    final MethodInfo methodInfo = (MethodInfo) target;
                    final EJBMethodIdentifier ejbMethodIdentifier = EJBMethodIdentifier.fromMethodInfo(methodInfo);
                    componentDescription.applyDenyAllOnAllViewsForMethod(ejbMethodIdentifier);
                }
            }
            // move to super class
            klass = this.getSuperClass(klass, index);
View Full Code Here

            this.methodApplicableLockTypes = Collections.emptyMap();
        } else {
            final Map<EJBBusinessMethod, LockType> locks = new HashMap<EJBBusinessMethod, LockType>();
            for (Map.Entry<MethodIdentifier, LockType> entry : methodLocks.entrySet()) {
                final MethodIdentifier ejbMethodDescription = entry.getKey();
                final EJBBusinessMethod ejbMethod = this.getEJBBusinessMethod(ejbMethodDescription);
                locks.put(ejbMethod, entry.getValue());
            }
            this.methodApplicableLockTypes = Collections.unmodifiableMap(locks);
        }

        this.beanLevelAccessTimeout = sessionBeanComponentDescription.getBeanLevelAccessTimeout();

        final Map<MethodIdentifier, AccessTimeoutDetails> methodAccessTimeouts = sessionBeanComponentDescription.getMethodApplicableAccessTimeouts();
        if (methodAccessTimeouts == null) {
            this.methodApplicableAccessTimeouts = Collections.emptyMap();
        } else {
            final Map<EJBBusinessMethod, AccessTimeoutDetails> accessTimeouts = new HashMap<EJBBusinessMethod, AccessTimeoutDetails>();
            for (Map.Entry<MethodIdentifier, AccessTimeoutDetails> entry : methodAccessTimeouts.entrySet()) {
                final MethodIdentifier ejbMethodDescription = entry.getKey();
                final EJBBusinessMethod ejbMethod = this.getEJBBusinessMethod(ejbMethodDescription);
                accessTimeouts.put(ejbMethod, entry.getValue());
            }
            this.methodApplicableAccessTimeouts = Collections.unmodifiableMap(accessTimeouts);
        }
View Full Code Here

TOP

Related Classes of org.jboss.as.ejb3.EJBMethodIdentifier

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.