C# Class UploadDatasources, TabMigrate

Uploads all the Data Sources in a directory tree
Inheritance: TableauServerSignedInRequestBase
显示文件 Open project: tableau/TabMigrate Class Usage Examples

Public Methods

Method Description
ExecuteRequest ( ) : void

Upload all the datasource files

UploadDatasources ( TableauServerUrls, onlineUrls, TableauServerSignIn, login, CredentialManager, credentialManager, string localUploadPath, UploadBehaviorProjects, uploadProjectBehavior, CustomerManualActionManager manualActions, bool attemptOwnershipAssignment, IEnumerable siteUsers, int uploadChunkSizeBytes = TableauServerUrls.UploadFileChunkSize, int uploadChunkDelaySeconds ) : System

Constructor

Private Methods

Method Description
AttemptOwnerReassignment ( SiteDatasource, datasource, DatasourcePublishSettings, publishSettings, IEnumerable siteUsers ) : bool

Assign ownership

AttemptUploadSingleFile ( string localFilePath, string projectId, CredentialManager, dbCredentials, DatasourcePublishSettings, publishSettings ) : bool

Attempts to upload a single file a Tableau Server, and then make it a published data source

FinalizePublish ( string uploadSessionId, string publishedContentName, string publishedContentType, string projectId, CredentialManager, dbCredentials ) : SiteDatasource,

After a file has been uploaded in chunks, we need to make a call to COMMIT the file to server as a published Data Source

IsValidUploadFile ( string localFilePath ) : bool

Sanity testing on whether the file being uploaded is worth uploading

LogManualAction_ReassignOwnership ( string datasourceName, string ownerName = "", string cause = "" ) : void

A manual step will be required to set the owner of the content

LogManualAction_UploadDataSource ( string filePath ) : void

Log a required manual action

RemoveFileExtensionDot ( string txtIn ) : string

If the file extension has a leading '.', remove it.

UploadDirectoryToServer ( string rootContentPath, string currentContentPath, ProjectFindCreateHelper projectsList, bool recurseDirectories, int &countSuccess, int &countFailure ) : void

Uploads the contents of a directory to server

helper_DetermineContentCredential ( string contentFileName, string projectName ) : CredentialManager.Credential,

Looks to see if there are database associated credentils that should be associated with the content being uploaded

Method Details

ExecuteRequest() public method

Upload all the datasource files
public ExecuteRequest ( ) : void
return void

UploadDatasources() public method

Constructor
public UploadDatasources ( TableauServerUrls, onlineUrls, TableauServerSignIn, login, CredentialManager, credentialManager, string localUploadPath, UploadBehaviorProjects, uploadProjectBehavior, CustomerManualActionManager manualActions, bool attemptOwnershipAssignment, IEnumerable siteUsers, int uploadChunkSizeBytes = TableauServerUrls.UploadFileChunkSize, int uploadChunkDelaySeconds ) : System
onlineUrls TableauServerUrls,
login TableauServerSignIn,
credentialManager CredentialManager,
localUploadPath string
uploadProjectBehavior UploadBehaviorProjects,
manualActions CustomerManualActionManager
attemptOwnershipAssignment bool
siteUsers IEnumerable
uploadChunkSizeBytes int
uploadChunkDelaySeconds int
return System