AnsweredAssumed Answered

Java Backed Web Scripts

Question asked by yvinodh on Sep 9, 2008
Latest reply on Jan 3, 2011 by premium93
Hi all,

i am trying to execute the example in Java Backed Webscripts which is given in the below link..

http://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples#RandomSelectWebScript.java

In this example they have extended the AbstractRepositoryWebScript class. where is this class be available ? Do i want to include any jars files to execute this script..?

When i am trying to compile this java file.. i am getting the errors like this..

RandomSelectWebScript.java:23: cannot find symbol
symbol: class AbstractRepositoryWebScript
public class RandomSelectWebScript extends AbstractRepositoryWebScript
                                           ^
RandomSelectWebScript.java:42: cannot find symbol
symbol  : variable services
location: class org.alfresco.demoscripts.RandomSelectWebScript
        List<FileInfo> files = this.services.getFileFolderService().listFiles(rootNodeRef);
                               ^
RandomSelectWebScript.java:88: cannot find symbol
symbol  : variable repository
location: class org.alfresco.demoscripts.RandomSelectWebScript
                NodeRef companyHomeRef = this.repository.getCompanyHome();
                                         ^
RandomSelectWebScript.java:89: cannot find symbol
symbol  : method getFileFolderService()
location: class org.alfresco.demoscripts.RandomSelectWebScript
                nodeRef = getFileFolderService().resolveNamePath(companyHomeRef, pathElements).getNodeRef();
                          ^
RandomSelectWebScript.java:105: cannot find symbol
symbol  : variable services
location: class org.alfresco.demoscripts.RandomSelectWebScript
        ContentReader reader = this.services.getContentService().getReader(nodeRef, ContentModel.PROP_CONTENT);
                               ^
5 errors

What should i wanna do to execute this java file and run this script successfully…?


Thanks in Advance,
Vinodh

Outcomes