Examples of ApplicationContextImpl


Examples of org.exoplatform.services.rest.impl.ApplicationContextImpl

  
   @SuppressWarnings("unchecked")
   private MultivaluedMap<String, String> getParameters(UriInfo info)
   {
      MultivaluedMap<String, String> parameters = info.getQueryParameters();
      ApplicationContextImpl context = (ApplicationContextImpl)info;     
     
      Type formType = MultivaluedMapImpl.class.getGenericInterfaces()[0];
      MediaType contentType = context.getHttpHeaders().getMediaType();
      if (contentType == null)
      {
         contentType = MediaType.APPLICATION_FORM_URLENCODED_TYPE;
      }

      MultivaluedMap<String, String> form = new MultivaluedMapImpl();     
      try
      {
         MessageBodyReader reader =
            context.getProviders().getMessageBodyReader(MultivaluedMap.class, formType, null, contentType);
         if (reader != null)
         {
            form =
               (MultivaluedMap<String, String>)reader.readFrom(MultivaluedMap.class, formType, null, contentType,
                  context.getHttpHeaders().getRequestHeaders(), context.getContainerRequest().getEntityStream());
         }
      }
      catch (IllegalStateException e)
      {
         if (LOG.isTraceEnabled())
View Full Code Here

Examples of org.exoplatform.services.rest.impl.ApplicationContextImpl

  
   @SuppressWarnings("unchecked")
   private MultivaluedMap<String, String> getParameters(UriInfo info)
   {
      MultivaluedMap<String, String> parameters = info.getQueryParameters();
      ApplicationContextImpl context = (ApplicationContextImpl)info;     
     
      Type formType = MultivaluedMapImpl.class.getGenericInterfaces()[0];
      MediaType contentType = context.getHttpHeaders().getMediaType();
      if (contentType == null)
      {
         contentType = MediaType.APPLICATION_FORM_URLENCODED_TYPE;
      }

      MultivaluedMap<String, String> form = new MultivaluedMapImpl();     
      try
      {
         MessageBodyReader reader =
            context.getProviders().getMessageBodyReader(MultivaluedMap.class, formType, null, contentType);
         if (reader != null)
         {
            form =
               (MultivaluedMap<String, String>)reader.readFrom(MultivaluedMap.class, formType, null, contentType,
                  context.getHttpHeaders().getRequestHeaders(), context.getContainerRequest().getEntityStream());
         }
      }
      catch (IllegalStateException e)
      {
         if (LOG.isTraceEnabled())
View Full Code Here

Examples of org.exoplatform.services.rest.impl.ApplicationContextImpl

      resourceBinder = (ResourceBinder)container.getComponentInstanceOfType(ResourceBinder.class);
      assertNotNull(resourceBinder);
      requestHandler = (RequestHandlerImpl)container.getComponentInstanceOfType(RequestHandlerImpl.class);
      assertNotNull(requestHandler);
      providers = ProviderBinder.getInstance();
      ApplicationContextImpl.setCurrent(new ApplicationContextImpl(null, null, providers));

      root = session.getRootNode().addNode("webdav-test");

      // session.save();
View Full Code Here

Examples of org.exoplatform.services.rest.impl.ApplicationContextImpl

      resourceBinder = (ResourceBinder)container.getComponentInstanceOfType(ResourceBinder.class);
      assertNotNull(resourceBinder);
      requestHandler = (RequestHandlerImpl)container.getComponentInstanceOfType(RequestHandlerImpl.class);
      assertNotNull(requestHandler);
      providers = ProviderBinder.getInstance();
      ApplicationContextImpl.setCurrent(new ApplicationContextImpl(null, null, providers));

      root = session.getRootNode().addNode("webdav-test", "nt:folder");

      // session.save();
View Full Code Here

Examples of org.exoplatform.services.rest.impl.ApplicationContextImpl

      ProviderBinder.setInstance(new ProviderBinder());
      providers = ProviderBinder.getInstance();

      binder.clear();

      ApplicationContextImpl.setCurrent(new ApplicationContextImpl(null, null, providers, dependencySupplier));
     
      launcher = new ResourceLauncher(requestHandler);
   }
View Full Code Here

Examples of org.exoplatform.services.rest.impl.ApplicationContextImpl

      binder = (ResourceBinder)container.getComponentInstanceOfType(ResourceBinder.class);
      requestHandler = (RequestHandlerImpl)container.getComponentInstanceOfType(RequestHandlerImpl.class);
      // reset providers to be sure it is clean
      ProviderBinder.setInstance(new ProviderBinder());
      providers = ProviderBinder.getInstance();
      ApplicationContextImpl.setCurrent(new ApplicationContextImpl(null, null, providers));
      binder.clear();
      groovyPublisher = (GroovyJaxrsPublisher)container.getComponentInstanceOfType(GroovyJaxrsPublisher.class);
      launcher = new ResourceLauncher(requestHandler);
   }
View Full Code Here

Examples of org.jboss.arquillian.core.impl.context.ApplicationContextImpl

      return created;
   }

   private void createBuiltInServices() throws Exception
   {   
      final ApplicationContext context = new ApplicationContextImpl();
      contexts.add(context);
      executeInApplicationContext(new Callable<Object>() {
          @Override
          public Object call() throws Exception {
              ManagerImpl.this.bind(
View Full Code Here

Examples of org.jboss.arquillian.core.impl.context.ApplicationContextImpl

   /**
    *
    */
   private void createApplicationContextAndActivate()
   {   
      ApplicationContext context = new ApplicationContextImpl();
      context.activate();
      context.getObjectStore().add(Injector.class, InjectorImpl.of(this));
      contexts.add(context);
   }
View Full Code Here

Examples of org.jboss.arquillian.core.impl.context.ApplicationContextImpl

   /**
    *
    */
   private void createApplicationContextAndActivate()
   {   
      ApplicationContext context = new ApplicationContextImpl();
      context.activate();
      context.getObjectStore().add(Injector.class, InjectorImpl.of(this));
      contexts.add(context);
   }
View Full Code Here

Examples of org.jboss.arquillian.core.impl.context.ApplicationContextImpl

   /**
    *
    */
   private void createApplicationContextAndActivate()
   {   
      ApplicationContext context = new ApplicationContextImpl();
      context.activate();
      context.getObjectStore().add(Injector.class, InjectorImpl.of(this));
      contexts.add(context);
   }
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.