alfresco

Get Alfresco NodeRef by path (real-time, race condition safe)

≡放荡痞女 提交于 2019-12-12 02:22:19
问题 I want to get the NodeRef of a document (or space) stored in Alfresco. My code is in Java, running within Alfresco (for instance in an AMP). My code needs to be safe against race conditions, for instance it must find nodes that have been created a second before. In this context, the usual methods (search-based) can not be used. How to do? 回答1: You need to avoid anything that touches SOLR, as those APIs are only Eventually Consistent Specifically, you need an API that's based on canned queries

Alfresco Solr SearchService.query() error parsing Xpath

…衆ロ難τιáo~ 提交于 2019-12-12 01:32:56
问题 I'm trying to query for some files in Alfresco using SearchService; my idea is: 1) get folder's noderef where I want to search in for files 2) then get noderef's path via NodeService 3) finally query Solar via SearchService to find files in that specific path The problem raises when querying to Solr, I get the following exception: ERROR [solr.core.SolrCore] [http-bio-8443-exec-1] org.apache.solr.common.SolrException: org.apache.lucene.queryParser.ParseException: **Cannot parse** 'PATH:"/{http

Alfresco task listener variables

别来无恙 提交于 2019-12-12 01:23:17
问题 I have two task listeners,the first on event="create" the second on event="complete" . In the first i'm counting files when task was created, in the second when task completed and looking if the number of files is equal throw an error. But this not work, i have ReferenceError: "count" is not defined . <extensionElements> <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string><![CDATA[

Download Document from alfresco using opencmis

守給你的承諾、 提交于 2019-12-12 01:22:04
问题 I want to download document from alfresco using path but i am getting content length null and image can be downloaded in browser but nothing is displaying. Can anybody point out what i am doing wrong. import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.DataInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; import java.util.HashMap; import java.util.Map; import javax.servlet

Create shortcut of Folder or Document in Alfresco

烈酒焚心 提交于 2019-12-12 01:08:59
问题 My requirement is to create shortcut of one folder or document into another folder. For example lets say I have a folder called A and in this folder I have many documents. Now I want to create shortcut of this folder into another folder name B. So basically I don't want to store same content in folder B, it's contains link or reference of folder A. Whatever change made in folder A, it has to be reflected to folder B also. So any one please help me how to do it alfresco using apache chemistry.

How to access values from alfresco-global.properties in freemarker and YUI javascript files

时光怂恿深爱的人放手 提交于 2019-12-12 00:08:37
问题 I have numerous custom variables in Alfresco's alfresco-global.properties file that I'd like to use throughout various freemarker ftl files as well as the various YUI files, which will greatly alter the behavior of Share and how it displays information. I have the property values accessible through various javascript calls (for example, getNetworkName() will return the custom app.network.name variable set in the properties), but I am uncertain of how I'd expose these javascript functions to

Alfresco file uploader - how does it work?

耗尽温柔 提交于 2019-12-11 22:38:11
问题 My alfresco install(on Ubuntu 10.04.2 LTS Server) is failing to upload files via /share . for small files, the progress bar goes to 100% put later fails (after pausing for 2 minutes). There are no exceptions in the logs. How does the upload process work? Is there a port i need to enable on Linux? EDIT I can upload file on my dev box(Ubuntu 10.10) accessing (http://locahostORip-address:8080/share), it only fails if i copy over to the UAT env. 回答1: So you're using the flash-uploader. Is your

Prevent Aspect from being added in Alfresco Share

…衆ロ難τιáo~ 提交于 2019-12-11 20:15:08
问题 Most tutorials don't take this into account, but I suppose there are many occasions where a node doesn't meet all requirements for a custom aspect. The only way I found for this to occur is to develop a behavior, and in beforeAddAspect throw an Alfresco runtime exception. Which is happening by registering a before add aspect categorically as FIRST_EVENT this.beforeAddAspect = new JavaBehaviour(this, BEFORE_ADD_ASPECT, NotificationFrequency.FIRST_EVENT); And then throwing the error itself:

How to retrieve a content of Alfresco workflow?

こ雲淡風輕ζ 提交于 2019-12-11 19:23:15
问题 I have a workflow where I have audio content. I need to access for this content in other application (with javascript). I am trying with a GET method to this URL: http://localhost:8086/alfresco/service/cmis/s/SpacesStore/i/1a7be6f8-0c50-4995-a211-1736642db06a/children?alf_ticket=TICKET_f9906d69befbc49668b92ddf372d62532a29ce7d (In this URL, the id "1a7be6f8-0c50-4995-a211-1736642db06a" is the identificator of the package of the workflow task.) But, the response is the next XML: <?xml version=

Public Share link in Alfresco Community edition 4

对着背影说爱祢 提交于 2019-12-11 17:39:48
问题 I saw that the Alfresco Cloud edition has nice share/publish features: (source: alfresco.com) Now I could not find this in the community edition, even though I found a place in the Admin Console under Content Publishing called Channel Manager where you can add different publish channels. I did not find a way to make use of them though! Still my main question would be how to be able to generate public links for non users to access certain files. Thanks! 回答1: The Alfresco Cloud is very new (it