OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | Properties | List of all members
OpenSim.Framework.InventoryFolderImpl Class Reference
Inheritance diagram for OpenSim.Framework.InventoryFolderImpl:
Inheritance graph
[legend]
Collaboration diagram for OpenSim.Framework.InventoryFolderImpl:
Collaboration graph
[legend]

Public Member Functions

 InventoryFolderImpl (InventoryFolderBase folderbase)
 
 InventoryFolderImpl ()
 
InventoryFolderImpl CreateChildFolder (UUID folderID, string folderName, ushort type)
 Create a new subfolder. More...
 
void AddChildFolder (InventoryFolderImpl folder)
 Add a folder that already exists. More...
 
bool ContainsChildFolder (UUID folderID)
 Does this folder contain the given child folder? More...
 
InventoryFolderImpl GetChildFolder (UUID folderID)
 Get a child folder More...
 
InventoryFolderImpl RemoveChildFolder (UUID folderID)
 Removes the given child subfolder. More...
 
void Purge ()
 Delete all the folders and items in this folder. More...
 
InventoryItemBase FindItem (UUID itemID)
 Returns the item if it exists in this folder or in any of this folder's descendant folders More...
 
InventoryItemBase FindAsset (UUID assetID)
 
bool DeleteItem (UUID itemID)
 Deletes an item if it exists in this folder or any children More...
 
InventoryFolderImpl FindFolder (UUID folderID)
 Returns the folder requested if it is this folder or is a descendent of this folder. The search is depth first. More...
 
InventoryFolderImpl FindFolderForType (int type)
 Look through all child subfolders for a folder marked as one for a particular asset type, and return it. More...
 
InventoryFolderImpl FindFolderByPath (string path)
 Find a folder given a PATH_DELIMITER delimited path starting from this folder More...
 
InventoryItemBase FindItemByPath (string path)
 Find an item given a PATH_DELIMITOR delimited path starting from this folder. More...
 
List< InventoryItemBaseRequestListOfItems ()
 Return a copy of the list of child items in this folder. The items themselves are the originals. More...
 
List< InventoryFolderBaseRequestListOfFolders ()
 Return a copy of the list of child folders in this folder. The folders themselves are the originals. More...
 
List< InventoryFolderImplRequestListOfFolderImpls ()
 
- Public Member Functions inherited from OpenSim.Framework.InventoryFolderBase
 InventoryFolderBase ()
 
 InventoryFolderBase (UUID id)
 
 InventoryFolderBase (UUID id, UUID owner)
 
 InventoryFolderBase (UUID id, string name, UUID owner, UUID parent)
 
 InventoryFolderBase (UUID id, string name, UUID owner, short type, UUID parent, ushort version)
 

Public Attributes

Dictionary< UUID,
InventoryItemBase
Items = new Dictionary<UUID, InventoryItemBase>()
 Items that are contained in this folder More...
 

Static Public Attributes

static readonly string PATH_DELIMITER = "/"
 
- Static Public Attributes inherited from OpenSim.Framework.InventoryFolderBase
static readonly string ROOT_FOLDER_NAME = "My Inventory"
 
static readonly string SUITCASE_FOLDER_NAME = "My Suitcase"
 

Protected Attributes

Dictionary< UUID,
InventoryFolderImpl
m_childFolders = new Dictionary<UUID, InventoryFolderImpl>()
 Child folders that are contained in this folder More...
 

Properties

int TotalCount [get]
 
- Properties inherited from OpenSim.Framework.InventoryFolderBase
virtual UUID ParentID [get, set]
 
virtual short Type [get, set]
 
virtual ushort Version [get, set]
 
- Properties inherited from OpenSim.Framework.InventoryNodeBase
virtual string Name [get, set]
 The name of the node (64 characters or less) More...
 
UUID ID [get, set]
 A UUID containing the ID for the inventory node itself More...
 
virtual UUID Owner [get, set]
 The agent who's inventory this is contained by More...
 

Detailed Description

Definition at line 36 of file InventoryFolderImpl.cs.

Constructor & Destructor Documentation

OpenSim.Framework.InventoryFolderImpl.InventoryFolderImpl ( InventoryFolderBase  folderbase)
inline

Definition at line 53 of file InventoryFolderImpl.cs.

OpenSim.Framework.InventoryFolderImpl.InventoryFolderImpl ( )
inline

Definition at line 63 of file InventoryFolderImpl.cs.

Member Function Documentation

void OpenSim.Framework.InventoryFolderImpl.AddChildFolder ( InventoryFolderImpl  folder)
inline

Add a folder that already exists.

Parameters
folder

Definition at line 99 of file InventoryFolderImpl.cs.

bool OpenSim.Framework.InventoryFolderImpl.ContainsChildFolder ( UUID  folderID)
inline

Does this folder contain the given child folder?

Parameters
folderID
Returns

Definition at line 113 of file InventoryFolderImpl.cs.

InventoryFolderImpl OpenSim.Framework.InventoryFolderImpl.CreateChildFolder ( UUID  folderID,
string  folderName,
ushort  type 
)
inline

Create a new subfolder.

