Examples of FilterDescriptor


Examples of org.apache.hadoop.gateway.descriptor.FilterDescriptor

    assertThat( descriptor, notNullValue() );
    assertThat( descriptor.resources().size(), is( 1 ) );
    ResourceDescriptor resource1 = descriptor.resources().get( 0 );
    assertThat( resource1, notNullValue() );
    assertThat( resource1.filters().size(), is( 1 ) );
    FilterDescriptor filter1 = resource1.filters().get( 0 );
    assertThat( filter1, notNullValue() );
    assertThat( filter1.params().size(), is( 1 ) );
    FilterParamDescriptor param1 = filter1.params().get( 0 );
    assertThat( param1, notNullValue() );
  }
View Full Code Here

Examples of org.apache.hadoop.gateway.descriptor.FilterDescriptor

          replayBufferSize = paramDescriptor.value();
          break;
        }
      }
    }
    FilterDescriptor filter = resource.addFilter().name( getName() ).role( getRole() ).impl( HttpClientDispatch.class );
    filter.param().name("replayBufferSize").value(replayBufferSize);
    if( context.getGatewayConfig().isHadoopKerberosSecured() ) {
      filter.param().name("kerberos").value("true");
    }
  }
View Full Code Here

Examples of org.apache.hadoop.gateway.descriptor.FilterDescriptor

    resource = resources.get( 0 );
    assertThat( resource.role(), is( "test-service-role" ) );
    assertThat( resource.pattern(), is( "test-service/?**" ) );
    List<FilterDescriptor> filters = resource.filters();
    assertThat( filters.size(), is( 1 ) );
    FilterDescriptor filter = filters.get( 0 );
    assertThat( filter.role(), is( "pivot") );
    assertThat( filter.name(), is( "jersey" ) );
    assertThat( filter.impl(), is( "org.glassfish.jersey.servlet.ServletContainer" ) );
    List<FilterParamDescriptor> params = filter.params();
    assertThat( params.size(), is( 1 ) );
    FilterParamDescriptor param = params.get( 0 );
    assertThat( param.name(), is( "jersey.config.server.provider.packages" ) );
    assertThat( param.value(), is( "test-package-1;test-package-2"  ) );

    resource = resources.get( 1 );
    assertThat( resource.role(), is( "test-service-role" ) );
    assertThat( resource.pattern(), is( "test-service/**?**" ) );
    filters = resource.filters();
    assertThat( filters.size(), is( 1 ) );
    filter = filters.get( 0 );
    assertThat( filter.role(), is( "pivot") );
    assertThat( filter.name(), is( "jersey" ) );
    assertThat( filter.impl(), is( "org.glassfish.jersey.servlet.ServletContainer" ) );
    params = filter.params();
    assertThat( params.size(), is( 1 ) );
    param = params.get( 0 );
    assertThat( param.name(), is( "jersey.config.server.provider.packages" ) );
    assertThat( param.value(), is( "test-package-1;test-package-2"  ) );
  }
View Full Code Here

Examples of org.eclipse.dltk.internal.ui.filters.FilterDescriptor

    for (int i = 0; i < recentlyChangedFilterIds.length; i++) {
      String id = recentlyChangedFilterIds[i];
      fFilterIdsUsedInLastViewMenu[i] = id;
      boolean state = fEnabledFilterIds.containsKey(id)
          && ((Boolean) fEnabledFilterIds.get(id)).booleanValue();
      FilterDescriptor filterDesc = (FilterDescriptor) fFilterDescriptorMap
          .get(id);
      if (filterDesc != null) {
        IContributionItem item = new FilterActionMenuContributionItem(
            this, id, filterDesc.getName(), state, i + 1);
        mm.insertBefore(RECENT_FILTERS_GROUP_NAME, item);
      }
    }
  }
View Full Code Here

Examples of org.erlide.ui.editors.erl.outline.filters.FilterDescriptor

        data.heightHint = widget.getItemHeight() * 12;
        widget.setLayoutData(data);
        // Create the tree viewer
        fTreeViewer = new TreeViewer(widget);
        // Add member filter, don't show attributes
        final FilterDescriptor filterDescriptor = FilterDescriptor
                .getFilterDescriptor("attributesFilter");
        fTreeViewer.addFilter(filterDescriptor.getViewerFilter());
        // Add the name pattern filter
        fNamePatternFilter = new QuickOutlineNamePatternFilter();
        fTreeViewer.addFilter(fNamePatternFilter);
        // Set the content provider
        fTreeContentProvider = fOutlineContentCreator.createOutlineContentProvider();
View Full Code Here

