Jahia in English > Can't resolve method

0 (0 Good)
0 (0 Bad)

Can't resolve method

by  omglion »  2014/07/14 02:24

Hello, everybody,

I am reading the external exsample codes:

  1. public void saveItem(ExternalData data) throws RepositoryException {
  2. try {
  3. ExtendedNodeType nodeType = NodeTypeRegistry.getInstance().getNodeType(data.getType());
  4. if (nodeType.isNodeType(Constants.NT_RESOURCE)) {
  5. OutputStream outputStream = null;
  6. try {
  7. final Binary[] binaries = data.getBinaryProperties().get(Constants.JCR_DATA);
  8. if (binaries.length > 0) {
  9. outputStream = getFile(data.getPath().substring(0, data.getPath().indexOf("/" + Constants.JCR_CONTENT))).getContent().getOutputStream();
  10. for (Binary binary : binaries) {
  11. InputStream stream = null;
  12. try {
  13. stream = binary.getStream();
  14. IOUtils.copy(stream, outputStream);
  15. } finally {
  16. IOUtils.closeQuietly(stream);
  17. binary.dispose();
  18. }
  19. }
  20. }
  21. } catch (IOException e) {
  22. throw new PathNotFoundException("I/O on file : " + data.getPath(),e);
  23. } catch (RepositoryException e) {
  24. throw new PathNotFoundException("unable to get outputStream of : " + data.getPath(),e);
  25. } finally {
  26. IOUtils.closeQuietly(outputStream);
  27. }
  28. } else if (nodeType.isNodeType("jnt:folder")) {
  29. try {
  30. getFile(data.getPath()).createFolder();
  31. } catch (FileSystemException e) {
  32. throw new PathNotFoundException(e);
  33. }
  34. }
  35. } catch (NoSuchNodeTypeException e) {
  36. throw new PathNotFoundException(e);
  37. }
  38. }

Could you please tell me the dependecies that i shoud add into pom.xml?

Now I can not resolve the method getFile(....), getContent at line 9.

Thanks.

Kindly regards

