Options
Menu

Class ConflictStrategyBase

Abstract base export class for naming conflict resolution classes. Extend this to create a strategy export class which the asset library can use to resolve asset naming conflicts, or use one of the bundled concrete strategy classes:

  • IgnoreConflictStrategy (ConflictStrategy.IGNORE)
  • ErrorConflictStrategy (ConflictStrategy.THROW_ERROR)
  • NumSuffixConflictStrategy (ConflictStrategy.APPEND_NUM_SUFFIX)
see

away.library.AssetLibrary.conflictStrategy

see

away.library.ConflictStrategy

see

away.library.IgnoreConflictStrategy

see

away.library.ErrorConflictStrategy

see

away.library.NumSuffixConflictStrategy

Hierarchy

  • ConflictStrategyBase

Index

Constructors

constructor

Methods

_pUpdateNames

  • _pUpdateNames(ns: string, nonConflictingName: string, oldAsset: IAssetAdapter, newAsset: IAssetAdapter, assetsDictionary: Object, precedence: string): void
  • Provided as a convenience method for all conflict strategy classes, as a way to finalize the conflict resolution by applying the new names and dispatching the correct events.

    Parameters

    • ns: string
    • nonConflictingName: string
    • oldAsset: IAssetAdapter
    • newAsset: IAssetAdapter
    • assetsDictionary: Object
    • precedence: string

    Returns void

create

  • Create instance of this conflict strategy. Used internally by the AssetLibrary to make sure the same strategy instance is not used in all AssetLibrary instances, which would break any state caching that happens inside the strategy class.

    Returns ConflictStrategyBase

resolveConflict

  • Resolve a naming conflict between two assets. Must be implemented by concrete strategy classes.

    Parameters

    Returns void

Generated using TypeDoc