cancel
Showing results for 
Search instead for 
Did you mean: 

adding link via alfresco java API

shay
Champ in-the-making
Champ in-the-making
Hi,

I need to add a link to a space in another existing space in the alfresco.
the only example i found on the net is a web services example but i'm using the java API.

does anyone got an example of adding link via the java APIs?
or can you give me some guidelines for how i should do it?

Thanks in advance,
Shay.
3 REPLIES 3

itayh
Champ in-the-making
Champ in-the-making
I am having the same problem. Does anyone have a solution?

kevinr
Star Contributor
Star Contributor
Download the Alfresco 2.0 SDK, take a look at the code for the following class in web-client project:
org.alfresco.web.bean.clipboard.WorkspaceClipboardItem
and examine the paste() method - it has the code to create the link object for folders and content objects.

Hope this helps,

Kevin

shay
Champ in-the-making
Champ in-the-making
Hi kevin,

Thank you for your coment.

do you have any other simple code example for the copy/paste of link?

i tried to use the WorkspaceClipboardItem itself (instead of taking example from the WorkspaceClipboardItem code) but i'm having problem about some of the arguments:

public boolean paste(FacesContext fc, String viewId, int action)

what should i pass to the FacesContext?
how do i direct the paste function to the space which i desire to paste the link into?

Shay.