/// <summary>
    /// Constructor
    /// </summary>
    /// <param name="onlineUrls"></param>
    /// <param name="login"></param>
    /// <param name="localUploadPath"></param>
    public UploadDatasources(
        TableauServerUrls onlineUrls, 
        TableauServerSignIn login,
        CredentialManager credentialManager,
        string localUploadPath,
        UploadBehaviorProjects uploadProjectBehavior,
        CustomerManualActionManager manualActions,
        bool attemptOwnershipAssignment,
        IEnumerable<SiteUser> siteUsers,
        int uploadChunkSizeBytes = TableauServerUrls.UploadFileChunkSize,
        int uploadChunkDelaySeconds = 0)
        : base(login)
    {
        System.Diagnostics.Debug.Assert(uploadChunkSizeBytes > 0, "Chunck size must be positive");

        _onlineUrls = onlineUrls;
        _localUploadPath = localUploadPath;
        _uploadProjectBehavior = uploadProjectBehavior;
        _credentialManager = credentialManager;
        _manualActions = manualActions;
        if(_manualActions == null)
        {
            _manualActions = new CustomerManualActionManager();
        }

        //If we are going to attempt to reassign ownership after publication we'll need this information
        _attemptOwnershipAssignment = attemptOwnershipAssignment;
        _siteUsers = siteUsers;

        //Test parameters
        _uploadChunkSizeBytes = uploadChunkSizeBytes;
        _uploadChunkDelaySeconds = uploadChunkDelaySeconds;
    }
Exemple #2
0
    /// <summary>
    /// Constructor
    /// </summary>
    /// <param name="jobName">Name to associate with this work</param>
    /// <param name="onlineUrls"></param>
    /// <param name="userName"></param>
    /// <param name="password"></param>
    /// <param name="taskOptions"></param>
    /// <param name="manualActions"></param>
    public TaskMaster(
        string jobName,
        TableauServerUrls onlineUrls, 
        string userName, 
        string password,
        TaskMasterOptions taskOptions,
        CustomerManualActionManager manualActions = null)
    {
        this.JobName = jobName;

        _manualActions = manualActions;
        if(_manualActions == null)
        {
            _manualActions = new CustomerManualActionManager();
        }
        //Get any export path
        _exportToLocalPath = taskOptions.GetOptionValue(TaskMasterOptions.OptionParameter_PathDownloadTo);
        _onlineUrls = onlineUrls;
        _userName = userName;
        _password = password;

        //Store the status log at the class level where it is accessable
        _statusLog = new TaskStatusLogs();
        //Store the options
        _taskOptions = taskOptions;

        if(_taskOptions.IsOptionSet(TaskMasterOptions.Option_LogVerbose))
        {
            _statusLog.SetStatusLoggingLevel(int.MinValue);
        }
    }