Lion

 

 

 

  • Can't resolve method
    2014/07/14 02:24

    omglion <p>Hello, everybody,</p> <p>I am reading the external exsample codes:</p> <ol class="linenums" style="padding-right: 0px; padding-left: 0px; margin: 0px 0px 0px 33px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; line-height: 20px; white-space: pre-wrap;"> <li class="L0" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="kwd" style="color: rgb(30, 52, 123);">public</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">void</span><span class="pln" style="color: rgb(72, 72, 76);"> saveItem</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">ExternalData</span><span class="pln" style="color: rgb(72, 72, 76);"> data</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">throws</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">RepositoryException</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></li> <li class="L1" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="kwd" style="color: rgb(30, 52, 123);">try</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></li> <li class="L2" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="typ" style="color: teal;">ExtendedNodeType</span><span class="pln" style="color: rgb(72, 72, 76);"> nodeType </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">NodeTypeRegistry</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">getInstance</span><span class="pun" style="color: rgb(147, 161, 161);">().</span><span class="pln" style="color: rgb(72, 72, 76);">getNodeType</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">data</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">getType</span><span class="pun" style="color: rgb(147, 161, 161);">());</span></li> <li class="L3" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="kwd" style="color: rgb(30, 52, 123);">if</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">nodeType</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">isNodeType</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">Constants</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">NT_RESOURCE</span><span class="pun" style="color: rgb(147, 161, 161);">))</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></li> <li class="L4" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="typ" style="color: teal;">OutputStream</span><span class="pln" style="color: rgb(72, 72, 76);"> outputStream </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">null</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></li> <li class="L5" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="kwd" style="color: rgb(30, 52, 123);">try</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></li> <li class="L6" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="kwd" style="color: rgb(30, 52, 123);">final</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">Binary</span><span class="pun" style="color: rgb(147, 161, 161);">[]</span><span class="pln" style="color: rgb(72, 72, 76);"> binaries </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> data</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">getBinaryProperties</span><span class="pun" style="color: rgb(147, 161, 161);">().</span><span class="kwd" style="color: rgb(30, 52, 123);">get</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">Constants</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">JCR_DATA</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></li> <li class="L7" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="kwd" style="color: rgb(30, 52, 123);">if</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">binaries</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">length </span><span class="pun" style="color: rgb(147, 161, 161);">&gt;</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="lit" style="color: rgb(25, 95, 145);">0</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></li> <li class="L8" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pln" style="color: rgb(72, 72, 76);">outputStream </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> getFile</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">data</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">getPath</span><span class="pun" style="color: rgb(147, 161, 161);">().</span><span class="pln" style="color: rgb(72, 72, 76);">substring</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="lit" style="color: rgb(25, 95, 145);">0</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> data</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">getPath</span><span class="pun" style="color: rgb(147, 161, 161);">().</span><span class="pln" style="color: rgb(72, 72, 76);">indexOf</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">&quot;/&quot;</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">+</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">Constants</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">JCR_CONTENT</span><span class="pun" style="color: rgb(147, 161, 161);">))).</span><span class="pln" style="color: rgb(72, 72, 76);">getContent</span><span class="pun" style="color: rgb(147, 161, 161);">().</span><span class="pln" style="color: rgb(72, 72, 76);">getOutputStream</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></li> <li class="L9" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="kwd" style="color: rgb(30, 52, 123);">for</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">Binary</span><span class="pln" style="color: rgb(72, 72, 76);"> binary </span><span class="pun" style="color: rgb(147, 161, 161);">:</span><span class="pln" style="color: rgb(72, 72, 76);"> binaries</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></li> <li class="L0" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="typ" style="color: teal;">InputStream</span><span class="pln" style="color: rgb(72, 72, 76);"> stream </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">null</span><span class="pun" style="color: rgb(147, 161, 161);">;</span></li> <li class="L1" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="kwd" style="color: rgb(30, 52, 123);">try</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></li> <li class="L2" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pln" style="color: rgb(72, 72, 76);">stream </span><span class="pun" style="color: rgb(147, 161, 161);">=</span><span class="pln" style="color: rgb(72, 72, 76);"> binary</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">getStream</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></li> <li class="L3" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="typ" style="color: teal;">IOUtils</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">copy</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">stream</span><span class="pun" style="color: rgb(147, 161, 161);">,</span><span class="pln" style="color: rgb(72, 72, 76);"> outputStream</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></li> <li class="L4" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pun" style="color: rgb(147, 161, 161);">}</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">finally</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></li> <li class="L5" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="typ" style="color: teal;">IOUtils</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">closeQuietly</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">stream</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></li> <li class="L6" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pln" style="color: rgb(72, 72, 76);">binary</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">dispose</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></li> <li class="L7" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pun" style="color: rgb(147, 161, 161);">}</span></li> <li class="L8" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pun" style="color: rgb(147, 161, 161);">}</span></li> <li class="L9" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pun" style="color: rgb(147, 161, 161);">}</span></li> <li class="L0" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pun" style="color: rgb(147, 161, 161);">}</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">catch</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">IOException</span><span class="pln" style="color: rgb(72, 72, 76);"> e</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></li> <li class="L1" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="kwd" style="color: rgb(30, 52, 123);">throw</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">PathNotFoundException</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">&quot;I/O on file : &quot;</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">+</span><span class="pln" style="color: rgb(72, 72, 76);"> data</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">getPath</span><span class="pun" style="color: rgb(147, 161, 161);">(),</span><span class="pln" style="color: rgb(72, 72, 76);">e</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></li> <li class="L2" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pun" style="color: rgb(147, 161, 161);">}</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">catch</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">RepositoryException</span><span class="pln" style="color: rgb(72, 72, 76);"> e</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></li> <li class="L3" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="kwd" style="color: rgb(30, 52, 123);">throw</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">PathNotFoundException</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">&quot;unable to get outputStream of : &quot;</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">+</span><span class="pln" style="color: rgb(72, 72, 76);"> data</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">getPath</span><span class="pun" style="color: rgb(147, 161, 161);">(),</span><span class="pln" style="color: rgb(72, 72, 76);">e</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></li> <li class="L4" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pun" style="color: rgb(147, 161, 161);">}</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">finally</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></li> <li class="L5" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="typ" style="color: teal;">IOUtils</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">closeQuietly</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">outputStream</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></li> <li class="L6" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pun" style="color: rgb(147, 161, 161);">}</span></li> <li class="L7" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pun" style="color: rgb(147, 161, 161);">}</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">else</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">if</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">nodeType</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">isNodeType</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="str" style="color: rgb(221, 17, 68);">&quot;jnt:folder&quot;</span><span class="pun" style="color: rgb(147, 161, 161);">))</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></li> <li class="L8" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="kwd" style="color: rgb(30, 52, 123);">try</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></li> <li class="L9" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pln" style="color: rgb(72, 72, 76);">getFile</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">data</span><span class="pun" style="color: rgb(147, 161, 161);">.</span><span class="pln" style="color: rgb(72, 72, 76);">getPath</span><span class="pun" style="color: rgb(147, 161, 161);">()).</span><span class="pln" style="color: rgb(72, 72, 76);">createFolder</span><span class="pun" style="color: rgb(147, 161, 161);">();</span></li> <li class="L0" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pun" style="color: rgb(147, 161, 161);">}</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">catch</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">FileSystemException</span><span class="pln" style="color: rgb(72, 72, 76);"> e</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></li> <li class="L1" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="kwd" style="color: rgb(30, 52, 123);">throw</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">PathNotFoundException</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">e</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></li> <li class="L2" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pun" style="color: rgb(147, 161, 161);">}</span></li> <li class="L3" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pun" style="color: rgb(147, 161, 161);">}</span></li> <li class="L4" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pun" style="color: rgb(147, 161, 161);">}</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">catch</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="typ" style="color: teal;">NoSuchNodeTypeException</span><span class="pln" style="color: rgb(72, 72, 76);"> e</span><span class="pun" style="color: rgb(147, 161, 161);">)</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="pun" style="color: rgb(147, 161, 161);">{</span></li> <li class="L5" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="kwd" style="color: rgb(30, 52, 123);">throw</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="kwd" style="color: rgb(30, 52, 123);">new</span><span class="pln" style="color: rgb(72, 72, 76);"> </span><span class="typ" style="color: teal;">PathNotFoundException</span><span class="pun" style="color: rgb(147, 161, 161);">(</span><span class="pln" style="color: rgb(72, 72, 76);">e</span><span class="pun" style="color: rgb(147, 161, 161);">);</span></li> <li class="L6" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pun" style="color: rgb(147, 161, 161);">}</span></li> <li class="L7" style="padding-left: 12px; color: rgb(190, 190, 197); text-shadow: rgb(255, 255, 255) 0px 1px 0px;"><span class="pun" style="color: rgb(147, 161, 161);">}</span></li> </ol> <p>Could you please tell me the dependecies that i shoud add into pom.xml?</p> <p>Now I can not resolve the method getFile(....), getContent at line 9.</p> <p>Thanks.</p> <p>Kindly regards</p> <p>Lion</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p>

  • Number of messages  27
    Registration date Jul 14, 2014
    0 (0 Good)
    0 (0 Bad)

    Re: Can't resolve method

    by  qlamerand »  2014/11/26 12:55

    Hello,
    This seems to be an excerpt from VFSDataSource (for the external data provider used to mount a folder from the file system in the JCR).
    The getFile method is defined in the same class.
    You can see it here : https://github.com/Jahia/external-provider/blob/master/vfs/src/main/java/org/jahia/modules/external/vfs/VFSDataSource.java
    Regards,
    Quentin

  • Re: Can't resolve method
    2014/11/26 12:55

    qlamerand <p>Hello,<br /> This seems to be an excerpt&nbsp;from VFSDataSource (for the external data provider used to mount a folder from the file system in the JCR).<br /> The getFile method is defined in the same class.<br /> You can see it here :&nbsp;<a href="https://github.com/Jahia/external-provider/blob/master/vfs/src/main/java/org/jahia/modules/external/vfs/VFSDataSource.java">https://github.com/Jahia/external-provider/blob/master/vfs/src/main/java/org/jahia/modules/external/vfs/VFSDataSource.java</a><br /> Regards,<br /> Quentin</p>

  • Number of messages  28
    Registration date Nov 26, 2014
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page