cancel
Showing results for 
Search instead for 
Did you mean: 

Make changes in ScriptNode.java

sanketgosavi
Champ in-the-making
Champ in-the-making
How can i make changes in ScriptNode.java and where i have to configure the changed custom java file of ScriptNode.java


Thanks,
Sanket
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
Its just a java file.   Change it and rebuild alfresco.

However you shouldn't lightly hack the Java Script API since that will probably prevent you from upgrading in future.   Its probably a better idea to add your own root scoped object to do whatever needs doing.

afaust
Legendary Innovator
Legendary Innovator
Hello,

obvious answer first: Don't modify ScriptNode.java to implement some use-case requirement. Work with it, e.g. by using it in Repository-tier JavaScript - and work around any subjectively felt limitation by using other Services / root scope objects.

The only place to change ScriptNode.java would be in a forked / checked out branch of the Alfresco SVN / Git in the projects/repository sub-tree, and then re-build the alfresco-repository.jar for that project. This then needs to replace the alfresco-repository.jar from the vanilla WAR.

THe above explains how it can be done. By no means do I encourage you to actually do this. As in my first answer, try to work around any limitations by adding your own code / script extensions to complement ScriptNode.

Regards
Axel

sanketgosavi
Champ in-the-making
Champ in-the-making
Please suggest the steps
I want to move the file without authentication