Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMLCreate create = new CMLCreate();
- create.setParent(destinationFolder);
- create.setAssociationType(Constants.ASSOC_CONTAINS);
- if (isFolder) {
- //it`s a link of folder type
- create.setType("{http://www.alfresco.org/model/application/1.0}folderlink");
- }else{
- create.setType("{http://www.alfresco.org/model/application/1.0}filelink");
- }
- create.setProperty(prop);
- create.setChildName("Childname");
- CML cml = new CML();
- cml.setCreate(new CMLCreate[] { create });
- RepositoryServiceSoapBindingStub repositoryServiceSoapBindingStub =
- WebServiceFactory.getRepositoryService();
- result = repositoryServiceSoapBindingStub.update(cml);
- if(result.length > 0 ){
- isSuccess = true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement