/** * Determine if there are any annotations present * * @return true or false */ public static boolean annotationsPresent(AbstractFinder classFinder) { if (classFinder.isAnnotationPresent(EJB.class)) return true; if (classFinder.isAnnotationPresent(EJBs.class)) return true; return false; }
/** * Updates the deployment descriptor with handler chain info from HandlerChain annotations * * @param annotatedApp Wrapper around spec dd * @param classFinder ClassFinder containing classes of interest * @throws DeploymentException if parsing or validation error */ public static void processAnnotations(JndiConsumer annotatedApp, AbstractFinder classFinder) throws DeploymentException { if ( annotatedApp != null && classFinder.isAnnotationPresent(HandlerChain.class)) { processHandlerChain(annotatedApp, classFinder); } }
/** * Update the deployment descriptor from Resource and Resources annotations * @throws Exception if parsing or validation error */ public static void processAnnotations(JndiConsumer annotatedApp, AbstractFinder classFinder, ResourceProcessor resourceProcessor) throws Exception { if (annotatedApp != null) { if (classFinder.isAnnotationPresent(Resources.class)) { processResources(annotatedApp, classFinder, resourceProcessor); } if (classFinder.isAnnotationPresent(Resource.class)) { processResource(annotatedApp, classFinder, resourceProcessor); } } }
/** * Update the deployment descriptor from the DeclareRoles and RunAs annotations * * @param webApp Access to the spec dd * @param classFinder Access to the classes of interest * @throws DeploymentException if parsing or validation error */ public static void processAnnotations(WebApp webApp, AbstractFinder classFinder) throws DeploymentException { if (webApp != null && classFinder != null) { if (classFinder.isAnnotationPresent(DeclareRoles.class)) { processDeclareRoles(webApp, classFinder); } if (classFinder.isAnnotationPresent(RunAs.class)) { processRunAs(webApp, classFinder); } } }
/** * Update the deployment descriptor from the PersistenceUnit and PersistenceUnits annotations * * @param annotatedApp Access to the spec dd * @param classFinder Access to the classes of interest * @throws DeploymentException if parsing or validation error */ public static void processAnnotations(JndiConsumer annotatedApp, AbstractFinder classFinder) throws DeploymentException { if (annotatedApp != null) { if (classFinder.isAnnotationPresent(PersistenceUnits.class)) { processPersistenceUnits(annotatedApp, classFinder); } if (classFinder.isAnnotationPresent(PersistenceUnit.class)) { processPersistenceUnit(annotatedApp, classFinder); } } }
/** * Update the deployment descriptor from the WebServiceRef and WebServiceRefs annotations * * @param specDD Access to the spec dd * @param classFinder Access to the classes of interest * @throws DeploymentException if parsing or validation error */ public static void processAnnotations(JndiConsumer specDD, AbstractFinder classFinder) throws DeploymentException { if (specDD != null) { if (classFinder.isAnnotationPresent(WebServiceRefs.class)) { processWebServiceRefs(specDD, classFinder); } if (classFinder.isAnnotationPresent(WebServiceRef.class)) { processWebServiceRef(specDD, classFinder); } } }
/** * Update the deployment descriptor from the PersistenceContext and PersistenceContexts annotations * * @param annotatedApp Access to the spec dd * @param classFinder Access to the classes of interest * @throws DeploymentException if parsing or validation error */ public static void processAnnotations(JndiConsumer annotatedApp, AbstractFinder classFinder) throws DeploymentException { if (annotatedApp != null) { if (classFinder.isAnnotationPresent(PersistenceContexts.class)) { processPersistenceContexts(annotatedApp, classFinder); } if (classFinder.isAnnotationPresent(PersistenceContext.class)) { processPersistenceContext(annotatedApp, classFinder); } } }