public UploadMediaItemByParentIdRequestBuilder(string parentId)
        {
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(parentId, "UploadMediaItemByParentIdRequestBuilder.ParentId");
            ItemIdValidator.ValidateItemId(parentId, this.GetType().Name + ".ParentId");

            this.mediaPath = "";
            this.parentId  = parentId;
        }
        public RenderingHtmlRequestBuilder(string sourceId, string renderingId)
        {
            ItemIdValidator.ValidateItemId(sourceId, this.GetType().Name + ".SourceId");
            ItemIdValidator.ValidateItemId(renderingId, this.GetType().Name + ".RenderingId");

            this.sourceId    = sourceId;
            this.renderingId = renderingId;
        }
        public DeleteItemsListRequestBuilder(IEnumerable <ISitecoreItem> itemsList)
        {
            foreach (ISitecoreItem item in itemsList)
            {
                ItemIdValidator.ValidateItemId(item.Id, this.GetType().Name + ".ItemId");
            }

            this.ItemsList = itemsList;
        }
Ejemplo n.º 4
0
        private void SetItemTemplateId(string itemTemplateOrBranch)
        {
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(itemTemplateOrBranch, this.GetType().Name + ".ItemTemplate");
            ItemIdValidator.ValidateItemId(itemTemplateOrBranch, this.GetType().Name + ".itemTemplate");

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

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

            this.itemParametersAccumulator =
                new CreateItemParameters(this.itemParametersAccumulator.ItemName, trimmedTemplate, this.itemParametersAccumulator.FieldsRawValuesByName);
        }
 protected override void ValidateSpecificRequest(IReadItemsByIdRequest request)
 {
     base.ValidateSpecificRequest(request);
     ItemIdValidator.ValidateItemId(request.ItemId, this.GetType().Name + ".ItemId");
 }
Ejemplo n.º 6
0
        public SitecoreSearchRequestBuilder(string term)
        {
            ItemIdValidator.ValidateSearchRequest(term, this.GetType().Name + ".term");

            this.term = term;
        }
Ejemplo n.º 7
0
 public GoalRequestParametersBuilder(string defenitionId, DateTime timestamp)
 {
     ItemIdValidator.ValidateItemId(defenitionId, this.GetType().Name + ".defenitionId");
     this.DefinitionId(defenitionId);
     this.Timestamp(timestamp);
 }
Ejemplo n.º 8
0
 public EventForDefenitionIdRequestBuilder(string defenitionId)
 {
     ItemIdValidator.ValidateItemId(defenitionId, this.GetType().Name + ".defenitionId");
     this.DefinitionId(defenitionId);
 }
 public override void ValidateSpecificPart(IDeleteItemsByIdRequest request)
 {
     ItemIdValidator.ValidateItemId(request.ItemId, this.GetType().Name + ".ItemId");
 }
Ejemplo n.º 10
0
 public DeleteItemByIdRequestBuilder(string itemId)
 {
     ItemIdValidator.ValidateItemId(itemId, this.GetType().Name + ".ItemId");
     this.itemId = itemId;
 }
 protected void ValidateSpecificRequest(IGetRenderingHtmlRequest request)
 {
     ItemIdValidator.ValidateItemId(request.SourceId, this.GetType().Name + ".SourceId");
     ItemIdValidator.ValidateItemId(request.RenderingId, this.GetType().Name + ".RenderingId");
 }
 public CampaignRequestParametersBuilder(string campaignDefinitionId)
 {
     ItemIdValidator.ValidateItemId(campaignDefinitionId, this.GetType().Name + ".defenitionId");
     this.CampaignDefinitionId = campaignDefinitionId;
 }
Ejemplo n.º 13
0
        public RunStoredQuerryRequestBuilder(string itemId)
        {
            ItemIdValidator.ValidateItemId(itemId, this.GetType().Name + ".ItemId");

            this.itemId = itemId;
        }
 protected override void ValidateSpecificRequest(IUpdateItemByIdRequest request)
 {
     ItemIdValidator.ValidateItemId(request.ItemId, this.GetType().Name + ".ItemId");
 }
 protected override void ValidateSpecificRequest(ISitecoreStoredSearchRequest request)
 {
     base.ValidateSpecificRequest(request);
     ItemIdValidator.ValidateItemId(request.ItemId, this.GetType().Name + ".ItemId");
 }
 public PageViewRequestParametersBuilder(string defenitionId)
 {
     ItemIdValidator.ValidateItemId(defenitionId, this.GetType().Name + ".defenitionId");
     this.DefinitionId(defenitionId);
 }
Ejemplo n.º 17
0
 public ISitecoreExtendedSessionBuilder QueryItemTemplateItemId(string id)
 {
     ItemIdValidator.ValidateItemId(id, this.GetType().Name + ".QueryItemTemplateItemId");
     this.QueryItemTemplateItemIdValue = id;
     return(this);
 }