public IUploadMediaItemRequestParametersBuilder <IMediaResourceUploadRequest> ItemDataStream(Stream itemDataStream)
 {
     BaseValidator.CheckNullAndThrow(itemDataStream, this.GetType().Name + ".ItemDataStream");
     BaseValidator.CheckForTwiceSetAndThrow(this.itemDataStream, this.GetType().Name + ".ItemDataStream");
     this.itemDataStream = itemDataStream;
     return(this);
 }
 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);
 }
 public IUploadMediaItemRequestParametersBuilder <IMediaResourceUploadRequest> ItemName(string itemName)
 {
     BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(itemName, this.GetType().Name + ".ItemName");
     BaseValidator.CheckForTwiceSetAndThrow(this.itemName, this.GetType().Name + ".ItemName");
     this.itemName = itemName;
     return(this);
 }
        public IBaseRequestParametersBuilder <T> Payload(PayloadType payload)
        {
            BaseValidator.CheckForTwiceSetAndThrow(this.queryParameters.Payload, this.GetType().Name + ".Payload");

            this.queryParameters = new QueryParameters(payload, this.queryParameters.ScopeParameters, this.queryParameters.Fields);
            return(this);
        }
 public IUploadMediaItemRequestParametersBuilder <IMediaResourceUploadRequest> ContentType(string contentType)
 {
     BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(contentType, this.GetType().Name + ".ContentType");
     BaseValidator.CheckForTwiceSetAndThrow(this.contentType, this.GetType().Name + ".ContentType");
     this.contentType = contentType;
     return(this);
 }
        public IBaseSessionBuilder WebApiVersion(string webApiVersion)
        {
            BaseValidator.CheckForTwiceSetAndThrow(this.webApiVersion, this.GetType().Name + ".WebApiVersion");
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(webApiVersion, this.GetType().Name + ".WebApiVersion");

            this.webApiVersion = webApiVersion;
            return(this);
        }
Exemplo n.º 7
0
        public IPageViewRequestParametersBuilder <T> ItemLanguage(string itemLanguage)
        {
            BaseValidator.CheckForTwiceSetAndThrow(this.ItemLanguageValue, this.GetType().Name + ".itemLanguage");

            this.ItemLanguageValue = itemLanguage;

            return(this);
        }
Exemplo n.º 8
0
        public IPageViewRequestParametersBuilder <T> Url(string url)
        {
            BaseValidator.CheckForTwiceSetAndThrow(this.UrlValue, this.GetType().Name + ".url");

            this.UrlValue = url;

            return(this);
        }
Exemplo n.º 9
0
        public IPageViewRequestParametersBuilder <T> SitecoreRenderingDevice(string id, string Name)
        {
            BaseValidator.CheckForTwiceSetAndThrow(this.SitecoreRenderingDeviceValue, this.GetType().Name + ".sitecoreRenderingDeviceValue");

            this.SitecoreRenderingDeviceValue = new SitecoreDeviceData(id, Name);

            return(this);
        }
        public IBaseSessionBuilder SSCVersion(string sscVersion)
        {
            BaseValidator.CheckForTwiceSetAndThrow(this.sscVersion, this.GetType().Name + ".SSCVersion");
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(sscVersion, this.GetType().Name + ".SSCVersion");

            this.sscVersion = sscVersion;
            return(this);
        }
        public IOutcomeRequestParametersBuilder <T> CurrencyCode(string currencyCode)
        {
            BaseValidator.CheckForTwiceSetAndThrow(this.CurrencyCodeValue,
                                                   this.GetType().Name + ".currencyCode");

            this.CurrencyCodeValue = currencyCode;

            return(this);
        }
        public IGetMediaItemRequestParametersBuilder <IMediaResourceDownloadRequest> DownloadOptions(IDownloadMediaOptions downloadMediaOptions)
        {
            BaseValidator.CheckForTwiceSetAndThrow(this.downloadMediaOptions, this.GetType().Name + ".DownloadMediaOptions");

            BaseValidator.CheckMediaOptionsOrThrow(downloadMediaOptions, this.GetType().Name + ".DownloadMediaOptions");

            this.downloadMediaOptions = downloadMediaOptions.DeepCopyMediaDownloadOptions();

            return(this);
        }
