Examples of EJBMethodIdentifier


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

Examples of org.jboss.as.ejb3.EJBMethodIdentifier

                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

Examples of org.jboss.as.ejb3.EJBMethodIdentifier

                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

Examples of org.jboss.as.ejb3.EJBMethodIdentifier

                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

Examples of org.jboss.as.ejb3.EJBMethodIdentifier

        }
    }

    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

Examples of org.jboss.as.ejb3.EJBMethodIdentifier

        }
    }

    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

Examples of org.jboss.as.ejb3.EJBMethodIdentifier

                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

Examples of org.jboss.as.ejb3.EJBMethodIdentifier

                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

Examples of org.jboss.as.ejb3.EJBMethodIdentifier

                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
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.