protected Class getAnnotatedInterface(Class<? extends Annotation> annotation, Component seamComponent) { Class resourceInterface = null; for (Class anInterface : seamComponent.getBusinessInterfaces()) { if (anInterface.isAnnotationPresent(annotation)) { if (resourceInterface != null) { throw new IllegalStateException("Only one business interface can be annotated " + annotation + ": " + seamComponent); } resourceInterface = anInterface; } } return resourceInterface; }
public boolean businessInterfaceHasAnnotation(Class annotationType) { for (Class businessInterface: getBusinessInterfaces() ) { if ( hasAnnotation(businessInterface, annotationType) ) { return true; } } return false; }
public List<Class> getSeamInterfaces() { List<Class> interfaces = new ArrayList<Class>(); Component component = getComponent(); // Attempt to piece together all of the possible interfaces to apply // to our proxy. if ( component != null && component.isInterceptionEnabled() ) { if (component.getType().isSessionBean()) { interfaces.addAll(component.getBusinessInterfaces()); } else { interfaces.add(HttpSessionActivationListener.class); interfaces.add(Mutable.class); } interfaces.add(Proxy.class); } return interfaces; }
private synchronized Class<ProxyObject> getProxyFactory() { if (factory==null) { factory = createProxyFactory( getType(), getBeanClass(), getBusinessInterfaces() ); } return factory; }
&& component.getBusinessInterfaces().size() > 0) { for (Class c : component.getBusinessInterfaces()) { if (c.isAnnotationPresent(EJB.LOCAL)) { clz = c;
ComponentType.JAVA_BEAN, beanClass, Component.getBusinessInterfaces(beanClass) ).newInstance(); proxy.setHandler(this);
ComponentType.STATEFUL_SESSION_BEAN, beanClass, Component.getBusinessInterfaces(beanClass) ).newInstance(); proxy.setHandler(this);
&& component.getBusinessInterfaces().size() > 0) for (Class c : component.getBusinessInterfaces())
component.getBusinessInterfaces().size() > 0) for (Class c : component.getBusinessInterfaces())
protected static synchronized List<SeamComponentInfo> listNuxeoComponents() { if (components == null) { components = new ArrayList<>(); for (String cName : listAllComponentsNames()) { SeamComponentInfoImpl desc = new SeamComponentInfoImpl(); Component comp = Component.forName(cName); String className = comp.getBeanClass().getName(); // if (className.startsWith("org.nuxeo")) { if (!className.startsWith("org.jboss")) { desc.setName(cName); desc.setScope(comp.getScope().toString()); desc.setClassName(className); @SuppressWarnings("rawtypes") Set<Class> ifaces = comp.getBusinessInterfaces(); if (ifaces != null && ifaces.size() > 0) { for (Class<?> iface : ifaces) { desc.addInterfaceName(iface.getName()); } } desc.addInterfaceName(comp.getBeanClass().getName()); components.add(desc); } } Collections.sort(components); } return components; } }
handledResources.addAll(seamComponent.getBusinessInterfaces());
checkDefaultRemoveMethod(); businessInterfaces = getBusinessInterfaces( getBeanClass() );