cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco API and Web Services

tonizz
Champ in-the-making
Champ in-the-making
Which is the difference between using native alfresco api and web services api ???

I am developing a web portal with servlets that fetchs data and contents from alfresco. Right now, I get them from CIFS but I think that using an API is a most clever solution.

What do you think about it??

Do you know where can I found documentation about these API's??

Thanks in advance.
5 REPLIES 5

jonas
Champ in-the-making
Champ in-the-making
Hi,

There are possible solutions:

1) using foundation services plus your own UI;

2) using web services plus your own UI;

For the first, here is an example

http://docs.cignex.com/
(admin/admin by default)

For the second one, you can check Liferay alfresco content.

Here are sample codes

Alfresco Content
UI: Add content: Alfresco Content
Link: com.liferay.portlet.alfrescocontent.util.AlfrescoContentUtil
org.alfresco.webservice.* at alfresco_client.jar
URL: PropsUtil.ALFRESCO_CONTENT_SERVER_URL;
Page: portal/portal-web/html/portlet/alfresco_content/init.jsp
Portlet Type: Struts portlet at portal/portal-ejb/src
com.liferay.portlet.alfrescocontent.action
com.liferay.portlet.alfrescocontent.util

llin
Champ in-the-making
Champ in-the-making
Hi jonas,

For the example http://docs.cignex.com/, do you know if "Helpful Link" is an custom type with properties "Link Name" and "Link URL" in Alfresco? How is it set up?

Thanks for your help.

Ally

jonas
Champ in-the-making
Champ in-the-making
Hi

Yes, you can. Here is an example

<!– Helpful Link Type –>
    <type name="cd:helpfullink">
      <title>Helpful Link</title>
      <parent>cm:content</parent>
      <properties>
         <property name="cd:linkName">
            <title>Link Name</title>
            <type>d:text</type>
            <mandatory>true</mandatory>
         </property>
         <property name="cd:linkURL">
            <title>Link URL</title>
            <type>d:text</type>
            <mandatory>true</mandatory>
         </property>
      </properties>
</type>

Finally, in your web client config, tell UI how to use it.

llin
Champ in-the-making
Champ in-the-making
Hello jonas,

Thank you for your reply. I still got a question about cm:content.

Since cm:content is the parent of cd:helpfullink, I got the impression that cm:content always has a "content" pointing to actual content (a file). That is, in Alfresco when creating/adding content, either create a file in-line or upload a file. For URL, how should I deal with the "content" in my application?

Could you help me with this question? Thanks a lot.

Ally

jonas
Champ in-the-making
Champ in-the-making
Hi

cd:helpfullink is a special content type - no real content, only has some special properties. When we handle helpfullink content type, only proterties are in need.

If you use Alfresco web client UI, you need to re-configure content type and related beans - to make sure that the beans only handle properties, no content file.

Good luck.