private void button1_Click(object sender, EventArgs e) { ListViewItem item = listViewBrowse.SelectedItems[0]; if (item != null) { ResultSetRowNode node = item.Tag as ResultSetRowNode; if (node != null) { if (node.type.Contains("folder") == false) { // Create the reference for the node selected Alfresco.AuthoringWebService.Store spacesStore2 = new Alfresco.AuthoringWebService.Store(); spacesStore2.scheme = Alfresco.AuthoringWebService.StoreEnum.workspace; spacesStore2.address = "SpacesStore"; Alfresco.AuthoringWebService.Reference reference = new Alfresco.AuthoringWebService.Reference(); reference.store = spacesStore2; reference.uuid = node.id; // Lets try to check out Alfresco.AuthoringWebService.Predicate predicate = new Alfresco.AuthoringWebService.Predicate(); predicate.Items = new Object[] { reference }; Alfresco.AuthoringWebService.ParentReference pr = new Alfresco.AuthoringWebService.ParentReference(); pr.store = spacesStore2;; pr.uuid = this.currentReference.uuid; pr.associationType = Constants.ASSOC_CONTAINS; pr.childName = Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, item.Text); this.authoringService.checkout(predicate, pr); int i = 0; } else { } } } }
private void button1_Click(object sender, EventArgs e) { ListViewItem item = listViewBrowse.SelectedItems[0]; if (item != null) { ResultSetRowNode node = item.Tag as ResultSetRowNode; if (node != null) { if (node.type.Contains("folder") == false) { // Create the reference for the node selected Alfresco.AuthoringWebService.Store spacesStore2 = new Alfresco.AuthoringWebService.Store(); spacesStore2.scheme = Alfresco.AuthoringWebService.StoreEnum.workspace; spacesStore2.address = "SpacesStore"; Alfresco.AuthoringWebService.Reference reference = new Alfresco.AuthoringWebService.Reference(); reference.store = spacesStore2; reference.uuid = node.id; // Lets try to check out Alfresco.AuthoringWebService.Predicate predicate = new Alfresco.AuthoringWebService.Predicate(); predicate.Items = new Object[] { reference }; Alfresco.AuthoringWebService.ParentReference pr = new Alfresco.AuthoringWebService.ParentReference(); pr.store = spacesStore2; ; pr.uuid = this.currentReference.uuid; pr.associationType = Constants.ASSOC_CONTAINS; pr.childName = Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, item.Text); this.authoringService.checkout(predicate, pr); int i = 0; } else { } } } }
/// <remarks/> public void checkoutAsync(Predicate items, ParentReference destination) { this.checkoutAsync(items, destination, null); }
/// <remarks/> public void checkoutAsync(Predicate items, ParentReference destination, object userState) { if ((this.checkoutOperationCompleted == null)) { this.checkoutOperationCompleted = new System.Threading.SendOrPostCallback(this.OncheckoutOperationCompleted); } this.InvokeAsync("checkout", new object[] { items, destination}, this.checkoutOperationCompleted, userState); }
public CheckoutResult checkout(Predicate items, ParentReference destination) { object[] results = this.Invoke("checkout", new object[] { items, destination}); return ((CheckoutResult)(results[0])); }