public static void UpdateAndRenameObject(IRestClient restClient, AgorumObject agObject, TransactionResponse transaction = null)
        {
            //Angabe von Id nicht nötig, da XML ObjectZuweisungen in XML-Anweisung hat und nicht zu einem bestimmten Object hochgeladen wird.
            var createRequest = new RestRequest("/api/rest/parse/xml", Method.POST);
            if (transaction != null)
                createRequest.AddParameter("transactionId", transaction.TransactionId);
            createRequest.AddParameter("xml", agObject.GenerateUpdateObjectXml());

            var tmpResponse = restClient.Execute<RestResponseBaseExt>(createRequest);
            ThrowIfNotSuccessful(tmpResponse);
        }
Beispiel #2
0
 public void SetMetaAttributes(AgorumObject agObject)
 {
     CheckAndCreateConnection();
     AgorumRestHelper.SetMetadataToObject(RestClient, agObject, TransactionResponse);
 }
Beispiel #3
0
        public void UpdateAndRenameObject(AgorumObject agObject)
        {
            if (agObject == null || agObject.Id == 0)
                return;

            CheckAndCreateConnection();
            AgorumRestHelper.UpdateAndRenameObject(RestClient, agObject, TransactionResponse);
        }
Beispiel #4
0
 public virtual void FillFromObject(AgorumObject agObject)
 {
     Id = agObject.Id == 0 ? Id : agObject.Id;
     Name = string.IsNullOrEmpty(agObject.Name) ? Name : agObject.Name;
     Description = string.IsNullOrEmpty(agObject.Description) ? Description : agObject.Description;
     AnyFolderPath = string.IsNullOrEmpty(agObject.AnyFolderPath) ? AnyFolderPath : agObject.AnyFolderPath;
     //this.Createdate = string.IsNullOrEmpty(agObject.Createdate) ? this.Createdate : agObject.Createdate;
     Parents = agObject.Parents.Count == 0 ? Parents : agObject.Parents;
     AllFolderPath = agObject.AllFolderPath.Count == 0 ? AllFolderPath : agObject.AllFolderPath;
     IsFolder = agObject.IsFolder;
 }