Questions tagged [alfresco-webscripts]

Web scripts provide a way to write small extensions to Alfresco using JavaScript and FreeMarker.

Alfresco web scripts provide a unique way to programmatically interact with the Alfresco content application server. Unlike other interfaces exposed by Alfresco, web scripts offer a RESTful API for the content residing in the content repository. The REST (Representational State Transfer) web architecture is based on HTTP requests and responses, URIs (Uniform Resource Identifiers), and document types. Web scripts let you implement your own RESTful API without tooling or Java knowledge, requiring only a text editor. This approach to developing an Alfresco API means that web scripts offer many advantages over existing technologies, including ease and speed of development, and flexibility in API design. By focusing on the RESTful architectural style, web scripts let you build custom URI-identified and HTTP accessible content management web services backed by the Alfresco content application server.

Web scripts provide RESTful access to content held within your Alfresco content repository. You can place controls on your content to manage it and provide uniform access for a wide variety of client applications and services, such as a browser, portal, search engine, or custom application. Because of the inherent distributed nature of this interface, all Alfresco content repositories within the enterprise can resemble one logical collection of inter-related documents (like the web), letting you apply web technologies such as caching, authentication, proxies, and negotiation to your repository resources.

You can build your own RESTful interface using lightweight scripting technologies (such as JavaScript and FreeMarker), allowing you to arbitrarily map any content in the repository to resources on the web, or you can use out-of-the-box web scripts that already encapsulate many of the mappings. The Alfresco CMIS (Content Management Interoperability Services) AtomPub binding is implemented as a series of web scripts.

You can use web scripts for various solutions, such as:

  • Integrating Alfresco with third party systems Providing feeds
  • Developing data services Developing UI services such as portlets
  • Customizing search Acting as a back-end to client tools, such as
  • Orbeon Forms Integrating with Microsoft Office
  • Developing Facebook applications
  • Building UI components in Alfresco Surf

Source: http://docs.alfresco.com/5.1/concepts/ws-overview.html

352 questions
0
votes
1 answer

Remotely update properties “cmis:creationDate and cmis:lastModificationDate”

I need to update the ReadOnly properties on alfresco like 'cm:creator or cm:created' so I create a java-backed webscript: public void onUpdateProperties(NodeRef nodeRef, Map before, Map after) { …
Sfayn
  • 190
  • 1
  • 2
  • 13
0
votes
1 answer

Root object Alfresco "session.getTicket()" "sessionticket.getTicket()"

I'm trying to use session.getTicket() to obtain the authentication ticket of alfresco. But I get "session is not defined" I try too sessionticket.getTicket() and gives me the same error. Any help?
PRVS
  • 1,612
  • 4
  • 38
  • 75
0
votes
1 answer

org.alfresco.web.bean.repository.Repository; this class is not found in alfresco maven project how can i fix this

'org.alfresco.web.bean.repository.Repository' this class is not found in alfresco maven project how can i fix it. SearchParameters parameters = new…
Arjun Patil
  • 111
  • 9
0
votes
1 answer

Getting user home folder through alfresco rest api

Using Alfresco web scripts I can login and get ticket but I can't find any script to get user home folder. I can get folders inside another folder using below script: GET…
0
votes
1 answer

Alfresco - Call page (Share Webscript) on JAVA class (Repository) for workflow

Context: I have a webpage with an applet in the Share side. The webpage can be seen through the link localhost:8080/share/page/hdp/ws/my-page?file=nodeRefOfFile Problem: I define a custom workflow. I want integrate this applet in the workflow for…
PRVS
  • 1,612
  • 4
  • 38
  • 75
0
votes
1 answer

access java backed webscript from javascript webscript

I'm really new to alfresco development. I have a java backed web-script which use to access global properties and get some values in json format. I need to access these values in share java-script web-script since I need to do few validations in…
paul
  • 37
  • 4
0
votes
1 answer

why does the group EVERYONE need to have permissions on the company home folder in alfresco

As soon as I take away EVERYONE from the root folder (Company Home) in alfresco, some custom webscripts stop working and respond that this folder cannot be found. I would like to give a subset of EVERYONE (eg GROUP_A) permission from the rootfolder…
0
votes
1 answer

Extension of Alfresco - tomcat/shared/

I'm making an extension (ALL-IN ONE Extension) for Alfresco that I install in Alfresco's and makes the modifications on folder's alfresco_install/tomcat/webapps/share and alfresco_install/tomcat/webapps/alfresco . Exists a way to change a file…
PRVS
  • 1,612
  • 4
  • 38
  • 75
0
votes
1 answer

Alfresco connector error

I'm trying to do a connector to get a file. I receive the path of the file by args like : var filePath = args["file"] If I print this, I get the path correctly. But in the connector I have: var connector = remote.connect("alfresco"); result =…
0
votes
1 answer

File indexing in alfresco solr

I am using alfresco community 5.0.d and solr4. Is there a way to index a file in alfresco solr manually through web scritps by turning of the solr tracking?. Whenever a file/folder is created or modified can we selectively index only those changes…
0
votes
1 answer

Alfresco: Get list of nodes with updated ACL/permission

I am exploring Alfresco Web scripts and CMIS API's, and looking for an API or some way to figure out the nodes whose ACL/permission is modified after some specified time/timestamp in Alfresco. I am able to get nodes with modified metadata using CMIS…
ms_27
  • 1,484
  • 15
  • 22
0
votes
1 answer

Web script groovy - Alfresco

I'm trying to make a web script in groovy and run that web script on Alfresco. But, i don't know how to. I read tutorials but I haven't come to any conclusion... Anyone knows all steps to run a web script in groovy ? Which files I need? My idea is…
PRVS
  • 1,612
  • 4
  • 38
  • 75
0
votes
2 answers

Alfresco webscript (js) and pagination

I have a question about the good way to use pagination with Alfresco. I know the documentation (https://wiki.alfresco.com/wiki/4.0_JavaScript_API#Search_API) and I use with success the query part. I mean by that that I use the parameters maxItems…
Akah
  • 1,890
  • 20
  • 28
0
votes
0 answers

Save a document in Alfresco shared folder via Rest API

I'm try to upload a file to the shared folder... This is my code. // using httpclient-4.5 Path filePath = Paths.get("C:/afile.txt"); String ticket = getTicket(); // get a ticket via /alfresco/service/api/login... CloseableHttpClient client =…
0
votes
1 answer

How do I make a programatically changed site dashboard refresh without restarting the Alfresco/Tomcat service?

I've created a web-script module extension and have verified that it works correctly. What it does is takes the dashboard.xml and related page.component-X-Y.type~id~dashboard.xml files from one site, deletes all dashboard related files on another…
vane
  • 2,125
  • 1
  • 21
  • 40