Examples of org.exoplatform.services.rest.FilterDescriptor

    * @param scope ComponentLifecycleScope
    */
   public void addRequestFilter(Class<? extends RequestFilter> clazz, RequestFilter instance,
      ComponentLifecycleScope scope)
   {
      FilterDescriptor descriptor = new FilterDescriptorImpl(clazz);
      descriptor.accept(rdv);

      ObjectFactory<FilterDescriptor> factory = new PerRequestObjectFactory<FilterDescriptor>(descriptor);
      switch (scope)
      {
         case PER_REQUEST :
            factory = new PerRequestObjectFactory<FilterDescriptor>(descriptor);
            break;
         case SINGLETON :
            if (instance == null)
               throw new NullPointerException("RequestFilter instance is null.");
            factory = new SingletonObjectFactory<FilterDescriptor>(descriptor, instance);
            break;
         case CONTAINER :
            factory = new ContainerObjectFactory<FilterDescriptor>(descriptor);
            break;
      }
      requestFilters.getList(descriptor.getUriPattern()).add(factory);
   }
View Full Code Here

Examples of org.exoplatform.services.rest.FilterDescriptor

    * @param scope ComponentLifecycleScope
    */
   public void addResponseFilter(Class<? extends ResponseFilter> clazz, ResponseFilter instance,
      ComponentLifecycleScope scope)
   {
      FilterDescriptor descriptor = new FilterDescriptorImpl(clazz);
      descriptor.accept(rdv);

      ObjectFactory<FilterDescriptor> factory = new PerRequestObjectFactory<FilterDescriptor>(descriptor);
      switch (scope)
      {
         case PER_REQUEST :
            factory = new PerRequestObjectFactory<FilterDescriptor>(descriptor);
            break;
         case SINGLETON :
            if (instance == null)
               throw new NullPointerException("ResponseFilter instance is null.");
            factory = new SingletonObjectFactory<FilterDescriptor>(descriptor, instance);
            break;
         case CONTAINER :
            factory = new ContainerObjectFactory<FilterDescriptor>(descriptor);
            break;
      }
      responseFilters.getList(descriptor.getUriPattern()).add(factory);
   }
View Full Code Here

Examples of org.exoplatform.services.rest.FilterDescriptor

    * @param scope ComponentLifecycleScope
    */
   public void addMethodInvokerFilter(Class<? extends MethodInvokerFilter> clazz, MethodInvokerFilter instance,
      ComponentLifecycleScope scope)
   {
      FilterDescriptor descriptor = new FilterDescriptorImpl(clazz);
      descriptor.accept(rdv);

      ObjectFactory<FilterDescriptor> factory = new PerRequestObjectFactory<FilterDescriptor>(descriptor);
      switch (scope)
      {
         case PER_REQUEST :
            factory = new PerRequestObjectFactory<FilterDescriptor>(descriptor);
            break;
         case SINGLETON :
            if (instance == null)
               throw new NullPointerException("MethodInvokerFilter instance is null.");
            factory = new SingletonObjectFactory<FilterDescriptor>(descriptor, instance);
            break;
         case CONTAINER :
            factory = new ContainerObjectFactory<FilterDescriptor>(descriptor);
            break;
      }
      invokerFilters.getList(descriptor.getUriPattern()).add(factory);
   }
View Full Code Here

Examples of org.exoplatform.services.rest.FilterDescriptor

    */
   public void addRequestFilter(Class<? extends RequestFilter> clazz, RequestFilter instance,
      ComponentLifecycleScope scope)
   {

      FilterDescriptor descriptor = new FilterDescriptorImpl(clazz);
      descriptor.accept(rdv);

      ObjectFactory<FilterDescriptor> factory = new PerRequestObjectFactory<FilterDescriptor>(descriptor);
      switch (scope)
      {
         case PER_REQUEST :
            factory = new PerRequestObjectFactory<FilterDescriptor>(descriptor);
            break;
         case SINGLETON :
            if (instance == null)
            {
               throw new NullPointerException("RequestFilter instance is null.");
            }
            factory = new SingletonObjectFactory<FilterDescriptor>(descriptor, instance);
            break;
         case CONTAINER :
            factory = new ContainerObjectFactory<FilterDescriptor>(descriptor);
            break;
      }

      requestFilters.getList(descriptor.getUriPattern()).add(factory);
   }
View Full Code Here

Examples of org.exoplatform.services.rest.FilterDescriptor

    */
   public void addResponseFilter(Class<? extends ResponseFilter> clazz, ResponseFilter instance,
      ComponentLifecycleScope scope)
   {

      FilterDescriptor descriptor = new FilterDescriptorImpl(clazz);
      descriptor.accept(rdv);

      ObjectFactory<FilterDescriptor> factory = new PerRequestObjectFactory<FilterDescriptor>(descriptor);
      switch (scope)
      {
         case PER_REQUEST :
            factory = new PerRequestObjectFactory<FilterDescriptor>(descriptor);
            break;
         case SINGLETON :
            if (instance == null)
            {
               throw new NullPointerException("ResponseFilter instance is null.");
            }
            factory = new SingletonObjectFactory<FilterDescriptor>(descriptor, instance);
            break;
         case CONTAINER :
            factory = new ContainerObjectFactory<FilterDescriptor>(descriptor);
            break;
      }

      responseFilters.getList(descriptor.getUriPattern()).add(factory);
   }
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.