Examples of ResourceProvider


Examples of org.linkedin.util.io.resource.internal.ResourceProvider

    }

    // case when the URI points directly to the jar resource
    try
    {
      ResourceProvider provider =
        new JarResourceProvider(factory.createResource(uri));

      return provider.createResource("/").createRelative(path);
    }
    catch(UnsupportedURIException e)
    {
      URISyntaxException ex = new URISyntaxException(uri.toString(), "cannot create resource");
      ex.initCause(e);
View Full Code Here

Examples of org.restlet.ext.osgi.ResourceProvider

  @Test
  public void testFinder()
  {
    ApplicationProvider applicationProvider = new TestApplicationProvider();
    RouterProvider routerProvider = new RouterProvider();
    ResourceProvider resourceProvider = new TestResourceProvider();
    applicationProvider.bindRouterProvider(routerProvider);
    routerProvider.bindResourceProvider(resourceProvider);

    testHarness.addApplication(applicationProvider);
View Full Code Here

Examples of org.structr.rest.ResourceProvider

  // FIXME: this method is needed by the websocket search command because there is no reference node for the above method
  public List<GraphObject> getData(final SecurityContext securityContext, final RenderContext renderContext, final String restQuery) throws FrameworkException {

    Map<Pattern, Class<? extends Resource>> resourceMap = new LinkedHashMap<>();

    ResourceProvider resourceProvider = renderContext == null ? null : renderContext.getResourceProvider();
    if (resourceProvider == null) {
      try {
        resourceProvider = UiResourceProvider.class.newInstance();
      } catch (Throwable t) {
        logger.log(Level.SEVERE, "Couldn't establish a resource provider", t);
        return Collections.EMPTY_LIST;
      }
    }

    // inject resources
    resourceMap.putAll(resourceProvider.getResources());

    Value<String> propertyView = new ThreadLocalPropertyView();
    propertyView.set(securityContext, PropertyView.Ui);

    // initialize variables
View Full Code Here

Examples of org.webmacro.broker.ResourceProvider

                /*
                 * Instantiate Turbine's TemplateProvider.
                 */
                Log.debug("Loading TurbineTemplateProvider");
                Class c = Class.forName(WMTemplateProvider);
                ResourceProvider provider = (ResourceProvider)c.newInstance();

                /*
                 * Register the provider with the broker.
                 */
                Log.debug("Registering TurbineTemplateProvider with WebMacro");
View Full Code Here

Examples of railo.commons.io.res.ResourceProvider

    /**
     * @return return System directory
     */
    public static Resource getSystemDirectory() {
        String pathes=System.getProperty("java.library.path");
        ResourceProvider fr = ResourcesImpl.getFileResourceProvider();
        if(pathes!=null) {
            String[] arr=ListUtil.toStringArrayEL(ListUtil.listToArray(pathes,File.pathSeparatorChar));
            for(int i=0;i<arr.length;i++) {   
                if(arr[i].toLowerCase().indexOf("windows\\system")!=-1) {
                    Resource file = fr.getResource(arr[i]);
                    if(file.exists() && file.isDirectory() && file.isWriteable()) return ResourceUtil.getCanonicalResourceEL(file);
                   
                }
            }
            for(int i=0;i<arr.length;i++) {   
                if(arr[i].toLowerCase().indexOf("windows")!=-1) {
                  Resource file = fr.getResource(arr[i]);
                    if(file.exists() && file.isDirectory() && file.isWriteable()) return ResourceUtil.getCanonicalResourceEL(file);
                   
                }
            }
            for(int i=0;i<arr.length;i++) {   
                if(arr[i].toLowerCase().indexOf("winnt")!=-1) {
                  Resource file = fr.getResource(arr[i]);
                    if(file.exists() && file.isDirectory() && file.isWriteable()) return ResourceUtil.getCanonicalResourceEL(file);
                   
                }
            }
            for(int i=0;i<arr.length;i++) {   
                if(arr[i].toLowerCase().indexOf("win")!=-1) {
                  Resource file = fr.getResource(arr[i]);
                    if(file.exists() && file.isDirectory() && file.isWriteable()) return ResourceUtil.getCanonicalResourceEL(file);
                   
                }
            }
            for(int i=0;i<arr.length;i++) {
              Resource file = fr.getResource(arr[i]);
                if(file.exists() && file.isDirectory() && file.isWriteable()) return ResourceUtil.getCanonicalResourceEL(file);
            }
        }
        return null;
    }
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.