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 QUERY API, but regarding only ACL/permission modification its not working.
For now, I am crawling all nodes and checking its modification date with respect to earlier/last crawl datetime. This doesn't seem to be a proper approach.
For more details, here is the link of query posted earlier on alfresco forum:Fetch the list of nodes whose permission is updated/modified
Could anyone please assist.
I have figured out the solution, using CMISChangeLog application, which need to be enabled on Alfresco server. Also, with the help of CMIS 1.1 Atom Api's, the CMIS change log query works fine on both the Alfresco version, 4.x and 5.x.
Related
I am using Alfresco Community 201707 x64. My application is querying the repository via CMIS, using Apache Chemistry Open CMIS 1.1.
The question, as the title suggests, is: when querying the repository for document content (using the CONTAINS predicate on the search query), how do I retrieve a document's relevant context? Can I do it using CMIS, or do I have to use a different approach?
For example, in Alfresco Share, when a user searches the repository for documents containing some word, the relevant results are displayed with a snippet of the document's content with said word highlighted.
I do not think this is available in CMIS, it is however generally available if using SOLR, depending on Alfresco version.
http://docs.alfresco.com/5.2/concepts/search-api-highlight.html
As said by #Lista,
It is a new feature coming with Alfresco 5.2.1 : http://docs.alfresco.com/5.2/concepts/search-api-highlight.html
You can use it by making a call to the /search endpoint :
The Search API provides access to the search features of Alfresco
Content Services.
The Search API accepts POST requests containing JSON structures as
described in the table below. The JSON is structured to group options
related to different query concepts together.
The Search API is defined under the search namespace. It uses the
/search endpoint, which does not accept any URL parameters and is
therefore, completely controlled via the parameters in a POST body.
But as far as I know, this is not possible to do it by CMIS. Can you switch the way you are interacting with Alfresco (the REST way) ?
I want to build a JavaEE GED application using alfresco and activiti Workflow engine which manages and monitors the mail of an organization (Letter, Fax, mail etc.). Since I am new with alfresco I want to know the best way to communicate with alfresco in my case : the use of CMIS or web scripts (I'm building a third-party application ) .
I can suggest two solutions using Using the REST API or CMIS with a library like Apache Chemistry
Apache Chemistry is very well documented and you can find good pointers on the official website for pretty much any thing you would want to do !
If you want to get a session from your Alfresco Repository for example follow this post : How to retrieve 'repository root' id/children from CMIS repository?
Alternatively, you can find a lot of resources around for interacting with alfresco using REST (either the new REST API, or old restful endpoints). Check the platform integrations portal from the official docs, it would be a very good starting point.
Please help me to get/set metadata by REST API Calls.I am Using Alfresco 5.0 version.
Unfortunately the Alfresco REST API is limited to a small subset wich doesn't support (custom) metadata. Alfresco expects you use CMIS instead. Since CMIS may be too complicated / an overkill to integrate in your use case you could still create your own WebScripts to enable RESTful methods as you expect. This is straight forward. Take a look into the Web_Scripts_Examples and the official Web Scripts Documentation
You can find details of all existing rest api on below link
http://host:port/alfresco/service/index/all
If the api does not exist on above than you need to create your custom one.I am not sure about metadata.But you can find it on above link.
Newcomer to Alfresco and Web Development here, so bear with me. I've so far installed Alfresco and was able to use the Maven AMP archetype to create my own custom content model for the data I need to store in it. Now I need to access this data from an external site by querying the Alfresco repository.
I've followed what I can find on CMIS and was able to execute a query using curl and get the results I expect in a large XML stream. My colleague was having an uphill battle trying to interpret these results using Coldfusion. Now I searched around, and understand that to interpret these results and make the process a bit easier, it is better to use some kind of client like Open CMIS (or Chemistry, I'm still a bit confused on the terminology here).
We've so far tried the the PHP client, but received some errors from the xmlLoad function not reading 'nbsp' characters. PHP seemed like the easiest version to implement, though we're considering moving to Java if that works better. However, we've seen very scarce documentation on either end. Are there some better examples that we may have missed or maybe some other way to do this? Seems like this should be simple to implement, yet it's given us quite the stall due to the brick wall that Alfresco and CMIS seem to be.
If you don't want to use a library, the CMIS Browser Binding might work better for you. It returns JSON instead of XML.
Try:
http://<host>/alfresco/api/-default-/public/cmis/versions/1.1/browser?cmisselector=query&succinct=true&q=SELECT * FROM cmis:document
Shouldn't be a brick wall at all. Here are some resources:
The custom content types tutorial has a section on CMIS,
including CMIS queries which may be helpful to you even if you do not need custom types
The CMIS & Apache Chemistry book from
Manning is a good resource (disclosure: Florian and I co-authored it
along with another colleague, Jay Brown)
There are some Java examples on Google Code
There are additional resources and helpful links on the Alfresco CMIS page
I've not dug into the details of what and how SDL Tridion is storing data in it's internal search engine (SOLR), but I need to build a GUI extension that needs to perform searching on component/metadata fields across publications.
I can't see any reason not to have a look into SOLR, but before I invest the time, does anyone know any reason why this would be a bad idea?
Thanks in advance!
It's a bad idea in general to bypass the API and directly query SOLR.
From your question, I see no reason to do so.
Do you need to index more data than what is already indexed by Tridion?
If not, surely you can just search using the API?
If you do, you could consider implementing a custom Search Indexing Handler for the additional data. Although this is not very well documented at the moment, it seem rather straight forward to create (implement ISearchIndexingHandler and update your CM and SOLR configuration). The benefit would be that your data can also be searched for using the standard Tridion search.
It really depends on your search requirements. If it's just about simple search - then it's probably fine, but if you want to make some Tridion specific searches then it will be quite difficult as SDL Tridion does a lot of post processing on SOLR results. Why can't you just use CoreService and have a convenient supported search interface?
As Peter said, its really a bad idea to interact with SOLR that comes with Tridion. Tridion has a abstraction layer to hide complexity of SOLR query. For example tridion hides case sensivity of the search keyword.
I strongly recommend to use tridion search api to build ur interface. Tridion search api also supports executing solr query directly. But its not recommended.
For indexing additional data u can implement ISearchIndexingHandler. It has some complexity with the solr config files (adding new fields).