Exemplo n.º 13
0
        public ICreateItemRequestParametersBuilder <T> ItemName(string itemName)
        {
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(itemName, this.GetType().Name + ".ItemName");

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

            this.itemParametersAccumulator =
                new CreateItemParameters(itemName, this.itemParametersAccumulator.ItemTemplate, this.itemParametersAccumulator.FieldsRawValuesByName);

            return(this);
        }
        public IRenderingHtmlRequestParametersBuilder <IGetRenderingHtmlRequest> SourceVersion(int?itemVersion)
        {
            BaseValidator.CheckForTwiceSetAndThrow(this.itemSourceAccumulator.VersionNumber, this.GetType().Name + ".Version");
            BaseValidator.AssertPositiveNumber(itemVersion, this.GetType().Name + ".SourceVersion");

            this.itemSourceAccumulator = new ItemSourcePOD(
                this.itemSourceAccumulator.Database,
                this.itemSourceAccumulator.Language,
                itemVersion);

            return(this);
        }
        public IUTSessionBuilder DeviceIdentifier(string deviceIdentifier)
        {
            if (string.IsNullOrEmpty(deviceIdentifier))
            {
                return(this);
            }

            BaseValidator.CheckForTwiceSetAndThrow(this.deviceIdentifierValue, this.GetType().Name + ".deviceIdentifier");
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(deviceIdentifier, this.GetType().Name + ".deviceIdentifier");

            this.deviceIdentifierValue = deviceIdentifier;
            return(this);
        }
        public IUTSessionBuilder DefaultInteraction(IUTInteraction interaction)
        {
            if (interaction == null)
            {
                return(this);
            }

            BaseValidator.CheckForTwiceSetAndThrow(this.defaultInteractionValue, this.GetType().Name + ".defaultInteraction");

            this.defaultInteractionValue = interaction;

            return(this);
        }
        public IUTSessionBuilder TokenValue(string tokenValue)
        {
            if (string.IsNullOrEmpty(tokenValue))
            {
                return(this);
            }

            BaseValidator.CheckForTwiceSetAndThrow(this.uTTokenValue, this.GetType().Name + ".tokenValue");
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(tokenValue, this.GetType().Name + ".tokenValue");

            this.uTTokenValue = tokenValue;
            return(this);
        }
        public IBaseSessionBuilder Site(string site)
        {
            if (string.IsNullOrEmpty(site))
            {
                return(this);
            }

            BaseValidator.CheckForTwiceSetAndThrow(this.site, this.GetType().Name + ".Site");
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(site, this.GetType().Name + ".Site");

            this.site = site;
            return(this);
        }
        public IDeleteItemRequestBuilder <T> Database(string database)
        {
            if (string.IsNullOrEmpty(database))
            {
                return(this);
            }

            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(database, this.GetType().Name + ".Database");

            BaseValidator.CheckForTwiceSetAndThrow(this.database, this.GetType().Name + ".Database");

            this.database = database;
            return(this);
        }
Exemplo n.º 20
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);
        }
        public IBaseSessionBuilder MediaLibraryRoot(string mediaLibraryRootItem)
        {
            if (string.IsNullOrEmpty(mediaLibraryRootItem))
            {
                return(this);
            }

            BaseValidator.CheckForTwiceSetAndThrow(this.mediaRoot,
                                                   this.GetType().Name + ".MediaLibraryRoot");
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(mediaLibraryRootItem,
                                                                this.GetType().Name + ".MediaLibraryRoot");

            this.mediaRoot = mediaLibraryRootItem;
            return(this);
        }
        public IBaseSessionBuilder MediaPrefix(string mediaPrefix)
        {
            if (string.IsNullOrEmpty(mediaPrefix))
            {
                return(this);
            }

            BaseValidator.CheckForTwiceSetAndThrow(this.mediaPrefix,
                                                   this.GetType().Name + ".MediaPrefix");
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(mediaPrefix,
                                                                this.GetType().Name + ".MediaPrefix");

            this.mediaPrefix = mediaPrefix;
            return(this);
        }
        public IBaseSessionBuilder DefaultMediaResourceExtension(string defaultExtension)
        {
            if (string.IsNullOrEmpty(defaultExtension))
            {
                return(this);
            }

            BaseValidator.CheckForTwiceSetAndThrow(this.mediaExtension,
                                                   this.GetType().Name + ".DefaultMediaResourceExtension");
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(defaultExtension,
                                                                this.GetType().Name + ".DefaultMediaResourceExtension");

            this.mediaExtension = defaultExtension;
            return(this);
        }
