Package com.ngt.jopenmetaverse.shared.sim.InventoryManager

Examples of com.ngt.jopenmetaverse.shared.sim.InventoryManager.InventoryFolder


      for (int i = 0; i < array.count(); i++)
      {
        if (array.get(i).getType().equals(OSDType.Map))
        {
          OSDMap map = (OSDMap)array.get(i);
          InventoryFolder folder = new InventoryFolder(map.get("folder_id").asUUID());
          folder.PreferredType = AssetType.get((byte)map.get("type_default").asInteger());
          folder.Version = map.get("version").asInteger();
          folder.OwnerID = owner;
          folder.ParentUUID = map.get("parent_id").asUUID();
          folder.Name = map.get("name").asString();
View Full Code Here


      for (int i = 0; i < array.count(); i++)
      {
        if (array.get(i).getType().equals(OSDType.Map))
        {
          OSDMap map = (OSDMap)array.get(i);
          InventoryFolder folder = new InventoryFolder(map.get("folder_id").asUUID());
          folder.Name = map.get("name").asString();
          folder.ParentUUID = map.get("parent_id").asUUID();
          folder.PreferredType = AssetType.get((byte)map.get("type_default").asInteger());
          folder.Version = map.get("version").asInteger();
          folders.add(folder);
View Full Code Here

      for (int i = 0; i < array.length; i++)
      {
        if (array[i] instanceof Map)
        {
          Map map = (Map)array[i];
          InventoryFolder folder = new InventoryFolder(ParseUUID("folder_id", map));
          folder.Name = ParseString("name", map);
          folder.ParentUUID = ParseUUID("parent_id", map);
          folder.PreferredType = AssetType.get((byte)ParseUInt("type_default", map));
          folder.Version = (int)ParseUInt("version", map);
          folder.OwnerID = ownerID;
View Full Code Here

  public void inventoryCreationTests()
  {
    GridClient client = new GridClient();
    UUID uuid1 = new UUID("83a92bbc-d795-458d-baf9-822c75ec0d92");
    Inventory inventory = new Inventory(client, client.inventory, uuid1);
    InventoryFolder rootFolder = new InventoryFolder(uuid1);
    rootFolder.Name = "";
    rootFolder.ParentUUID = UUID.Zero;
    inventory.setRootFolder(rootFolder);
   
    UUID uuid2 = new UUID("83a92bbc-d795-458d-baf9-822c75ec0d92");
View Full Code Here

                InventoryNode itemParent = null;
                if (!item.ParentUUID.equals(UUID.Zero) &&
                    ((itemParent = Items.get(item.ParentUUID)) == null))
                {
                    // OK, we have no data on the parent, let's create a fake one.
                    InventoryFolder fakeParent = new InventoryFolder(item.ParentUUID);
                    fakeParent.DescendentCount = 1; // Dear god, please forgive me.
                    itemParent = new InventoryNode(fakeParent);
                    Items.put(item.ParentUUID, itemParent);
                    // Unfortunately, this breaks the nice unified tree
                    // while we're waiting for the parent's data to come in.
View Full Code Here

                    else if((pnode= Items.get(node.getData().UUID))!=null)
                    {
                        //We already have this it must be a folder
                        if (node.getData() instanceof InventoryFolder)
                        {
                            InventoryFolder cache_folder = (InventoryFolder)node.getData();
                            InventoryFolder server_folder = (InventoryFolder)pnode.getData();

                            if (cache_folder.Version != server_folder.Version)
                            {
                                JLogger.debug("Inventory Cache/Server version mismatch on " + node.getData().Name + " " + cache_folder.Version + " vs " + server_folder.Version);
                                pnode.setNeedsUpdate(true);
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.sim.InventoryManager.InventoryFolder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.