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
1
vote
1 answer

How to hide/show sets in [alfresco] form control

I want to how i can hide this 'set' if its field is empty and show this set if its field has any value.
1
vote
1 answer

Alfresco - Calendar event using server-side javascript

How to create calendar event using server-side javascript code?
Sanjay
  • 2,481
  • 1
  • 13
  • 28
1
vote
0 answers

I want to audit search parameters used in alfresco search form

I want to audit search parameters used in alfresco search form. I am using version : Alfresco Enterprise v5.1.1 If i search jbong then in alfresco log i want to see something like…
1
vote
1 answer

Getting a pdf for an Alfresco Java Webscript Controller

I'm trying to build a simple Webscript Endpoint in Alfresco that gets a pdf using a Java Webscript controller. We eventually want to expand this endpoint to take multiple pdfs and do some manipulation, but for right now we are just trying to read in…
Alex Parker
  • 125
  • 1
  • 11
1
vote
2 answers

How to correctly customise search.get.js in Alfresco?

I'm using Alfresco Enterprise 6.2. Actual changes I need to make belongs to the search.lib.js This is an import in the search.get.js. I tried modifying search.lib.js itself and had no effect. So I populated the import in the search.get.js and…
BlueStar
  • 401
  • 3
  • 9
  • 29
1
vote
2 answers

Getting exception - issue Caused by: java.lang.IllegalArgumentException: clientName is a mandatory parameter?

I have implemented this https://github.com/FlexSolution/AlfrescoResetPassword Only taken the code of alfresco - I have angular as front end When I request for password reset it's giving me exception. 2020-02-25 16:39:12,435 ERROR…
Vikash Patel
  • 1,328
  • 9
  • 28
1
vote
1 answer

Creating tags in subfolder when adding a new tag on the parent folder

So im trying to add new tags on my subfolders/files when updating or adding a new tag on the parent folder, im using this code but the tagNodeRef seems to not have the correct information, i cant debugg it since i dont have acess to the aplication…
1
vote
0 answers

Remove all workflow instances in Alfresco 5.1

I'm purging all unused content on old server Alfresco 5.1. Now in Alfresco database is about 15 000 completed and active workflows associated with documents. I would find out how to remove these workflows instances. I tried to use standard command…
1
vote
0 answers

Alfresco creating PDF rendition from PPTX File

I'm POSTing to /alfresco/api/-default-/public/alfresco/versions/1/nodes/c31b9572-7d9e-4b50-a2ae-62b69c156cd3/renditions with the body {"id":"pdf"} and getting a 400 error back: {"error":{"errorKey":"Unable to create thumbnail 'pdf' for…
daniel0mullins
  • 1,937
  • 5
  • 21
  • 45
1
vote
1 answer

Alfresco pickerchildren.get.js is missing in codes

I'm having a problem in locating webscript in Alfresco 4.2c. I need to extend its functionality. I found and edited pickerresults.ftl but to see the changes I need to locate it in src files in the repository. I found it extracted in tomcat directory…
lucaskos
  • 67
  • 9
1
vote
1 answer

Unit test cases for Java Controller based Webscripts in Alfresco

I plan to unit test the webscripts that had Java as controllers. I have found two approaches. 1) Go along the lines of bootstrap code HelloWorldWebScriptControllerTest.java 2) Follow https://github.com/Alfresco/alfresco-remote-api. Here, the test…
Sara
  • 603
  • 8
  • 19
1
vote
1 answer

Alfresco Share Form - submission-url with nodeRef (or other dynamic values)

I have a form defined in share-config-custom.xml and have supplied a submission-url so that I can handle some custom stuff whilst editing the node. I have noticed that the nodeRef of the node being edited with the form is not supplied to the backend…
StephenL
  • 122
  • 1
  • 11
1
vote
1 answer

How do I create an Alfresco site programmatically from a repository webscript?

I've implemented an Alfresco repository webscript (in Java) to programmatically create a new site. I notice that there's a SiteService interface which I thought could be used to do this - SiteInfo site = siteService.createSite("site-dashboard",…
Andrew Fielden
  • 3,751
  • 3
  • 31
  • 47
1
vote
1 answer

How to redirect an Alfresco webscript to a different response page

I've defined an Alfresco Repo Webscript, implemented in Java, which copies a template folder structure into a site's document repository. The Freemarker HTML template for this webscript is trivial

Your request was…

Andrew Fielden
  • 3,751
  • 3
  • 31
  • 47
1
vote
1 answer

Cannot create a new Group in alfresco using the REST API (/groups) POST

Greetings to the community! I am trying to create a new user group on alfresco using the REST API following this guide https://api-explorer.alfresco.com/api-explorer/#!/groups/createGroup. I am using Postman to make the REST calls. I have…
NickAth
  • 1,089
  • 1
  • 14
  • 35