CMIS + PHP + Aspect
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2012 06:09 AM
HI 🙂
Im working in a migration to Alfresco; using CMIS and PHP. Uploading is easy and quick, when i upload to a folder (space) ive set up a rule so it gets an aspect. The problem comes when i have to set properties of that aspect using CMIS and PHP (im using PHP because i have no idea nor experience in java).
Googleing i discovered <<alfresco-opencmis-extension-0.3.zip>> that is ment for this kind or situations, but i couldnt find any info about it for PHP. Im allso not 100% sure of what to do to "install" the JAR file for it to work in Alfresco.
Any help with this issue will be appreciated. Even more a few lines of PHP code that deals with aspects.
Thanks in advance!
**brief** i fetch info from a cms (files and properties) and i upload them to Alfresco. Alfresco has a rule that sets an aspect automatically. Untill now all works fine, but i havent found a way to set the properties of that aspect in every file that is uploaded.
Im working in a migration to Alfresco; using CMIS and PHP. Uploading is easy and quick, when i upload to a folder (space) ive set up a rule so it gets an aspect. The problem comes when i have to set properties of that aspect using CMIS and PHP (im using PHP because i have no idea nor experience in java).
Googleing i discovered <<alfresco-opencmis-extension-0.3.zip>> that is ment for this kind or situations, but i couldnt find any info about it for PHP. Im allso not 100% sure of what to do to "install" the JAR file for it to work in Alfresco.
Any help with this issue will be appreciated. Even more a few lines of PHP code that deals with aspects.
Thanks in advance!
**brief** i fetch info from a cms (files and properties) and i upload them to Alfresco. Alfresco has a rule that sets an aspect automatically. Untill now all works fine, but i havent found a way to set the properties of that aspect in every file that is uploaded.
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2012 06:05 AM
I wont mind using Types. Actually ive tried to set a Type using CMIS and PHP and it works fine. But again i cant figure out how to set up the properties of a Type.
Thanks for ant help.
Thanks for ant help.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2012 08:48 AM
Setting aspect-defined properties via the Apache Chemistry PHP CMIS API is not supported at this time. As you noted, if you define your properties in types you can do it.
You might want to take a look at:
https://svn.apache.org/repos/asf/chemistry/phpclient/trunk/examples/cmis_set_properties.php
To see if it helps you figure out how to do it. You can also look at the documentation for the OpenCMIS (the Java API) and for cmislib (the Python API) to see how those API's handle properties.
Under the covers, both cmislib and the PHP API use the AtomPub binding so you can also look at the spec to understand how properties work.
Ultimately, you are handing a map of CMIS property names (like "cmis:name") and values (like "foobar.txt") to the updateProperties function.
Jeff
You might want to take a look at:
https://svn.apache.org/repos/asf/chemistry/phpclient/trunk/examples/cmis_set_properties.php
To see if it helps you figure out how to do it. You can also look at the documentation for the OpenCMIS (the Java API) and for cmislib (the Python API) to see how those API's handle properties.
Under the covers, both cmislib and the PHP API use the AtomPub binding so you can also look at the spec to understand how properties work.
Ultimately, you are handing a map of CMIS property names (like "cmis:name") and values (like "foobar.txt") to the updateProperties function.
Jeff

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2012 01:17 PM
Hello,
I am doing some work to generate a PHP library for CMIS and specifically for Alfresco. It is based on the standard SOAP extension within PHP5.
It's not complete yet, but it will support the full Alfresco functionality, including aspects. Let me know if this is of interest for you.
thanks
Karsten
I am doing some work to generate a PHP library for CMIS and specifically for Alfresco. It is based on the standard SOAP extension within PHP5.
It's not complete yet, but it will support the full Alfresco functionality, including aspects. Let me know if this is of interest for you.
thanks
Karsten
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2012 02:28 PM
Hopefully this is the SOAP binding of CMIS? I would strongly recommend against using the "old" native Web Services API if you can avoid it.
Honestly, if I had a vote, I'd rather see people contribute to the existing CMIS PHP API in Apache Chemistry (Rich McKnight could use the help) to add support for aspects in the same way that the OpenCMIS Alfresco Extension did for OpenCMIS (Java) or the alfcmislib extension did for cmislib (Python).
Also, in a few months time we will be releasing an official "Public" API. This API is REST based and made up mostly of CMIS plus REST URLs that fill the gaps between CMIS and the rest of Alfresco's functionality. So a really worthwhile client-side project would be to create a PHP library that was a set of client-side objects that make use of that API.
Jeff
Honestly, if I had a vote, I'd rather see people contribute to the existing CMIS PHP API in Apache Chemistry (Rich McKnight could use the help) to add support for aspects in the same way that the OpenCMIS Alfresco Extension did for OpenCMIS (Java) or the alfcmislib extension did for cmislib (Python).
Also, in a few months time we will be releasing an official "Public" API. This API is REST based and made up mostly of CMIS plus REST URLs that fill the gaps between CMIS and the rest of Alfresco's functionality. So a really worthwhile client-side project would be to create a PHP library that was a set of client-side objects that make use of that API.
Jeff
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2016 05:50 AM
Also, in a few months time we will be releasing an official "Public" API. This API is REST based and made up mostly of CMIS plus REST URLs that fill the gaps between CMIS and the rest of Alfresco's functionality. So a really worthwhile client-side project would be to create a PHP library that was a set of client-side objects that make use of that API.
What is the name of the API that you say?
If I want to use CMIS PHP API (Apache Chemistry) what things I can't to do with this API? And what I've to do if I wont to complete it?
What is the name of the API that you say?
If I want to use CMIS PHP API (Apache Chemistry) what things I can't to do with this API? And what I've to do if I wont to complete it?
