Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.75 KB | None | 0 0
  1.             CMLCreate create = new CMLCreate();
  2.             create.setParent(destinationFolder);
  3.             create.setAssociationType(Constants.ASSOC_CONTAINS);
  4.             if (isFolder) {
  5.                 //it`s a link of folder type
  6.                 create.setType("{http://www.alfresco.org/model/application/1.0}folderlink");
  7.             }else{
  8.                 create.setType("{http://www.alfresco.org/model/application/1.0}filelink");
  9.             }
  10.             create.setProperty(prop);
  11.             create.setChildName("Childname");
  12.  
  13.             CML cml = new CML();
  14.             cml.setCreate(new CMLCreate[] { create });
  15.        
  16.             RepositoryServiceSoapBindingStub repositoryServiceSoapBindingStub =
  17.                     WebServiceFactory.getRepositoryService();
  18.             result = repositoryServiceSoapBindingStub.update(cml);
  19.          
  20.             if(result.length > 0 ){
  21.                 isSuccess = true;
  22.             }
  23.  
  24.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement