Exemple #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
                    {
                    }
                }
            }
        }
 /// <remarks/>
 public void unlockAsync(Predicate items, bool unlockChildren, object userState) {
     if ((this.unlockOperationCompleted == null)) {
         this.unlockOperationCompleted = new System.Threading.SendOrPostCallback(this.OnunlockOperationCompleted);
     }
     this.InvokeAsync("unlock", new object[] {
                 items,
                 unlockChildren}, this.unlockOperationCompleted, userState);
 }
 /// <remarks/>
 public void unlockAsync(Predicate items, bool unlockChildren) {
     this.unlockAsync(items, unlockChildren, null);
 }
 public Reference[] unlock(Predicate items, bool unlockChildren) {
     object[] results = this.Invoke("unlock", new object[] {
                 items,
                 unlockChildren});
     return ((Reference[])(results[0]));
 }
 /// <remarks/>
 public void checkoutAsync(Predicate items, ParentReference destination) {
     this.checkoutAsync(items, destination, null);
 }
        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 createVersionAsync(Predicate items, NamedValue[] comments, bool versionChildren) {
     this.createVersionAsync(items, comments, versionChildren, null);
 }
 /// <remarks/>
 public void getLockStatusAsync(Predicate items, object userState) {
     if ((this.getLockStatusOperationCompleted == null)) {
         this.getLockStatusOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetLockStatusOperationCompleted);
     }
     this.InvokeAsync("getLockStatus", new object[] {
                 items}, this.getLockStatusOperationCompleted, userState);
 }
 /// <remarks/>
 public void cancelCheckoutAsync(Predicate items) {
     this.cancelCheckoutAsync(items, null);
 }
 public CancelCheckoutResult cancelCheckout(Predicate items) {
     object[] results = this.Invoke("cancelCheckout", new object[] {
                 items});
     return ((CancelCheckoutResult)(results[0]));
 }
 /// <remarks/>
 public void checkinAsync(Predicate items, NamedValue[] comments, bool keepCheckedOut, object userState) {
     if ((this.checkinOperationCompleted == null)) {
         this.checkinOperationCompleted = new System.Threading.SendOrPostCallback(this.OncheckinOperationCompleted);
     }
     this.InvokeAsync("checkin", new object[] {
                 items,
                 comments,
                 keepCheckedOut}, this.checkinOperationCompleted, userState);
 }
 /// <remarks/>
 public void checkinAsync(Predicate items, NamedValue[] comments, bool keepCheckedOut) {
     this.checkinAsync(items, comments, keepCheckedOut, null);
 }
 public CheckinResult checkin(Predicate items, [System.Xml.Serialization.XmlElementAttribute("comments")] NamedValue[] comments, bool keepCheckedOut) {
     object[] results = this.Invoke("checkin", new object[] {
                 items,
                 comments,
                 keepCheckedOut});
     return ((CheckinResult)(results[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);
 }
 public LockStatus[] getLockStatus(Predicate items) {
     object[] results = this.Invoke("getLockStatus", new object[] {
                 items});
     return ((LockStatus[])(results[0]));
 }
 /// <remarks/>
 public void getLockStatusAsync(Predicate items) {
     this.getLockStatusAsync(items, null);
 }
 /// <remarks/>
 public void cancelCheckoutAsync(Predicate items, object userState) {
     if ((this.cancelCheckoutOperationCompleted == null)) {
         this.cancelCheckoutOperationCompleted = new System.Threading.SendOrPostCallback(this.OncancelCheckoutOperationCompleted);
     }
     this.InvokeAsync("cancelCheckout", new object[] {
                 items}, this.cancelCheckoutOperationCompleted, userState);
 }
 public VersionResult createVersion(Predicate items, [System.Xml.Serialization.XmlElementAttribute("comments")] NamedValue[] comments, bool versionChildren) {
     object[] results = this.Invoke("createVersion", new object[] {
                 items,
                 comments,
                 versionChildren});
     return ((VersionResult)(results[0]));
 }
 public Reference[] @lock(Predicate items, bool lockChildren, LockTypeEnum lockType) {
     object[] results = this.Invoke("lock", new object[] {
                 items,
                 lockChildren,
                 lockType});
     return ((Reference[])(results[0]));
 }
 /// <remarks/>
 public void createVersionAsync(Predicate items, NamedValue[] comments, bool versionChildren, object userState) {
     if ((this.createVersionOperationCompleted == null)) {
         this.createVersionOperationCompleted = new System.Threading.SendOrPostCallback(this.OncreateVersionOperationCompleted);
     }
     this.InvokeAsync("createVersion", new object[] {
                 items,
                 comments,
                 versionChildren}, this.createVersionOperationCompleted, userState);
 }
 /// <remarks/>
 public void lockAsync(Predicate items, bool lockChildren, LockTypeEnum lockType) {
     this.lockAsync(items, lockChildren, lockType, null);
 }
 /// <remarks/>
 public void lockAsync(Predicate items, bool lockChildren, LockTypeEnum lockType, object userState) {
     if ((this.lockOperationCompleted == null)) {
         this.lockOperationCompleted = new System.Threading.SendOrPostCallback(this.OnlockOperationCompleted);
     }
     this.InvokeAsync("lock", new object[] {
                 items,
                 lockChildren,
                 lockType}, this.lockOperationCompleted, userState);
 }
 public CheckoutResult checkout(Predicate items, ParentReference destination) {
     object[] results = this.Invoke("checkout", new object[] {
                 items,
                 destination});
     return ((CheckoutResult)(results[0]));
 }