public IUploadMediaItemRequestParametersBuilder <IMediaResourceUploadRequest> ItemTemplatePath(string templatePath)
 {
     ItemPathValidator.ValidateItemTemplate(templatePath, this.GetType().Name + ".ItemTemplatePath");
     BaseValidator.CheckForTwiceSetAndThrow(this.itemTemplate, this.GetType().Name + ".ItemTemplatePath");
     this.itemTemplate = templatePath;
     return(this);
 }
Example #2
0
        public ISetNewItemNameBuilder <T> ItemTemplatePath(string itemTemplate)
        {
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(itemTemplate, this.GetType().Name + ".ItemTemplate");
            ItemPathValidator.ValidateItemTemplate(itemTemplate, this.GetType().Name + ".itemTemplate");

            BaseValidator.CheckForTwiceSetAndThrow(this.itemParametersAccumulator.ItemTemplate,
                                                   this.GetType().Name + ".ItemTemplate");

            //igk spike to use one restrictions for all paths
            itemTemplate = itemTemplate.TrimStart('/');

            this.itemParametersAccumulator =
                new CreateItemParameters(this.itemParametersAccumulator.ItemName, itemTemplate, this.itemParametersAccumulator.FieldsRawValuesByName);

            return(this);
        }