02-06-2008 10:37 AM
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
// Create the CML structure
// When executed this cml update query will create a new content node beneth the tutorial folder and the add the
// versionable aspect to the newly created node
ParentReference parentReference = new ParentReference(STORE, null, "/app:company_home/cm:sample_folder", Constants.ASSOC_CONTAINS, Constants.ASSOC_CONTAINS);
NamedValue[] properties = new NamedValue[]{Utils.createNamedValue(Constants.PROP_NAME, System.currentTimeMillis() + "_WebServiceSample4.txt")};
CMLCreate create = new CMLCreate("id1", parentReference, null, null, null, Constants.TYPE_CONTENT, properties);
CMLAddAspect addAspect = new CMLAddAspect(Constants.ASPECT_VERSIONABLE, null, null, "id1");
CML cml = new CML();
cml.setCreate(new CMLCreate[]{create});
cml.setAddAspect(new CMLAddAspect[]{addAspect});
// Execute the update
UpdateResult[] updateResults = repositoryService.update(cml);
02-07-2008 04:43 AM
UpdateResult[] updateResults = repositoryService.update(cml);
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.