/** * Add a component to this application. * * @param description the component description * @param deploymentRoot */ public void addComponent(final ComponentDescription description, final VirtualFile deploymentRoot) { for (final ViewDescription viewDescription : description.getViews()) { List<ViewInformation> viewComponents = componentsByViewName.get(viewDescription.getViewClassName()); if (viewComponents == null) { viewComponents = new ArrayList<ViewInformation>(1); componentsByViewName.put(viewDescription.getViewClassName(), viewComponents); } viewComponents.add(new ViewInformation(viewDescription, deploymentRoot, description.getComponentName())); } List<Description> components = componentsByName.get(description.getComponentName()); if (components == null) { componentsByName.put(description.getComponentName(), components = new ArrayList<Description>(1)); } components.add(new Description(description, deploymentRoot)); }
@Override public void configure(final DeploymentPhaseContext context, final ComponentDescription description, final ComponentConfiguration configuration) throws DeploymentUnitProcessingException { final ClassReflectionIndex classIndex = context.getDeploymentUnit().getAttachment(Attachments.REFLECTION_INDEX).getClassIndex(configuration.getComponentClass()); final Constructor<?> ctor = classIndex.getConstructor(new String[0]); boolean noInterface = false; for(ViewDescription view : description.getViews()) { if(view.getViewClassName().equals(description.getComponentClassName())) { noInterface = true; } } EjbValidationsUtil.getBusinessMethods(configuration.getComponentClass()); EjbValidationsUtil.verifyEjbClassAndDefaultConstructor(ctor, configuration.getComponentClass().getEnclosingClass(), noInterface, description.getComponentName(), description.getComponentClassName(), configuration.getComponentClass().getModifiers()); EjbValidationsUtil.verifyEjbPublicMethodAreNotFinalNorStatic(configuration.getComponentClass().getDeclaredMethods(),description.getComponentClassName()); for ( Class<?> interfaceClass : configuration.getComponentClass().getInterfaces()) EjbValidationsUtil.verifyEjbPublicMethodAreNotFinalNorStatic(interfaceClass.getDeclaredMethods(), interfaceClass.getCanonicalName()); } }
if (!(description.getViews().size() == 1)) { throw UndertowLogger.ROOT_LOGGER.wrongComponentType(clazz);
for (ViewDescription view : description.getViews()) { Class<?> viewClass; try {
for (ViewDescription view : componentConfiguration.getComponentDescription().getViews()) { viewServices.put(view.getViewClassName(), view.getServiceName());
protected ServiceName getProcessApplicationViewServiceName(ComponentDescription paComponent) { Set<ViewDescription> views = paComponent.getViews(); if(views == null || views.isEmpty()) { return null; } else { ViewDescription next = views.iterator().next(); return next.getServiceName(); } }
protected ServiceName getProcessApplicationViewServiceName(ComponentDescription paComponent) { Set<ViewDescription> views = paComponent.getViews(); if(views == null || views.isEmpty()) { return null; } else { ViewDescription next = views.iterator().next(); return next.getServiceName(); } }
protected ServiceName getProcessApplicationViewServiceName(ComponentDescription paComponent) { Set<ViewDescription> views = paComponent.getViews(); if(views == null || views.isEmpty()) { return null; } else { ViewDescription next = views.iterator().next(); return next.getServiceName(); } }
protected ServiceName getProcessApplicationViewServiceName(ComponentDescription paComponent) { Set<ViewDescription> views = paComponent.getViews(); if(views == null || views.isEmpty()) { return null; } else { ViewDescription next = views.iterator().next(); return next.getServiceName(); } }
protected ServiceName getProcessApplicationViewServiceName(ComponentDescription paComponent) { Set<ViewDescription> views = paComponent.getViews(); if(views == null || views.isEmpty()) { return null; } else { ViewDescription next = views.iterator().next(); return next.getServiceName(); } }
static ServiceName registerView(final ComponentDescription componentDescription, final String componentClassName) { final ViewDescription pojoView = new ViewDescription(componentDescription, componentClassName); componentDescription.getViews().add(pojoView); pojoView.getConfigurators().add(new ViewConfigurator() { @Override public void configure(DeploymentPhaseContext context, ComponentConfiguration componentConfiguration, ViewDescription description, ViewConfiguration configuration) throws DeploymentUnitProcessingException { // add WS POJO component instance associating interceptor configuration.addViewInterceptor(WSComponentInstanceAssociationInterceptor.FACTORY, InterceptorOrder.View.ASSOCIATING_INTERCEPTOR); } }); return pojoView.getServiceName(); }
static ServiceName registerView(final ComponentDescription componentDescription, final String componentClassName) { final ViewDescription pojoView = new ViewDescription(componentDescription, componentClassName); componentDescription.getViews().add(pojoView); pojoView.getConfigurators().add(new ViewConfigurator() { @Override public void configure(DeploymentPhaseContext context, ComponentConfiguration componentConfiguration, ViewDescription description, ViewConfiguration configuration) throws DeploymentUnitProcessingException { configuration.addViewInterceptor(AccessCheckingInterceptor.getFactory(), InterceptorOrder.View.CHECKING_INTERCEPTOR); // add WS POJO component instance associating interceptor configuration.addViewInterceptor(WSComponentInstanceAssociationInterceptor.FACTORY, InterceptorOrder.View.ASSOCIATING_INTERCEPTOR); } }); return pojoView.getServiceName(); }
static ServiceName registerView(final ComponentDescription componentDescription, final String componentClassName) { final ViewDescription pojoView = new ViewDescription(componentDescription, componentClassName); componentDescription.getViews().add(pojoView); pojoView.getConfigurators().add(new ViewConfigurator() { @Override public void configure(DeploymentPhaseContext context, ComponentConfiguration componentConfiguration, ViewDescription description, ViewConfiguration configuration) throws DeploymentUnitProcessingException { configuration.addViewInterceptor(AccessCheckingInterceptor.getFactory(), InterceptorOrder.View.CHECKING_INTERCEPTOR); // add WS POJO component instance associating interceptor configuration.addViewInterceptor(WSComponentInstanceAssociationInterceptor.FACTORY, InterceptorOrder.View.ASSOCIATING_INTERCEPTOR); } }); return pojoView.getServiceName(); }
/** * Add a component to this application. * * @param description the component description * @param deploymentRoot */ public void addComponent(final ComponentDescription description, final VirtualFile deploymentRoot) { for (final ViewDescription viewDescription : description.getViews()) { List<ViewInformation> viewComponents = componentsByViewName.get(viewDescription.getViewClassName()); if (viewComponents == null) { viewComponents = new ArrayList<ViewInformation>(1); componentsByViewName.put(viewDescription.getViewClassName(), viewComponents); } viewComponents.add(new ViewInformation(viewDescription, deploymentRoot, description.getComponentName())); } List<Description> components = componentsByName.get(description.getComponentName()); if (components == null) { componentsByName.put(description.getComponentName(), components = new ArrayList<Description>(1)); } components.add(new Description(description, deploymentRoot)); }
/** * Add a component to this application. * * @param description the component description * @param deploymentRoot */ public void addComponent(final ComponentDescription description, final VirtualFile deploymentRoot) { for (final ViewDescription viewDescription : description.getViews()) { List<ViewInformation> viewComponents = componentsByViewName.get(viewDescription.getViewClassName()); if (viewComponents == null) { viewComponents = new ArrayList<ViewInformation>(1); componentsByViewName.put(viewDescription.getViewClassName(), viewComponents); } viewComponents.add(new ViewInformation(viewDescription, deploymentRoot, description.getComponentName())); } List<Description> components = componentsByName.get(description.getComponentName()); if (components == null) { componentsByName.put(description.getComponentName(), components = new ArrayList<Description>(1)); } components.add(new Description(description, deploymentRoot)); }
/** * Add a component to this application. * * @param description the component description * @param deploymentRoot */ public void addComponent(final ComponentDescription description, final VirtualFile deploymentRoot) { for (final ViewDescription viewDescription : description.getViews()) { List<ViewInformation> viewComponents = componentsByViewName.get(viewDescription.getViewClassName()); if (viewComponents == null) { viewComponents = new ArrayList<ViewInformation>(1); componentsByViewName.put(viewDescription.getViewClassName(), viewComponents); } viewComponents.add(new ViewInformation(viewDescription, deploymentRoot, description.getComponentName())); } List<Description> components = componentsByName.get(description.getComponentName()); if (components == null) { componentsByName.put(description.getComponentName(), components = new ArrayList<Description>(1)); } components.add(new Description(description, deploymentRoot)); }
Class[] jaxrsType = GetRestful.getSubResourceClass(componentClass); final String jndiName; if (component.getViews().size() == 1) { boolean found = false; String foundType = null; for (final ViewDescription view : component.getViews()) { for(Class subResource : jaxrsType) { if (view.getViewClassName().equals(subResource.getName())) {
if (!(description.getViews().size() == 1)) { throw UndertowLogger.ROOT_LOGGER.wrongComponentType(clazz);
if (!(description.getViews().size() == 1)) { throw UndertowLogger.ROOT_LOGGER.wrongComponentType(clazz);
for (ViewDescription view : description.getViews()) { Class<?> viewClass; try {