/// <summary> /// Double click event handler /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void listViewBrowse_DoubleClick(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") == true) { // Create the reference for the node selected Alfresco.RepositoryWebService.Reference reference = new Alfresco.RepositoryWebService.Reference(); reference.store = this.spacesStore; reference.uuid = node.id; // Parent references this.parentReferences.Add(this.currentReference); // Populate the list with the children of the selected node populateListBox(reference); } else { // Create the reference for the node selected Alfresco.ContentWebService.Store spacesStore2 = new Alfresco.ContentWebService.Store(); spacesStore2.scheme = Alfresco.ContentWebService.StoreEnum.workspace; spacesStore2.address = "SpacesStore"; Alfresco.ContentWebService.Reference reference = new Alfresco.ContentWebService.Reference(); reference.store = spacesStore2; reference.uuid = node.id; // Lets try and get the content Alfresco.ContentWebService.Predicate predicate = new Alfresco.ContentWebService.Predicate(); predicate.Items = new Object[] { reference }; Content[] contents = this.contentService.read(predicate, "{http://www.alfresco.org/model/content/1.0}content"); Content content = contents[0]; if (content.url != null && content.url.Length != 0) { string url = content.url + "?ticket=" + AuthenticationUtils.Ticket; webBrowser.Url = new Uri(url); } } } } }
private void button2_Click(object sender, EventArgs e) { Alfresco.RepositoryWebService.Store[] stores = this.repoService.getStores(); Alfresco.RepositoryWebService.Store vStore = stores[3]; 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; VersionHistory VH = this.authoringService.getVersionHistory(reference); int i = 0; char[] temp = new char[1]; temp[0] = '0'; string versions = new string(temp); Alfresco.AuthoringWebService.Version first; foreach (Alfresco.AuthoringWebService.Version version in VH.versions) { if (i == 0) { first = version; } versions += version.label + (";") + version.id.uuid + (";"); } { // Create the reference for the node selected Alfresco.ContentWebService.Store spacesStore3 = new Alfresco.ContentWebService.Store(); spacesStore3.scheme = Alfresco.ContentWebService.StoreEnum.versionStore; spacesStore3.address = vStore.address; Alfresco.ContentWebService.Reference reference1 = new Alfresco.ContentWebService.Reference(); reference1.store = spacesStore3; reference1.uuid = VH.versions[VH.versions.GetUpperBound(0)].id.uuid; // Lets try and get the content Alfresco.ContentWebService.Predicate predicate = new Alfresco.ContentWebService.Predicate(); predicate.Items = new Object[] { reference1 }; Content[] contents = this.contentService.read(predicate, "{http://www.alfresco.org/model/content/1.0}content"); Content content = contents[0]; if (content.url != null && content.url.Length != 0) { string url = content.url + "?ticket=" + AuthenticationUtils.Ticket; webBrowser.Url = new Uri(url); } } } else { } } } }
private void button2_Click(object sender, EventArgs e) { Alfresco.RepositoryWebService.Store[] stores = this.repoService.getStores(); Alfresco.RepositoryWebService.Store vStore = stores[3]; 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; VersionHistory VH = this.authoringService.getVersionHistory(reference); int i = 0; char[] temp = new char[1]; temp[0] = '0'; string versions = new string(temp); Alfresco.AuthoringWebService.Version first; foreach (Alfresco.AuthoringWebService.Version version in VH.versions) { if (i == 0) first = version; versions += version.label + (";") + version.id.uuid + (";"); } { // Create the reference for the node selected Alfresco.ContentWebService.Store spacesStore3 = new Alfresco.ContentWebService.Store(); spacesStore3.scheme = Alfresco.ContentWebService.StoreEnum.versionStore; spacesStore3.address = vStore.address; Alfresco.ContentWebService.Reference reference1 = new Alfresco.ContentWebService.Reference(); reference1.store = spacesStore3; reference1.uuid = VH.versions[VH.versions.GetUpperBound(0)].id.uuid; // Lets try and get the content Alfresco.ContentWebService.Predicate predicate = new Alfresco.ContentWebService.Predicate(); predicate.Items = new Object[] { reference1 }; Content[] contents = this.contentService.read(predicate, "{http://www.alfresco.org/model/content/1.0}content"); Content content = contents[0]; if (content.url != null && content.url.Length != 0) { string url = content.url + "?ticket=" + AuthenticationUtils.Ticket; webBrowser.Url = new Uri(url); } } } else { } } } }
/// <remarks/> public void readAsync(Predicate items, string property) { this.readAsync(items, property, null); }
public Content[] read(Predicate items, string property) { object[] results = this.Invoke("read", new object[] { items, property}); return ((Content[])(results[0])); }
/// <remarks/> public void clearAsync(Predicate items, string property, object userState) { if ((this.clearOperationCompleted == null)) { this.clearOperationCompleted = new System.Threading.SendOrPostCallback(this.OnclearOperationCompleted); } this.InvokeAsync("clear", new object[] { items, property}, this.clearOperationCompleted, userState); }
/// <remarks/> public void clearAsync(Predicate items, string property) { this.clearAsync(items, property, null); }