/** * Process Annotation with given WebBundleContext. * @param ainfo * @param webBundleContext * @return HandlerProcessingResult */ @Override protected HandlerProcessingResult processAnnotation( AnnotationInfo ainfo, WebBundleContext webBundleContext) throws AnnotationProcessorException { // this is not for web bundle return getInvalidAnnotatedElementHandlerResult(webBundleContext, ainfo); }
throws AnnotationProcessorException { if (!validateAccessControlAnnotations(ainfo)) { return getDefaultFailedResult(); MethodDescriptor md = (MethodDescriptor)next; if (!hasMethodPermissionsFromDD(md, ejbDesc)) { Method m = md.getMethod(ejbDesc); if (TypeUtil.sameMethodSignature(m, annMethod)) { processEjbMethodSecurity(authAnnotation, md, ejbDesc); return getDefaultProcessedResult();
/** * This method is for processing security annotation associated to ejb. * Dervied class call this method may like to override * * protected void processEjbMethodSecurity(Annotation authAnnotation, * MethodDescriptor md, EjbDescriptor ejbDesc) */ @Override public void postProcessAnnotation(AnnotationInfo ainfo, EjbContext ejbContext) throws AnnotationProcessorException { EjbDescriptor ejbDesc = ejbContext.getDescriptor(); Annotation authAnnotation = ainfo.getAnnotation(); if (!ejbContext.isInherited() && (ejbDesc.getMethodPermissionsFromDD() == null || ejbDesc.getMethodPermissionsFromDD().size() == 0)) { for (MethodDescriptor md : getMethodAllDescriptors(ejbDesc)) { processEjbMethodSecurity(authAnnotation, md, ejbDesc); } } else { Class classAn = (Class)ainfo.getAnnotatedElement(); for (Object next : ejbDesc.getSecurityBusinessMethodDescriptors()) { MethodDescriptor md = (MethodDescriptor)next; // override by existing info if (classAn.equals(ejbContext.getDeclaringClass(md)) && !hasMethodPermissionsFromDD(md, ejbDesc)) { processEjbMethodSecurity(authAnnotation, md, ejbDesc); } } } }
log(Level.SEVERE, ainfo, localStrings.getLocalString( "enterprise.deployment.annotation.handlers.morethanoneauthannotation",
throws AnnotationProcessorException { if (!validateAccessControlAnnotations(ainfo)) { return getDefaultFailedResult(); MethodDescriptor md = (MethodDescriptor)next; if (!hasMethodPermissionsFromDD(md, ejbDesc)) { Method m = md.getMethod(ejbDesc); if (TypeUtil.sameMethodSignature(m, annMethod)) { processEjbMethodSecurity(authAnnotation, md, ejbDesc); return getDefaultProcessedResult();
(ejbDesc.getMethodPermissionsFromDD() == null || ejbDesc.getMethodPermissionsFromDD().size() == 0)) { for (MethodDescriptor md : getMethodAllDescriptors(ejbDesc)) { processEjbMethodSecurity(authAnnotation, md, ejbDesc); !hasMethodPermissionsFromDD(md, ejbDesc)) { processEjbMethodSecurity(authAnnotation, md, ejbDesc);
log(Level.SEVERE, ainfo, localStrings.getLocalString( "enterprise.deployment.annotation.handlers.morethanoneauthannotation",
/** * Process Annotation with given WebBundleContext. * @param ainfo * @param webBundleContext * @return HandlerProcessingResult */ @Override protected HandlerProcessingResult processAnnotation( AnnotationInfo ainfo, WebBundleContext webBundleContext) throws AnnotationProcessorException { // this is not for web bundle return getInvalidAnnotatedElementHandlerResult(webBundleContext, ainfo); }
/** * Process Annotation with given WebCompContexts. * @param ainfo * @param webCompContexts * @return HandlerProcessingResult */ @Override protected HandlerProcessingResult processAnnotation( AnnotationInfo ainfo, WebComponentContext[] webCompContexts) throws AnnotationProcessorException { // this is not for web component return getInvalidAnnotatedElementHandlerResult(webCompContexts[0], ainfo); }
/** * Process Annotation with given WebCompContexts. * @param ainfo * @param webCompContexts * @return HandlerProcessingResult */ @Override protected HandlerProcessingResult processAnnotation( AnnotationInfo ainfo, WebComponentContext[] webCompContexts) throws AnnotationProcessorException { // this is not for web component return getInvalidAnnotatedElementHandlerResult(webCompContexts[0], ainfo); }