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);
        }
 public UploadMediaItemByParentPathRequestBuilder(string parentPath)
 {
     ItemPathValidator.ValidateMediaItemPath(parentPath, this.GetType().Name + ".ParentPath");
     this.mediaPath = parentPath;
 }
 protected override void ValidateSpecificRequest(ICreateItemByPathRequest request)
 {
     ItemPathValidator.ValidateItemPath(request.ItemPath, this.GetType().Name + ".ItemPath");
 }
        public ReadItemByPathRequestBuilder(string itemPath)
        {
            ItemPathValidator.ValidateItemPath(itemPath, this.GetType().Name + ".ItemPath");

            this.itemPath = itemPath;
        }
Example #6
0
 public override void ValidateSpecificPart(IDeleteItemsByPathRequest request)
 {
     ItemPathValidator.ValidateItemPath(request.ItemPath, this.GetType().Name + ".ItemPath");
 }
Example #7
0
 protected override void ValidateSpecificRequest(IReadItemsByPathRequest request)
 {
     base.ValidateSpecificRequest(request);
     ItemPathValidator.ValidateItemPath(request.ItemPath, this.GetType().Name + ".ItemPath");
 }