aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/InventoryServer
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-05-01 20:47:33 +0000
committerJustin Clarke Casey2008-05-01 20:47:33 +0000
commit1de6cffa28348975a2492ce1e8a85c365df4dfaf (patch)
tree6431e5598defd603a4b2a8c5020b65d7df5a56a7 /OpenSim/Grid/InventoryServer
parentcreate pass through of UserManagerBase to plugin calls (diff)
downloadopensim-SC_OLD-1de6cffa28348975a2492ce1e8a85c365df4dfaf.zip
opensim-SC_OLD-1de6cffa28348975a2492ce1e8a85c365df4dfaf.tar.gz
opensim-SC_OLD-1de6cffa28348975a2492ce1e8a85c365df4dfaf.tar.bz2
opensim-SC_OLD-1de6cffa28348975a2492ce1e8a85c365df4dfaf.tar.xz
* Refactor: Remove the unused userID parameter that was being passed into almost every inventory method
* This allows lots of redundant inventory methods with only slightly different names to be eliminated.
Diffstat (limited to 'OpenSim/Grid/InventoryServer')
-rw-r--r--OpenSim/Grid/InventoryServer/GridInventoryService.cs84
-rw-r--r--OpenSim/Grid/InventoryServer/Main.cs10
2 files changed, 6 insertions, 88 deletions
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
index db9a864..d9510e9 100644
--- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs
+++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
@@ -182,89 +182,7 @@ namespace OpenSim.Grid.InventoryServer
182 182
183 m_log.InfoFormat("[GRID AGENT INVENTORY]: Creating new set of inventory folders for user {0}", userID); 183 m_log.InfoFormat("[GRID AGENT INVENTORY]: Creating new set of inventory folders for user {0}", userID);
184 184
185 CreateNewUserInventory(userID); 185 return CreateNewUserInventory(userID);
186 return true;
187 }
188
189
190 public override void AddNewInventoryFolder(LLUUID userID, InventoryFolderBase folder)
191 {
192 AddFolder(folder);
193 }
194
195 public override void MoveExistingInventoryFolder(InventoryFolderBase folder)
196 {
197 MoveFolder(folder);
198 }
199
200 public override void PurgeInventoryFolder(LLUUID userID, InventoryFolderBase folder)
201 {
202 PurgeFolder(folder);
203 }
204
205 public override void AddNewInventoryItem(LLUUID userID, InventoryItemBase item)
206 {
207 AddItem(item);
208 }
209
210 public override void UpdateInventoryItem(LLUUID userID, InventoryItemBase item)
211 {
212 UpdateItem(item);
213 }
214
215 public bool AddInventoryFolder(InventoryFolderBase folder)
216 {
217 // Right now, this actions act more like an update/insert combination than a simple create.
218 m_log.InfoFormat(
219 "[GRID AGENT INVENTORY]: Creating folder {0} {1} in folder {2}", folder.Name, folder.ID, folder.ParentID);
220
221 AddNewInventoryFolder(folder.Owner, folder);
222 return true;
223 }
224
225 public bool MoveInventoryFolder(InventoryFolderBase folder)
226 {
227 m_log.InfoFormat(
228 "[GRID AGENT INVENTORY]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
229
230 MoveExistingInventoryFolder(folder);
231 return true;
232 }
233
234 public bool PurgeInventoryFolder(InventoryFolderBase folder)
235 {
236 m_log.InfoFormat(
237 "[GRID AGENT INVENTORY]: Purging folder {0} {1} of its contents", folder.Name, folder.ID);
238
239 PurgeInventoryFolder(folder.Owner, folder);
240 return true;
241 }
242
243 public bool AddInventoryItem(InventoryItemBase item)
244 {
245 // Right now, this actions act more like an update/insert combination than a simple create.
246 m_log.InfoFormat("[GRID AGENT INVENTORY]: Adding item {0} {1} to folder {2}", item.Name, item.ID, item.Folder);
247
248 AddNewInventoryItem(item.Owner, item);
249 return true;
250 }
251
252 public override void DeleteInventoryItem(LLUUID userID, InventoryItemBase item)
253 {
254 m_log.InfoFormat("[GRID AGENT INVENTORY]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder);
255
256 DeleteItem(item);
257 }
258
259 /// <summary>
260 /// FIXME: Get DeleteInventoryItem to return a bool
261 /// </summary>
262 /// <param name="item"></param>
263 /// <returns></returns>
264 public bool DeleteInvItem(InventoryItemBase item)
265 {
266 DeleteInventoryItem(item.Owner, item);
267 return true;
268 } 186 }
269 } 187 }
270} 188}
diff --git a/OpenSim/Grid/InventoryServer/Main.cs b/OpenSim/Grid/InventoryServer/Main.cs
index 870997b..4076d21 100644
--- a/OpenSim/Grid/InventoryServer/Main.cs
+++ b/OpenSim/Grid/InventoryServer/Main.cs
@@ -95,23 +95,23 @@ namespace OpenSim.Grid.InventoryServer
95 95
96 m_httpServer.AddStreamHandler( 96 m_httpServer.AddStreamHandler(
97 new RestDeserialisehandler<InventoryFolderBase, bool>( 97 new RestDeserialisehandler<InventoryFolderBase, bool>(
98 "POST", "/NewFolder/", m_inventoryService.AddInventoryFolder)); 98 "POST", "/NewFolder/", m_inventoryService.AddFolder));
99 99
100 m_httpServer.AddStreamHandler( 100 m_httpServer.AddStreamHandler(
101 new RestDeserialisehandler<InventoryFolderBase, bool>( 101 new RestDeserialisehandler<InventoryFolderBase, bool>(
102 "POST", "/MoveFolder/", m_inventoryService.MoveInventoryFolder)); 102 "POST", "/MoveFolder/", m_inventoryService.MoveFolder));
103 103
104 m_httpServer.AddStreamHandler( 104 m_httpServer.AddStreamHandler(
105 new RestDeserialisehandler<InventoryFolderBase, bool>( 105 new RestDeserialisehandler<InventoryFolderBase, bool>(
106 "POST", "/PurgeFolder/", m_inventoryService.PurgeInventoryFolder)); 106 "POST", "/PurgeFolder/", m_inventoryService.PurgeFolder));
107 107
108 m_httpServer.AddStreamHandler( 108 m_httpServer.AddStreamHandler(
109 new RestDeserialisehandler<InventoryItemBase, bool>( 109 new RestDeserialisehandler<InventoryItemBase, bool>(
110 "POST", "/NewItem/", m_inventoryService.AddInventoryItem)); 110 "POST", "/NewItem/", m_inventoryService.AddItem));
111 111
112 m_httpServer.AddStreamHandler( 112 m_httpServer.AddStreamHandler(
113 new RestDeserialisehandler<InventoryItemBase, bool>( 113 new RestDeserialisehandler<InventoryItemBase, bool>(
114 "POST", "/DeleteItem/", m_inventoryService.DeleteInvItem)); 114 "POST", "/DeleteItem/", m_inventoryService.DeleteItem));
115 115
116 // WARNING: Root folders no longer just delivers the root and immediate child folders (e.g 116 // WARNING: Root folders no longer just delivers the root and immediate child folders (e.g
117 // system folders such as Objects, Textures), but it now returns the entire inventory skeleton. 117 // system folders such as Objects, Textures), but it now returns the entire inventory skeleton.