Package com.cognifide.slice.api.provider

Examples of com.cognifide.slice.api.provider.ModelProvider


    }

    injector.pushContextProvider(contextProvider);

    try {
      final ModelProvider modelProvider = injector.getInstance(ModelProvider.class);
      final Resource resource = request.getResource();
      return (T) modelProvider.get(type, resource);
    } finally {
      injector.popContextProvider();
    }
  }
View Full Code Here


      throw new IllegalStateException("Guice injector not found: " + injectorName);
    }

    injector.pushContextProvider(contextProvider);
    try {
      final ModelProvider modelProvider = injector.getInstance(ModelProvider.class);
      final Resource resource = request.getResource();
      return (T) modelProvider.get(type, resource);
    } finally {
      injector.popContextProvider();
    }
  }
View Full Code Here

    return injectModel(type, resource, getInjector(injectorName, resolver));
  }

  private static <T> T injectModel(Class<T> type, Resource resource, InjectorWithContext injector) {
    try {
      ModelProvider modelProvider = injector.getInstance(ModelProvider.class);
      return modelProvider.get(type, resource);
    } finally {
      injector.popContextProvider();
    }
  }
View Full Code Here

    }

    injector.pushContextProvider(contextProvider);

    try {
      final ModelProvider modelProvider = injector
          .getInstance(ModelProvider.class);
      final Resource resource = request.getResource();
      return (T) modelProvider.get(type, resource);
    } finally {
      injector.popContextProvider();
    }
  }
View Full Code Here

    }
    Resource resource = (Resource) adaptable;

    InjectorWithContext injector = getInjector(resource);
    try {
      ModelProvider modelProvider = injector.getInstance(ModelProvider.class);
      return modelProvider.get(type, resource);
    } finally {
      injector.popContextProvider();
    }
  }
View Full Code Here

TOP

Related Classes of com.cognifide.slice.api.provider.ModelProvider

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.