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 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 UploadMediaItemByParentIdRequestBuilder(string parentId) { BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(parentId, "UploadMediaItemByParentIdRequestBuilder.ParentId"); ItemIdValidator.ValidateItemId(parentId, this.GetType().Name + ".ParentId"); this.mediaPath = ""; this.parentId = parentId; }
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); }
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); }
private void Validate() { BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(this.InstanceUrl, "SessionConfig.InstanceUrl is required"); if (!SessionConfigValidator.IsValidSchemeOfInstanceUrl(this.InstanceUrl)) { Debug.WriteLine("[WARNING] : SessionConfig - instance URL does not have a scheme"); } }
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 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 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 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 IInteractionParametersBuilder <T> Contact(string source, string identifier) { BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(source, this.GetType().Name + ".Contact.Source"); BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(identifier, this.GetType().Name + ".Contact.Identifier"); UTContact contact = new UTContact(); contact.Source = source; contact.Identifier = identifier; this.ContactAggregator = contact; return(this); }
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 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); }
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); }
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 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); }
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 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); }
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); }
public static void ValidateSitecoreQuery(string sitecoreQuery, string source) { BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(sitecoreQuery, source); }
public ReadItemByQueryRequestBuilder(string sitecoreQuery) { BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(sitecoreQuery, this.GetType().Name + ".SitecoreQuery"); this.sitecoreQuery = sitecoreQuery; }
public DownloadMediaResourceRequestBuilder(string mediaPath) { BaseValidator.CheckForNullEmptyAndWhiteSpaceOrThrow(mediaPath, this.GetType().Name + ".MediaPath"); this.mediaPath = mediaPath; }