protected UpdateResult[] CreateNode(string parentId, string parentPath, string nodeType) { UpdateResult[] result = null; var parent = new RepositoryWebService.ParentReference( spacesStore, parentId, parentPath, Constants.ASSOC_CONTAINS, Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, name) ); //build properties BuildCustomProperties(); //create operation CMLCreate create = new CMLCreate(); create.id = "1"; create.parent = parent; create.type = nodeType; // Constants.TYPE_CONTENT; create.property = properties; //build the CML object CML cml = new CML(); cml.create = new CMLCreate[] { create }; //perform a CML update to create the node result = WebServiceFactory.getRepositoryService().update(cml); return(result); }
protected RepositoryWebService.ParentReference createParentReference(string uuidNode, string assocType, string assocName) { RepositoryWebService.ParentReference parentReference = new RepositoryWebService.ParentReference(); parentReference.associationType = assocType; parentReference.childName = assocName; parentReference.store = new RepositoryWebService.Store(RepositoryWebService.StoreEnum.workspace, Constants.SPACES_STORE); parentReference.uuid = uuidNode; return(parentReference); }
protected RepositoryWebService.ParentReference createParentReference(string uuidNode, string assocType, string assocName) { RepositoryWebService.ParentReference parentReference = new RepositoryWebService.ParentReference(); parentReference.associationType = assocType; parentReference.childName = assocName; parentReference.store = new RepositoryWebService.Store(RepositoryWebService.StoreEnum.workspace, Constants.SPACES_STORE); parentReference.uuid = uuidNode; return parentReference; }
protected UpdateResult[] CreateNode(string parentId, string parentPath, string nodeType) { UpdateResult[] result = null; var parent = new RepositoryWebService.ParentReference( spacesStore, parentId, parentPath, Constants.ASSOC_CONTAINS, Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, name) ); //build properties BuildCustomProperties(); //create operation CMLCreate create = new CMLCreate(); create.id = "1"; create.parent = parent; create.type = nodeType;// Constants.TYPE_CONTENT; create.property = properties; //build the CML object CML cml = new CML(); cml.create = new CMLCreate[] { create }; //perform a CML update to create the node result = WebServiceFactory.getRepositoryService().update(cml); return result; }