Package org.exoplatform.services.rest.impl.resource

Examples of org.exoplatform.services.rest.impl.resource.ApplicationResource


               if (obj instanceof ResponseFilter)
                  appProviders.addResponseFilter((ResponseFilter)obj);
            }
            else if (clazz.getAnnotation(Path.class) != null)
            {
               AbstractResourceDescriptor descriptor = new ApplicationResource(applicationId, obj);
               descriptor.accept(rdv);
               resources.addResource(new SingletonObjectFactory<AbstractResourceDescriptor>(descriptor, obj));
            }
            else
            {
               LOG.warn("Unknown class type: " + clazz.getName() + " found in " + applicationId);
            }
         }
      }
      Set<Class<?>> classes = app.getClasses();
      if (classes != null && classes.size() > 0)
      {
         for (Class clazz : classes)
         {
            if (clazz.getAnnotation(Provider.class) != null)
            {
               if (ContextResolver.class.isAssignableFrom(clazz))
                  appProviders.addContextResolver(clazz);
               if (ExceptionMapper.class.isAssignableFrom(clazz))
                  appProviders.addExceptionMapper(clazz);
               if (MessageBodyReader.class.isAssignableFrom(clazz))
                  appProviders.addMessageBodyReader(clazz);
               if (MessageBodyWriter.class.isAssignableFrom(clazz))
                  appProviders.addMessageBodyWriter(clazz);
            }
            else if (clazz.getAnnotation(Filter.class) != null)
            {
               if (MethodInvokerFilter.class.isAssignableFrom(clazz))
                  appProviders.addMethodInvokerFilter(clazz);
               if (RequestFilter.class.isAssignableFrom(clazz))
                  appProviders.addRequestFilter(clazz);
               if (ResponseFilter.class.isAssignableFrom(clazz))
                  appProviders.addResponseFilter(clazz);
            }
            else if (clazz.getAnnotation(Path.class) != null)
            {
               AbstractResourceDescriptor descriptor = new ApplicationResource(applicationId, clazz);
               descriptor.accept(rdv);
               resources.addResource(new PerRequestObjectFactory<AbstractResourceDescriptor>(descriptor));
            }
            else
            {
               LOG.warn("Unknown class type: " + clazz.getName() + " found in: " + applicationId);
View Full Code Here


               if (obj instanceof ResponseFilter)
                  appProviders.addResponseFilter((ResponseFilter)obj);
            }
            else if (clazz.getAnnotation(Path.class) != null)
            {
               AbstractResourceDescriptor descriptor = new ApplicationResource(applicationId, obj);
               descriptor.accept(rdv);
               resources.addResource(new SingletonObjectFactory<AbstractResourceDescriptor>(descriptor, obj));
            }
            else
            {
               LOG.warn("Unknown class type: " + clazz.getName() + " found in " + applicationId);
            }
         }
      }
      Set<Class<?>> classes = app.getClasses();
      if (classes != null && classes.size() > 0)
      {
         for (Class clazz : classes)
         {
            if (clazz.getAnnotation(Provider.class) != null)
            {
               if (ContextResolver.class.isAssignableFrom(clazz))
                  appProviders.addContextResolver(clazz);
               if (ExceptionMapper.class.isAssignableFrom(clazz))
                  appProviders.addExceptionMapper(clazz);
               if (MessageBodyReader.class.isAssignableFrom(clazz))
                  appProviders.addMessageBodyReader(clazz);
               if (MessageBodyWriter.class.isAssignableFrom(clazz))
                  appProviders.addMessageBodyWriter(clazz);
            }
            else if (clazz.getAnnotation(Filter.class) != null)
            {
               if (MethodInvokerFilter.class.isAssignableFrom(clazz))
                  appProviders.addMethodInvokerFilter(clazz);
               if (RequestFilter.class.isAssignableFrom(clazz))
                  appProviders.addRequestFilter(clazz);
               if (ResponseFilter.class.isAssignableFrom(clazz))
                  appProviders.addResponseFilter(clazz);
            }
            else if (clazz.getAnnotation(Path.class) != null)
            {
               AbstractResourceDescriptor descriptor = new ApplicationResource(applicationId, clazz);
               descriptor.accept(rdv);
               resources.addResource(new PerRequestObjectFactory<AbstractResourceDescriptor>(descriptor));
            }
            else
            {
               LOG.warn("Unknown class type: " + clazz.getName() + " found in: " + applicationId);
View Full Code Here

            if (obj instanceof ResponseFilter)
               appProviders.addResponseFilter((ResponseFilter)obj);
         }
         else if (clazz.getAnnotation(Path.class) != null)
         {
            AbstractResourceDescriptor descriptor = new ApplicationResource(applicationId, obj);
            descriptor.accept(rdv);
            resources.addResource(new SingletonObjectFactory<AbstractResourceDescriptor>(descriptor, obj));
         }
         else
         {
            LOG.warn("Unknown class type: " + clazz.getName() + " found in " + applicationId);
         }
      }
      for (Class clazz : app.getClasses())
      {
         if (clazz.getAnnotation(Provider.class) != null)
         {
            if (ContextResolver.class.isAssignableFrom(clazz))
               appProviders.addContextResolver(clazz);
            if (ExceptionMapper.class.isAssignableFrom(clazz))
               appProviders.addExceptionMapper(clazz);
            if (MessageBodyReader.class.isAssignableFrom(clazz))
               appProviders.addMessageBodyReader(clazz);
            if (MessageBodyWriter.class.isAssignableFrom(clazz))
               appProviders.addMessageBodyWriter(clazz);
         }
         else if (clazz.getAnnotation(Filter.class) != null)
         {
            if (MethodInvokerFilter.class.isAssignableFrom(clazz))
               appProviders.addMethodInvokerFilter(clazz);
            if (RequestFilter.class.isAssignableFrom(clazz))
               appProviders.addRequestFilter(clazz);
            if (ResponseFilter.class.isAssignableFrom(clazz))
               appProviders.addResponseFilter(clazz);
         }
         else if (clazz.getAnnotation(Path.class) != null)
         {
            AbstractResourceDescriptor descriptor = new ApplicationResource(applicationId, clazz);
            descriptor.accept(rdv);
            resources.addResource(new PerRequestObjectFactory<AbstractResourceDescriptor>(descriptor));
         }
         else
         {
            LOG.warn("Unknown class type: " + clazz.getName() + " found in: " + applicationId);
View Full Code Here

TOP

Related Classes of org.exoplatform.services.rest.impl.resource.ApplicationResource

Copyright © 2018 www.massapicom. 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.