Exemplo n.º 24
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 IUploadMediaItemRequestParametersBuilder <IMediaResourceUploadRequest> Database(string database)
        {
            if (string.IsNullOrEmpty(database))
            {
                return(this);
            }

            BaseValidator.CheckForTwiceSetAndThrow(this.itemSourceAccumulator.Database, this.GetType().Name + ".Database");
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(database, this.GetType().Name + ".Database");

            this.itemSourceAccumulator = new ItemSourcePOD(
                database,
                this.itemSourceAccumulator.Language,
                this.itemSourceAccumulator.VersionNumber);

            return(this);
        }
Exemplo n.º 26
0
        public IBaseRequestParametersBuilder <T> Language(string itemLanguage)
        {
            if (string.IsNullOrEmpty(itemLanguage))
            {
                return(this);
            }

            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(itemLanguage, this.GetType().Name + ".Language");

            BaseValidator.CheckForTwiceSetAndThrow(this.itemSourceAccumulator.Language, this.GetType().Name + ".Language");

            this.itemSourceAccumulator = new ItemSourcePOD(
                this.itemSourceAccumulator.Database,
                itemLanguage,
                this.itemSourceAccumulator.VersionNumber);

            return(this);
        }
Exemplo n.º 27
0
        public IInteractionParametersBuilder <T> UserAgent(string userAgent)
        {
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(userAgent, this.GetType().Name + ".userAgent");
            BaseValidator.CheckForTwiceSetAndThrow(this.InteractioinParametersAccumulator.UserAgent,
                                                   this.GetType().Name + ".InteractioinParametersAccumulator");

            this.InteractioinParametersAccumulator = new UTInteraction(
                this.InteractioinParametersAccumulator.CampaignId,
                this.InteractioinParametersAccumulator.ChannelId,
                this.InteractioinParametersAccumulator.Events,
                this.InteractioinParametersAccumulator.Initiator,
                userAgent,
                this.InteractioinParametersAccumulator.VenueId,
                this.InteractioinParametersAccumulator.Contact
                );

            return(this);
        }
        public IEventRequestParametersBuilder <T> ItemId(string itemId)
        {
            BaseValidator.CheckForTwiceSetAndThrow(this.EventParametersAccumulator.ItemId,
                                                   this.GetType().Name + ".itemId");

            this.EventParametersAccumulator = new UTEvent(
                this.EventParametersAccumulator.Timestamp,
                this.EventParametersAccumulator.CustomValues,
                this.EventParametersAccumulator.DefinitionId,
                itemId,
                this.EventParametersAccumulator.EngagementValue,
                this.EventParametersAccumulator.ParentEventId,
                this.EventParametersAccumulator.Text,
                this.EventParametersAccumulator.Duration,
                this.EventParametersAccumulator.TrackingInteractionId
                );

            return(this);
        }
        public IBaseSessionBuilder DefaultLanguage(string defaultLanguage)
        {
            if (string.IsNullOrEmpty(defaultLanguage))
            {
                return(this);
            }

            BaseValidator.CheckForTwiceSetAndThrow(this.itemSourceAccumulator.Language,
                                                   this.GetType().Name + ".DefaultLanguage");
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(defaultLanguage,
                                                                this.GetType().Name + ".DefaultLanguage");

            this.itemSourceAccumulator =
                new ItemSourcePOD(
                    this.itemSourceAccumulator.Database,
                    defaultLanguage,
                    itemSourceAccumulator.VersionNumber);

            return(this);
        }
        public IBaseSessionBuilder EntityRouteAction(string entityAction)
        {
            if (string.IsNullOrEmpty(entityAction))
            {
                return(this);
            }

            BaseValidator.CheckForTwiceSetAndThrow(this.entitySourceAccumulator.EntityAction,
                                                   this.GetType().Name + ".EntityRouteAction");
            BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(entityAction,
                                                                this.GetType().Name + ".EntityRouteAction");

            this.entitySourceAccumulator =
                new EntitySource(
                    this.entitySourceAccumulator.EntityNamespace,
                    this.entitySourceAccumulator.EntityController,
                    this.entitySourceAccumulator.EntityId,
                    entityAction);

            return(this);
        }