Examples of dir()


Examples of org.bladerunnerjs.model.ThemedAssetLocation.dir()

      else if(assetContainer instanceof Blade) {
        Blade blade = (Blade) assetContainer;
        Bladeset bladeset = blade.parent();
        if (assetLocation instanceof ThemedAssetLocation && assetLocationParentDir.getName().equals("themes")) {
            ThemedAssetLocation theme = (ThemedAssetLocation) assetLocation;
            String resourcePath = RelativePathUtility.get(root.getFileInfoAccessor(), theme.dir(), imageFile);
           
            targetPath = cssResourceContentPathParser.createRequest(CssResourceContentPlugin.BLADE_THEME_REQUEST, bladeset.getName(), blade.getName(), theme.dir().getName(), resourcePath);
        } else {
          String resourcePath = RelativePathUtility.get(root.getFileInfoAccessor(), blade.dir(), imageFile);
          targetPath = cssResourceContentPathParser.createRequest(CssResourceContentPlugin.BLADE_RESOURCE_REQUEST, bladeset.getName(), blade.getName(), resourcePath);
View Full Code Here

Examples of org.bladerunnerjs.model.ThemedAssetLocation.dir()

        Bladeset bladeset = blade.parent();
        if (assetLocation instanceof ThemedAssetLocation && assetLocationParentDir.getName().equals("themes")) {
            ThemedAssetLocation theme = (ThemedAssetLocation) assetLocation;
            String resourcePath = RelativePathUtility.get(root.getFileInfoAccessor(), theme.dir(), imageFile);
           
            targetPath = cssResourceContentPathParser.createRequest(CssResourceContentPlugin.BLADE_THEME_REQUEST, bladeset.getName(), blade.getName(), theme.dir().getName(), resourcePath);
        } else {
          String resourcePath = RelativePathUtility.get(root.getFileInfoAccessor(), blade.dir(), imageFile);
          targetPath = cssResourceContentPathParser.createRequest(CssResourceContentPlugin.BLADE_RESOURCE_REQUEST, bladeset.getName(), blade.getName(), resourcePath);
        }
      }
View Full Code Here

Examples of org.bladerunnerjs.model.Workbench.dir()

       
        if (assetLocation instanceof ThemedAssetLocation && assetLocationParentDir.getName().equals("themes")) {
          String resourcePath = RelativePathUtility.get(root.getFileInfoAccessor(), assetLocation.file("resources"), imageFile);
          targetPath = cssResourceContentPathParser.createRequest(CssResourceContentPlugin.WORKBENCH_RESOURCE_REQUEST, bladeset.getName(), blade.getName(), resourcePath);
        } else {
          String resourcePath = RelativePathUtility.get(root.getFileInfoAccessor(), workbench.dir(), imageFile);
          targetPath = cssResourceContentPathParser.createRequest(CssResourceContentPlugin.WORKBENCH_RESOURCE_REQUEST, bladeset.getName(), blade.getName(), resourcePath);
        }
      }
      else if(assetContainer instanceof JsLib) {
        JsLib jsLib = (JsLib) assetContainer;
View Full Code Here

Examples of org.bladerunnerjs.model.engine.Node.dir()

  @Test
  public void fileShouldBeASubPathOfTheGivenDir()
  {
    Node node = new TestNode(mockRootNode, null, new File(TEST_DIR));
   
    assertEquals(new File(node.dir(), "path/to-file").getAbsolutePath(), node.file("path/to-file").getAbsolutePath());
  }
 
  @Test
  public void fileShouldReturnAnUnrootedFileIfDirIsNull()
  {
View Full Code Here

Examples of org.bladerunnerjs.model.engine.Node.dir()

    TestRootNode rootNode = new TestRootNode(new File(TEST_DIR, "brjs-root-node"));
    Node childNode1 = rootNode.childNode("1");
   
    assertSame(childNode1, rootNode.childNode("1"));
    assertSame(childNode1, rootNode.locateAncestorNodeOfClass(rootNode.childNode("1").grandChildNode("2").dir(), TestChildNode.class));
    assertNotSame(childNode1, new TestChildNode(rootNode, childNode1.parentNode(), childNode1.dir(), "1"));
  }
 
  @Test
  public void cachedNonExistentItemsWillLaterBeUsedIfTheItemSubsequentlyComesIntoExistence() throws Exception
  {
View Full Code Here

Examples of org.bladerunnerjs.model.engine.Node.dir()

    itemDir.mkdirs();
    TestRootNode rootNode = new TestRootNode(rootDir);
    rootNode.registerNode(rootNode);
   
    Node singleItemNode = rootNode.locateAncestorNodeOfClass(itemDir, TestItemNode.class);
    assertEquals(itemDir.getCanonicalPath(), singleItemNode.dir().getPath());
  }
 
  @Test
  public void nonExistentMultiLocationSingleItemNodesCanBeNavigated() throws Exception
  {
View Full Code Here

Examples of org.bladerunnerjs.model.engine.Node.dir()

   
    TestRootNode rootNode = new TestRootNode(rootDir);
    rootNode.registerNode(rootNode);
    Node itemNode = rootNode.locateAncestorNodeOfClass(primaryItemDir, TestMultiLocationItemNode.class);
   
    assertEquals(primaryItemDir.getCanonicalPath(), itemNode.dir().getPath());
  }
 
  @Test
  public void multiLocationSingleItemNodesCanBeLocatedWhenAtTheSecondaryLocation() throws Exception
  {
View Full Code Here

Examples of org.bladerunnerjs.model.engine.Node.dir()

   
    TestRootNode rootNode = new TestRootNode(rootDir);
    rootNode.registerNode(rootNode);
    Node itemNode = rootNode.locateAncestorNodeOfClass(secondaryItemDir, TestMultiLocationItemNode.class);
   
    assertEquals(secondaryItemDir.getCanonicalPath(), itemNode.dir().getPath());
  }
 
  @Test
  public void multiLocationItemSetNodesCanBeNavigatedWhenItemsPresentInOneSideOnly() throws Exception
  {
View Full Code Here

Examples of org.geoserver.platform.resource.Resource.dir()

            } catch (IOException e) {
                base = null;
            }
           
            Resource baseResource = mock(Resource.class);
            when(baseResource.dir()).thenReturn(base);

            this.resourceStore = mock(ResourceStore.class);
            when(resourceStore.get(Paths.BASE)).thenReturn(baseResource);

            when(catalogBuilder.catalog.getResourceLoader())
View Full Code Here

Examples of org.geoserver.platform.resource.Resource.dir()

        public ResourcesBuilder directory(final String path) {
            Resource r = mock(Resource.class);
            when(r.path()).thenReturn(path);
            when(r.name()).thenReturn(path.substring(path.lastIndexOf('/')+1));
            when(r.getType()).thenReturn(Type.DIRECTORY);
            when(r.dir()).then( new Answer<File>() {
                @Override
                public File answer(InvocationOnMock invocation) throws Throwable {
                    File dir = new File(base,path);
                    dir.mkdirs();
                    return dir;
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.