Packageaway3d.library.naming
Classpublic class ConflictStrategyBase
InheritanceConflictStrategyBase Inheritance Object
Subclasses ErrorConflictStrategy, IgnoreConflictStrategy, NumSuffixConflictStrategy

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

See also

away3d.library.AssetLibrary.conflictStrategy
away3d.library.naming.ConflictStrategy
away3d.library.naming.IgnoreConflictStrategy
away3d.library.naming.ErrorConflictStrategy
away3d.library.naming.NumSuffixConflictStrategy


Public Methods
 MethodDefined By
  
ConflictStrategyBase
  
Create instance of this conflict strategy.
ConflictStrategyBase
  
resolveConflict(changedAsset:IAsset, oldAsset:IAsset, assetsDictionary:Object, precedence:String):void
Resolve a naming conflict between two assets.
ConflictStrategyBase
Protected Methods
 MethodDefined By
  
updateNames(ns:String, nonConflictingName:String, oldAsset:IAsset, newAsset:IAsset, 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.
ConflictStrategyBase
Constructor Detail
ConflictStrategyBase()Constructor
public function ConflictStrategyBase()



Method Detail
create()method
public function create():ConflictStrategyBase

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()method 
public function resolveConflict(changedAsset:IAsset, oldAsset:IAsset, assetsDictionary:Object, precedence:String):void

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

Parameters

changedAsset:IAsset
 
oldAsset:IAsset
 
assetsDictionary:Object
 
precedence:String

updateNames()method 
protected function updateNames(ns:String, nonConflictingName:String, oldAsset:IAsset, newAsset:IAsset, 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:IAsset
 
newAsset:IAsset
 
assetsDictionary:Object
 
precedence:String