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 resolve CORS error in alfresco webscripts in alfresco sdk?

I have created a alfresco webscript which can be accessed using thus url : http://localhost:9191/alfresco/s/search/item/{itemIid} e.g. : http://localhost:9191/alfresco/s/search/item/it0001 when i hit directly from the browser address bar it work…
madhepurian
  • 271
  • 1
  • 13
1
vote
1 answer

How to get all the site feeds from alfresco site?

1.Below lines of codes returning max 30 feeds only siteFeeds = activityService.getSiteFeedEntries("testSite"); 2.Below lines of codes returning max 30 feeds only. List activityFeedEntities =…
madhepurian
  • 271
  • 1
  • 13
1
vote
1 answer

Uploader plus is not working for perticular site in Alfresco

I have multiple sites in Alfresco, uploader plus is working fine for other sites except one, throws an exception and error pop up says "operation failure". uploader plus is working fine for the individual folders. but issue comes when we are…
Deepak Talape
  • 997
  • 1
  • 9
  • 35
1
vote
0 answers

How to start a workflow and pass in it values from associations

I have a ready-made requester that contains the data of an already running workflow. I need to implement the copying of this workflow. That is, a new workflow must be created that will contain data from the requester, including properties and…
Kun Aguero
  • 25
  • 3
1
vote
1 answer

WebScript for uploading files: during the first upload one extra version created

To upload files to the repository, I use the following Java-backed WebScript: public class CustomFileUploader extends DeclarativeWebScript { private static final String FIRM_DOC = "{http://www.firm.com/model/content/1.0}doc"; private static…
user1134181
1
vote
1 answer

HTTP request from alfresco javascript file

I am new in alfresco and I create a rule that execute a javascript file when a file arrives in a directory (My javascript it inside data dictionnary script file). However, this javascript script must send a http get request to a remote server but I…
1
vote
1 answer

Remove folder in Alfresco Share

I have created a js file to create folders when creating an event in Alfresco. But the problem is, when I create an event on the Alfresco site, it will automatically create a folder in a shared folder. That's a problem because when updating an…
user9438510
1
vote
0 answers

After consolidating 3 different alfresco application, OOTB search is not working

I have consolidated 3 different alfresco application, initially we have 3 separate applications in alfresco. but now we have consolidated those 3 applications and all applications repository layer code is running on single instance and there are 3…
Deepak Talape
  • 997
  • 1
  • 9
  • 35
1
vote
1 answer

Alfresco 5.0.d - org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedException: Unauthorized

I am using OOTB alfresco 5.0.d with no modification in alfresco code. After every 2-3 days after restart, the system starts throwing "CmisUnauthorizedException: Unauthorized" when trying to upload a document through we scripts but works fine from…
PANKAJ SHARMA
  • 53
  • 1
  • 7
1
vote
0 answers

Get the status of the the node(created,modified or deleted) in the same script

I have a script that gets triggered when something is updated or inserted or deleted in alfresco . And only the Node ID of the changed node is passed to my application's backend. Here, since only the Node ID is passed, I am not able to distinguish…
Nilanjana
  • 121
  • 2
  • 12
1
vote
1 answer

Migrate content from one alfresco repository to other after up-gradation

We are upgrading from alfresco 5.0.1 to alfresco 5.2.2. Actually it's not just upgradation, but it's a consolidation of 3 different projects. Currently we have 3 projects in alfresco. 1st one is in alfresco 5.0.1, 2nd one is in alfresco 5.2 and 3rd…
Deepak Talape
  • 997
  • 1
  • 9
  • 35
1
vote
1 answer

Alfresco webscript. List all folders, subfolders, and files

I have been working on a webscript that will spit back all folders, subfolders, and files via an Alfresco webscript. My current JavaScript model: // search for folder within Alfresco content repository var folder =…
1
vote
2 answers

Get Alfresco folder NodeRef using SearchService, LANGUAGE_CMIS

I have a java backed webscript. I use SearchService method to get the NodeRef of a folder stored in the Alfresco repository in this PATH: /app:company_home/app:dictionary/app:models\ I used the LANGUAGE_CMIS_STRICT in the searchService method like…
nmalloul
  • 83
  • 1
  • 11
1
vote
1 answer

How to edit modified and modifier properties in Alfresco using Java

I am trying to set the modifier and modified properties with the custom values in Alfresco using java webscript. I am using the below code for achieving this: try{ behaviourFilter.disableBehaviour(mainNodeRef, ContentModel.ASPECT_AUDITABLE); …
1
vote
1 answer

How to disable Records Management doclib actions for particular site

I need to disable records management doclib actions like "Declare as a record, Declare version as record etc" in share document library browse and document details pages for a particular custom document site. Please help me with this. Thanks in…