Exemple #3
0
    /// <summary>
    /// Constructor
    /// </summary>
    /// <param name="onlineUrls"></param>
    /// <param name="login"></param>
    /// <param name="localUploadPath"></param>
    public UploadDatasources(
        TableauServerUrls onlineUrls,
        TableauServerSignIn login,
        CredentialManager credentialManager,
        string localUploadPath,
        UploadBehaviorProjects uploadProjectBehavior,
        CustomerManualActionManager manualActions,
        bool attemptOwnershipAssignment,
        IEnumerable <SiteUser> siteUsers,
        int uploadChunkSizeBytes    = TableauServerUrls.UploadFileChunkSize,
        int uploadChunkDelaySeconds = 0)
        : base(login)
    {
        System.Diagnostics.Debug.Assert(uploadChunkSizeBytes > 0, "Chunck size must be positive");

        _onlineUrls            = onlineUrls;
        _localUploadPath       = localUploadPath;
        _uploadProjectBehavior = uploadProjectBehavior;
        _credentialManager     = credentialManager;
        _manualActions         = manualActions;
        if (_manualActions == null)
        {
            _manualActions = new CustomerManualActionManager();
        }

        //If we are going to attempt to reassign ownership after publication we'll need this information
        _attemptOwnershipAssignment = attemptOwnershipAssignment;
        _siteUsers = siteUsers;

        //Test parameters
        _uploadChunkSizeBytes    = uploadChunkSizeBytes;
        _uploadChunkDelaySeconds = uploadChunkDelaySeconds;
    }
    /// <summary>
    /// Constructor
    /// </summary>
    /// <param name="onlineUrls"></param>
    /// <param name="login"></param>
    /// <param name="credentialManager">Set of database credentials to attach to associated content being published</param>
    /// <param name="localUploadPath">Path to upload from</param>
    /// <param name="remapWorkbookReferences">TRUE if we want to modify the workbooks to point datasource/other references to the new server</param>
    /// <param name="localPathTempWorkspace">Path to perform local file work in</param>
    /// <param name="uploadProjectBehavior">Instructions on whether to map content into projects</param>
    /// <param name="manualActions">Any manual actions that need to be performed by the user are written here</param>
    /// <param name="attemptOwnershipAssignment">TRUE: After upload attempt to reassign the ownership of the content based on local metadata we have</param>
    /// <param name="siteUsers">List of users to perform ownership assignement with</param>
    /// <param name="uploadChunkDelaySeconds">For testing, a delay we can inject</param>
    public UploadWorkbooks(
        TableauServerUrls onlineUrls,
        TableauServerSignIn login,
        CredentialManager credentialManager,
        string localUploadPath,
        bool remapWorkbookReferences,
        string localPathTempWorkspace,
        UploadBehaviorProjects uploadProjectBehavior,
        CustomerManualActionManager manualActions,
        bool attemptOwnershipAssignment,
        IEnumerable <SiteUser> siteUsers,
        int uploadChunkSizeBytes    = TableauServerUrls.UploadFileChunkSize,
        int uploadChunkDelaySeconds = 0)
        : base(login)
    {
        _onlineUrls              = onlineUrls;
        _localUploadPath         = localUploadPath;
        _remapWorkbookReferences = remapWorkbookReferences;
        _localPathTempWorkspace  = localPathTempWorkspace;
        _uploadProjectBehavior   = uploadProjectBehavior;
        _manualActions           = manualActions;
        _credentialManager       = credentialManager;
        if (_manualActions == null)
        {
            _manualActions = new CustomerManualActionManager();
        }

        //If we are going to attempt to reassign ownership after publication we'll need this information
        _attemptOwnershipAssignment = attemptOwnershipAssignment;
        _siteUsers = siteUsers;

        //Test parameters
        _uploadChunkSizeBytes    = uploadChunkSizeBytes;
        _uploadChunkDelaySeconds = uploadChunkDelaySeconds;
    }
    /// <summary>
    /// Constructor
    /// </summary>
    /// <param name="onlineUrls"></param>
    /// <param name="login"></param>
    /// <param name="credentialManager">Set of database credentials to attach to associated content being published</param>
    /// <param name="localUploadPath">Path to upload from</param>
    /// <param name="remapWorkbookReferences">TRUE if we want to modify the workbooks to point datasource/other references to the new server</param>
    /// <param name="localPathTempWorkspace">Path to perform local file work in</param>
    /// <param name="uploadProjectBehavior">Instructions on whether to map content into projects</param>
    /// <param name="manualActions">Any manual actions that need to be performed by the user are written here</param>
    /// <param name="attemptOwnershipAssignment">TRUE: After upload attempt to reassign the ownership of the content based on local metadata we have</param>
    /// <param name="siteUsers">List of users to perform ownership assignement with</param>
    /// <param name="uploadChunkDelaySeconds">For testing, a delay we can inject</param>
    public UploadWorkbooks(
        TableauServerUrls onlineUrls, 
        TableauServerSignIn login,
        CredentialManager credentialManager,
        string localUploadPath,
        bool remapWorkbookReferences,
        string localPathTempWorkspace,
        UploadBehaviorProjects uploadProjectBehavior,
        CustomerManualActionManager manualActions,
        bool attemptOwnershipAssignment,
        IEnumerable<SiteUser> siteUsers,
        int uploadChunkSizeBytes = TableauServerUrls.UploadFileChunkSize,
        int uploadChunkDelaySeconds = 0)
        : base(login)
    {
        _onlineUrls = onlineUrls;
        _localUploadPath = localUploadPath;
        _remapWorkbookReferences = remapWorkbookReferences;
        _localPathTempWorkspace = localPathTempWorkspace;
        _uploadProjectBehavior = uploadProjectBehavior;
        _manualActions = manualActions;
        _credentialManager = credentialManager;
        if (_manualActions == null)
        {
            _manualActions = new CustomerManualActionManager();
        }

        //If we are going to attempt to reassign ownership after publication we'll need this information
        _attemptOwnershipAssignment = attemptOwnershipAssignment;
        _siteUsers = siteUsers;

        //Test parameters
        _uploadChunkSizeBytes = uploadChunkSizeBytes;
        _uploadChunkDelaySeconds = uploadChunkDelaySeconds;
    }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="onlineUrls"></param>
 /// <param name="login"></param>
 /// <param name="credentialManager">Set of database credentials to attach to associated content being published</param>
 /// <param name="localUploadPath">Path to upload from</param>
 /// <param name="remapWorkbookReferences">TRUE if we want to modify the workbooks to point datasource/other references to the new server</param>
 /// <param name="localPathTempWorkspace">Path to perform local file work in</param>
 /// <param name="uploadProjectBehavior">Instructions on whether to map content into projects</param>
 /// <param name="manualActions">Any manual actions that need to be performed by the user are written here</param>
 /// <param name="uploadChunkDelaySeconds">For testing, a delay we can inject</param>
 public UploadWorkbooks(
     TableauServerUrls onlineUrls,
     TableauServerSignIn login,
     CredentialManager credentialManager,
     string localUploadPath,
     bool remapWorkbookReferences,
     string localPathTempWorkspace,
     UploadBehaviorProjects uploadProjectBehavior,
     CustomerManualActionManager manualActions,
     int uploadChunkSizeBytes    = TableauServerUrls.UploadFileChunkSize,
     int uploadChunkDelaySeconds = 0)
     : base(login)
 {
     _onlineUrls              = onlineUrls;
     _localUploadPath         = localUploadPath;
     _remapWorkbookReferences = remapWorkbookReferences;
     _localPathTempWorkspace  = localPathTempWorkspace;
     _uploadProjectBehavior   = uploadProjectBehavior;
     _manualActions           = manualActions;
     _credentialManager       = credentialManager;
     if (_manualActions == null)
     {
         _manualActions = new CustomerManualActionManager();
     }
     //Test parameters
     _uploadChunkSizeBytes    = uploadChunkSizeBytes;
     _uploadChunkDelaySeconds = uploadChunkDelaySeconds;
 }
    /// <summary>
    /// Constructor
    /// </summary>
    /// <param name="onlineUrls"></param>
    /// <param name="login"></param>
    /// <param name="localUploadPath"></param>
    public UploadDatasources(
        TableauServerUrls onlineUrls,
        TableauServerSignIn login,
        CredentialManager credentialManager,
        string localUploadPath,
        UploadBehaviorProjects uploadProjectBehavior,
        CustomerManualActionManager manualActions,
        int uploadChunkSizeBytes    = TableauServerUrls.UploadFileChunkSize,
        int uploadChunkDelaySeconds = 0)
        : base(login)
    {
        System.Diagnostics.Debug.Assert(uploadChunkSizeBytes > 0, "Chunck size must be positive");

        _onlineUrls            = onlineUrls;
        _localUploadPath       = localUploadPath;
        _uploadProjectBehavior = uploadProjectBehavior;
        _credentialManager     = credentialManager;
        _manualActions         = manualActions;
        if (_manualActions == null)
        {
            _manualActions = new CustomerManualActionManager();
        }
        //Test parameters
        _uploadChunkSizeBytes    = uploadChunkSizeBytes;
        _uploadChunkDelaySeconds = uploadChunkDelaySeconds;
    }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="onlineUrls"></param>
 /// <param name="login"></param>
 /// <param name="credentialManager">Set of database credentials to attach to associated content being published</param>
 /// <param name="localUploadPath">Path to upload from</param>
 /// <param name="remapWorkbookReferences">TRUE if we want to modify the workbooks to point datasource/other references to the new server</param>
 /// <param name="localPathTempWorkspace">Path to perform local file work in</param>
 /// <param name="uploadProjectBehavior">Instructions on whether to map content into projects</param>
 /// <param name="manualActions">Any manual actions that need to be performed by the user are written here</param>
 /// <param name="uploadChunkDelaySeconds">For testing, a delay we can inject</param>
 public UploadWorkbooks(
     TableauServerUrls onlineUrls, 
     TableauServerSignIn login,
     CredentialManager credentialManager,
     string localUploadPath,
     bool remapWorkbookReferences,
     string localPathTempWorkspace,
     UploadBehaviorProjects uploadProjectBehavior,
     CustomerManualActionManager manualActions,
     int uploadChunkSizeBytes = TableauServerUrls.UploadFileChunkSize,
     int uploadChunkDelaySeconds = 0)
     : base(login)
 {
     _onlineUrls = onlineUrls;
     _localUploadPath = localUploadPath;
     _remapWorkbookReferences = remapWorkbookReferences;
     _localPathTempWorkspace = localPathTempWorkspace;
     _uploadProjectBehavior = uploadProjectBehavior;
     _manualActions = manualActions;
     _credentialManager = credentialManager; 
     if (_manualActions == null)
     {
         _manualActions = new CustomerManualActionManager();
     }
     //Test parameters
     _uploadChunkSizeBytes = uploadChunkSizeBytes;
     _uploadChunkDelaySeconds = uploadChunkDelaySeconds;
 }
    /// <summary>
    /// Constructor
    /// </summary>
    /// <param name="onlineUrls"></param>
    /// <param name="login"></param>
    /// <param name="localUploadPath"></param>
    public UploadDatasources(
        TableauServerUrls onlineUrls, 
        TableauServerSignIn login,
        CredentialManager credentialManager,
        string localUploadPath,
        UploadBehaviorProjects uploadProjectBehavior,
        CustomerManualActionManager manualActions,
        int uploadChunkSizeBytes = TableauServerUrls.UploadFileChunkSize,
        int uploadChunkDelaySeconds = 0)
        : base(login)
    {
        System.Diagnostics.Debug.Assert(uploadChunkSizeBytes > 0, "Chunck size must be positive");

        _onlineUrls = onlineUrls;
        _localUploadPath = localUploadPath;
        _uploadProjectBehavior = uploadProjectBehavior;
        _credentialManager = credentialManager;
        _manualActions = manualActions;
        if(_manualActions == null)
        {
            _manualActions = new CustomerManualActionManager();
        }
        //Test parameters
        _uploadChunkSizeBytes = uploadChunkSizeBytes;
        _uploadChunkDelaySeconds = uploadChunkDelaySeconds;
    }
Exemple #10
0
    /// <summary>
    /// Constructor
    /// </summary>
    /// <param name="jobName">Name to associate with this work</param>
    /// <param name="onlineUrls"></param>
    /// <param name="userName"></param>
    /// <param name="password"></param>
    /// <param name="taskOptions"></param>
    /// <param name="manualActions"></param>
    public TaskMaster(
        string jobName,
        TableauServerUrls onlineUrls,
        string userName,
        string password,
        TaskMasterOptions taskOptions,
        CustomerManualActionManager manualActions = null)
    {
        this.JobName = jobName;

        _manualActions = manualActions;
        if (_manualActions == null)
        {
            _manualActions = new CustomerManualActionManager();
        }
        //Get any export path
        _exportToLocalPath = taskOptions.GetOptionValue(TaskMasterOptions.OptionParameter_PathDownloadTo);
        _onlineUrls        = onlineUrls;
        _userName          = userName;
        _password          = password;

        //Store the status log at the class level where it is accessable
        _statusLog = new TaskStatusLogs();
        //Store the options
        _taskOptions = taskOptions;


        if (_taskOptions.IsOptionSet(TaskMasterOptions.Option_LogVerbose))
        {
            _statusLog.SetStatusLoggingLevel(int.MinValue);
        }
    }