Exemplo n.º 1
0
        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
                    {
                    }
                }
            }
        }
Exemplo n.º 2
0
        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
                    {

                    }
                }
            }
        }
Exemplo n.º 3
0
 /// <remarks/>
 public void checkoutAsync(Predicate items, ParentReference destination) {
     this.checkoutAsync(items, destination, null);
 }
Exemplo n.º 4
0
 /// <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);
 }
Exemplo n.º 5
0
 public CheckoutResult checkout(Predicate items, ParentReference destination) {
     object[] results = this.Invoke("checkout", new object[] {
                 items,
                 destination});
     return ((CheckoutResult)(results[0]));
 }