C# Class WhiteCore.Modules.Archivers.InventoryArchiveReadRequest

显示文件 Open project: WhiteCoreSim/WhiteCore-Dev Class Usage Examples

Protected Properties

Property Type Description
archive WhiteCore.Framework.Serialization.TarArchiveReader
m_assetsIncluded bool
m_creatorIdForAssetId UUID>.Dictionary
m_merge bool
m_registry IRegistryCore

Public Methods

Method Description
AddInventoryItem ( WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryItemBase item ) : bool
Close ( ) : void
Execute ( bool loadAll ) : HashSet

Execute the request

InventoryArchiveReadRequest ( IRegistryCore registry, UserAccount userInfo, string invPath, string loadPath, bool merge, UUID overwriteCreator ) : System
LoadControlFile ( byte data ) : void

Loads the archive.xml control file.

ReplicateArchivePathToUserInventory ( string iarPath, WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase rootDestFolder, InventoryFolderBase>.Dictionary &resolvedFolders, HashSet &loadedNodes ) : WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase

Replicate the inventory paths in the archive to the user's inventory as necessary.

Protected Methods

Method Description
CreateFoldersForPath ( WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase destFolder, string iarPathExisting, string iarPathToReplicate, InventoryFolderBase>.Dictionary &resolvedFolders, HashSet &loadedNodes ) : void

Create a set of folders for the given path.

LoadItem ( byte data, WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase loadFolder ) : WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryItemBase

Load an item from the archive

ResolveDestinationFolder ( WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase rootDestFolder, string &archivePath, InventoryFolderBase>.Dictionary &resolvedFolders ) : WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase

Resolve a destination folder

Private Methods

Method Description
InventoryArchiveReadRequest ( ) : System
LoadAsset ( string assetPath, byte data ) : bool

Load an asset

Method Details

AddInventoryItem() public method

public AddInventoryItem ( WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryItemBase item ) : bool
item WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryItemBase
return bool

Close() public method

public Close ( ) : void
return void

CreateFoldersForPath() protected method

Create a set of folders for the given path.
protected CreateFoldersForPath ( WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase destFolder, string iarPathExisting, string iarPathToReplicate, InventoryFolderBase>.Dictionary &resolvedFolders, HashSet &loadedNodes ) : void
destFolder WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase /// The root folder from which the creation will take place. ///
iarPathExisting string /// the part of the iar path that already exists ///
iarPathToReplicate string /// The path to replicate in the user's inventory from iar ///
resolvedFolders InventoryFolderBase>.Dictionary /// The folders that we have resolved so far for a given archive path. ///
loadedNodes HashSet /// Track the inventory nodes created. ///
return void

Execute() public method

Execute the request
public Execute ( bool loadAll ) : HashSet
loadAll bool
return HashSet

InventoryArchiveReadRequest() public method

public InventoryArchiveReadRequest ( IRegistryCore registry, UserAccount userInfo, string invPath, string loadPath, bool merge, UUID overwriteCreator ) : System
registry IRegistryCore
userInfo WhiteCore.Framework.Services.UserAccount
invPath string
loadPath string
merge bool
overwriteCreator UUID
return System

LoadControlFile() public method

Loads the archive.xml control file.
public LoadControlFile ( byte data ) : void
data byte Data.
return void

LoadItem() protected method

Load an item from the archive
protected LoadItem ( byte data, WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase loadFolder ) : WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryItemBase
data byte The raw item data
loadFolder WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase
return WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryItemBase

ReplicateArchivePathToUserInventory() public method

Replicate the inventory paths in the archive to the user's inventory as necessary.
public ReplicateArchivePathToUserInventory ( string iarPath, WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase rootDestFolder, InventoryFolderBase>.Dictionary &resolvedFolders, HashSet &loadedNodes ) : WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase
iarPath string The item archive path to replicate
rootDestFolder WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase The root folder for the inventory load
resolvedFolders InventoryFolderBase>.Dictionary /// The folders that we have resolved so far for a given archive path. /// This method will add more folders if necessary ///
loadedNodes HashSet /// Track the inventory nodes created. ///
return WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase

ResolveDestinationFolder() protected method

Resolve a destination folder
protected ResolveDestinationFolder ( WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase rootDestFolder, string &archivePath, InventoryFolderBase>.Dictionary &resolvedFolders ) : WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase
rootDestFolder WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase /// The root folder for the inventory load ///
archivePath string /// The item archive path to resolve. The portion of the path passed back is that /// which corresponds to the resolved destination folder. ///
resolvedFolders InventoryFolderBase>.Dictionary /// The folders that we have resolved so far for a given archive path. ///
return WhiteCore.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase

Property Details

archive protected_oe property

protected TarArchiveReader,WhiteCore.Framework.Serialization archive
return WhiteCore.Framework.Serialization.TarArchiveReader

m_assetsIncluded protected_oe property

protected bool m_assetsIncluded
return bool

m_creatorIdForAssetId protected_oe property

Record the creator id that should be associated with an asset. This is used to adjust asset creator ids after OSP resolution (since OSP creators are only stored in the item
protected Dictionary m_creatorIdForAssetId
return UUID>.Dictionary

m_merge protected_oe property

Do we want to merge this load with existing inventory?
protected bool m_merge
return bool

m_registry protected_oe property

protected IRegistryCore m_registry
return IRegistryCore