cancel
Showing results for 
Search instead for 
Did you mean: 

How to add an aspect using ALFRESCO API?

debi
Champ in-the-making
Champ in-the-making
Hi,
I would like to know how to add an aspect to a node using ALFRESCO API. Can anyone help me on this?
Thanking in advance,
Debi.
3 REPLIES 3

mikeh
Star Contributor
Star Contributor
Which API? Alfresco supports lots of them!

http://wiki.alfresco.com/wiki/Developer_Guide

Thanks,
Mike

jpotts
World-Class Innovator
World-Class Innovator
Take your pick:

Java Foundation API
nodeService.addAspect(nodeRef, aspectQName, props);
JavaScript API
document.addAspect(aspectQName, props);
Web Services API
CMLAddAspect addWebableAspectToDoc = new CMLAddAspect(Constants.createQNameString(SomeCoModel.NAMESPACE_SOMECO_CONTENT_MODEL, SomeCoModel.ASPECT_SC_WEBABLE), null, null, "ref1");
// Construct CML Block
CML cml = new CML();
cml.setUpdate(new CMLUpdate[] {updateDoc});
cml.setAddAspect(new CMLAddAspect[] {addWebableAspectToDoc});
// Execute CML Block
UpdateResult[] results = WebServiceFactory.getRepositoryService().update(cml);

Jeff

amurad
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to add aspect using asp.net page. how can I use the web service API?
what is the url?


Thanks in advance