How to find a nodeid for certain folder? - alfresco

Junior developer here. I've been trying make a method that checks that a certain path exist and checks the nodeId of the last folder of the past. For example company_home/hr/junior_developer. I mean I need to find what is the nodeId of the junior_developer folder. I've been trying with this https://docs.alfresco.com/4.2/references/API-JS-findNode.html but I am unable to make this work. Could someone help me?

Related

Get files from sharepoint

My goal is to get files from sharepoint for every x minute based on their names and if possible also on creation/modified datetime. I have a link to sharepoint where files are stored. I was unsucsefully trying to find some example on internet but haven't found yet. Can I get some advice from you how this might be approached please.

Scilab - Atoms - how to use it?

I am new to Scilab. I want to cluster a dataset. I installed the external module 'CLUSTER' & also loaded it. Unfortunately, I don't know how to use it. I can find the description of the module but I could not find how to call it and use it.
Could you please tell me how I can use the atoms module?
Its help can be entered by calling help for one of its functions, for instance
--> help CMeans
Then you can get the module's summary and navigate through its pages with the help path at the top of each page. There are runable examples in the pages.

JarOutputStream creating a 'bad' jar

http://pastebin.com/qrSCZw3y
I made that so I can create jars whenever I want by doing:
Builder jarBuilder = new Builder("jarname.jar");
jarBuilder.createNewFile();
But, whenever I do that, it creates a jar, and when I click on the jar, I get this message:
http://i.imgur.com/SvPZcZv.png
I want the generated jar to say something like "Hello world" or whatever I define.
Please help me, as I've searched all across the internet, but there were no video tutorials, and the documentations that I found online didn't help me much either.
Thank you,
I know how to create a .jar file, but I don't know how to make it have custom settings user defined from my jframe.

How to search document in specified folder with Alfresco

I want to search documents in specified folder. I mean ,as in below case, searching documents of mainfolder1.
How can I do this?? With lucene possible?? I know lucene can specify store. I don't know about folder.
-->company home
---->mainfolder1
------->doc1
------->doc2
---->mainfolder2
Looks like
+PATH:"/app:company_home/cm:mainfolder1//."
is what you want in your search expression.
The full glory details about Alfresco search in general in path queries in particular are at http://wiki.alfresco.com/wiki/Search#Path_Queries
Correct is
PATH:"/app:company_home/cm:mainfolder1/*"
as you do not need to search nodes at any depth but only direct children of main folder1.
You can find additional explanations here
http://alfrescoblog.com/2014/07/09/alfresco-lucene-tutorial/

Drupal: getting attached files from nid and field name

In Drupal 7.x, given a nid and a file field name, I'm trying to get the files (as $fid or objects) which have been uploaded as file attachments to that node.
Drupal will populate the uploaded files only when they are set as "displayed" but I need to do this for all the files of that field, no matters how they display setting is.
I've spent quite some time investigating into this but the new d7 file api looks pretty obscure from a documentation and code point of view. IMHO, too much "drupal magic" happening there for a fast understanding.
Any pointer to good documentation and/or suggestion on the solution greatly appreciated.
Thanks.
Although your question seems a little unclear to me, but according to me:
you want to get all the files attached to a node. Just do $node = node_load($nid); and then check your $node->field_name['LANGUAGE_NONE'/lang code]
This will give you an array of files uploaded using that filefield.
Thanks

Resources