Parameters
folderID
folderName
type
Returns
The newly created subfolder. Returns null if the folder already exists

Definition at line 74 of file InventoryFolderImpl.cs.

bool OpenSim.Framework.InventoryFolderImpl.DeleteItem ( UUID  itemID)
inline

Deletes an item if it exists in this folder or any children

Parameters
folderID
Returns

Definition at line 235 of file InventoryFolderImpl.cs.

InventoryItemBase OpenSim.Framework.InventoryFolderImpl.FindAsset ( UUID  assetID)
inline

Definition at line 203 of file InventoryFolderImpl.cs.

InventoryFolderImpl OpenSim.Framework.InventoryFolderImpl.FindFolder ( UUID  folderID)
inline

Returns the folder requested if it is this folder or is a descendent of this folder. The search is depth first.

Returns
The requested folder if it exists, null if it does not.

Definition at line 269 of file InventoryFolderImpl.cs.

Here is the caller graph for this function:

InventoryFolderImpl OpenSim.Framework.InventoryFolderImpl.FindFolderByPath ( string  path)
inline

Find a folder given a PATH_DELIMITER delimited path starting from this folder

This method does not handle paths that contain multiple delimitors

FIXME: We do not yet handle situations where folders have the same name. We could handle this by some XPath like expression

FIXME: Delimitors which occur in names themselves are not currently escapable.

Parameters
pathThe path to the required folder. It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned.
Returns
null if the folder is not found

Definition at line 323 of file InventoryFolderImpl.cs.

InventoryFolderImpl OpenSim.Framework.InventoryFolderImpl.FindFolderForType ( int  type)
inline

Look through all child subfolders for a folder marked as one for a particular asset type, and return it.

Parameters
type
Returns
Returns null if no such folder is found

Definition at line 293 of file InventoryFolderImpl.cs.

InventoryItemBase OpenSim.Framework.InventoryFolderImpl.FindItem ( UUID  itemID)
inline

Returns the item if it exists in this folder or in any of this folder's descendant folders

Parameters
itemID
Returns
null if the item is not found

Definition at line 177 of file InventoryFolderImpl.cs.

InventoryItemBase OpenSim.Framework.InventoryFolderImpl.FindItemByPath ( string  path)
inline

Find an item given a PATH_DELIMITOR delimited path starting from this folder.

This method does not handle paths that contain multiple delimitors

FIXME: We do not yet handle situations where folders or items have the same name. We could handle this by some XPath like expression

FIXME: Delimitors which occur in names themselves are not currently escapable.

Parameters
pathThe path to the required item.
Returns
null if the item is not found

Definition at line 365 of file InventoryFolderImpl.cs.

InventoryFolderImpl OpenSim.Framework.InventoryFolderImpl.GetChildFolder ( UUID  folderID)
inline

Get a child folder

Parameters
folderID
Returns
The folder if it exists, null if it doesn't

Definition at line 123 of file InventoryFolderImpl.cs.

void OpenSim.Framework.InventoryFolderImpl.Purge ( )
inline

Delete all the folders and items in this folder.

Definition at line 161 of file InventoryFolderImpl.cs.

InventoryFolderImpl OpenSim.Framework.InventoryFolderImpl.RemoveChildFolder ( UUID  folderID)
inline

Removes the given child subfolder.

Parameters
folderID
Returns
The folder removed, or null if the folder was not present.

Definition at line 142 of file InventoryFolderImpl.cs.

List<InventoryFolderImpl> OpenSim.Framework.InventoryFolderImpl.RequestListOfFolderImpls ( )
inline

Definition at line 438 of file InventoryFolderImpl.cs.

List<InventoryFolderBase> OpenSim.Framework.InventoryFolderImpl.RequestListOfFolders ( )
inline

Return a copy of the list of child folders in this folder. The folders themselves are the originals.

Definition at line 423 of file InventoryFolderImpl.cs.

Here is the caller graph for this function:

List<InventoryItemBase> OpenSim.Framework.InventoryFolderImpl.RequestListOfItems ( )
inline

Return a copy of the list of child items in this folder. The items themselves are the originals.

Definition at line 399 of file InventoryFolderImpl.cs.

Member Data Documentation

Dictionary<UUID, InventoryItemBase> OpenSim.Framework.InventoryFolderImpl.Items = new Dictionary<UUID, InventoryItemBase>()

Items that are contained in this folder

Definition at line 45 of file InventoryFolderImpl.cs.

Dictionary<UUID, InventoryFolderImpl> OpenSim.Framework.InventoryFolderImpl.m_childFolders = new Dictionary<UUID, InventoryFolderImpl>()
protected

Child folders that are contained in this folder

Definition at line 50 of file InventoryFolderImpl.cs.

readonly string OpenSim.Framework.InventoryFolderImpl.PATH_DELIMITER = "/"
static

Definition at line 40 of file InventoryFolderImpl.cs.

Property Documentation

int OpenSim.Framework.InventoryFolderImpl.TotalCount
get

The total number of items in this folder and in the immediate child folders (though not from other descendants).

Definition at line 458 of file InventoryFolderImpl.cs.


The documentation for this class was generated from the following file: