Class PermissionPostPublishHookBase<TPublish, TResult>
Abstract base class for post publish hooks that perform permissions updates.
Inheritance
object
    ContentItemPostPublishHookBase<TPublish, TResult>
    PermissionPostPublishHookBase<TPublish, TResult>
      
      
      
  Implements
IContentItemPostPublishHook<TPublish, TResult>
    IMigrationHook<ContentItemPostPublishContext<TPublish, TResult>>
  Inherited Members
Namespace: Tableau.Migration.Engine.Hooks.PostPublish.Default
Assembly: Tableau.Migration.dll
Syntax
public abstract class PermissionPostPublishHookBase<TPublish, TResult> : ContentItemPostPublishHookBase<TPublish, TResult>, IContentItemPostPublishHook<TPublish, TResult>, IMigrationHook<ContentItemPostPublishContext<TPublish, TResult>>
  Type Parameters
| Name | Description | 
|---|---|
| TPublish | |
| TResult | 
Constructors
PermissionPostPublishHookBase(IMigration, IContentTransformerRunner)
Creates a new PermissionPostPublishHookBase<TPublish, TResult> object.
Declaration
public PermissionPostPublishHookBase(IMigration migration, IContentTransformerRunner transformerRunner)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IMigration | migration | The current migration.  | 
      
| IContentTransformerRunner | transformerRunner | A transformer runner to use for permissions.  | 
      
Properties
Migration
Gets the current migration.
Declaration
protected IMigration Migration { get; }
  Property Value
| Type | Description | 
|---|---|
| IMigration | 
Methods
GetDestinationProjectId(TResult)
Finds the parent project ID of the content item.
Declaration
protected virtual Guid? GetDestinationProjectId(TResult result)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TResult | result | The content item's destination publis result.  | 
      
Returns
| Type | Description | 
|---|---|
| Guid? | The parent project ID, or null if the item does not have a parent project.  | 
      
ParentProjectLockedAsync(ContentItemPostPublishContext<TPublish, TResult>, CancellationToken)
Finds whether or not the parent/containing project is locked.
Declaration
protected Task<bool> ParentProjectLockedAsync(ContentItemPostPublishContext<TPublish, TResult> ctx, CancellationToken cancel)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ContentItemPostPublishContext<TPublish, TResult> | ctx | The post publish context.  | 
      
| CancellationToken | cancel | The cancellation token to obey.  | 
      
Returns
| Type | Description | 
|---|---|
| Task<bool> | Whether or not the parent project is locked.  | 
      
TransformPermissionsAsync(IPermissions, CancellationToken)
Runs transformers on a set of permission grantees, retaining parent ID.
Declaration
protected Task<IPermissions> TransformPermissionsAsync(IPermissions permissions, CancellationToken cancel)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IPermissions | permissions | The permissions to transform  | 
      
| CancellationToken | cancel | The cancellation token to obey.  | 
      
Returns
| Type | Description | 
|---|---|
| Task<IPermissions> | The transformed permissions.  |