aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorKunnis2009-08-16 18:54:20 -0500
committerMelanie2009-08-19 23:45:22 +0100
commitf1287cc7af7da26910c5cba456a8c35b6454d815 (patch)
treec02fccc67728d57b5097a3ba643bb8ed6987ee8c /OpenSim
parentFixes GetRootFolder for normal standalone, which was being incorrectly redire... (diff)
downloadopensim-SC_OLD-f1287cc7af7da26910c5cba456a8c35b6454d815.zip
opensim-SC_OLD-f1287cc7af7da26910c5cba456a8c35b6454d815.tar.gz
opensim-SC_OLD-f1287cc7af7da26910c5cba456a8c35b6454d815.tar.bz2
opensim-SC_OLD-f1287cc7af7da26910c5cba456a8c35b6454d815.tar.xz
* Switching IAssetData to follow the new naming schema, removing the separate insert and update methods.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/AssetDataBase.cs10
-rw-r--r--OpenSim/Data/IAssetData.cs5
-rw-r--r--OpenSim/Data/MSSQL/MSSQLAssetData.cs19
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs13
-rw-r--r--OpenSim/Data/NHibernate/NHibernateAssetData.cs24
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs47
-rw-r--r--OpenSim/Data/Tests/BasicAssetTest.cs24
-rw-r--r--OpenSim/Framework/Servers/GetAssetStreamHandler.cs2
-rw-r--r--OpenSim/Framework/Servers/PostAssetStreamHandler.cs2
-rw-r--r--OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs2
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs8
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs2
-rw-r--r--OpenSim/Services/AssetService/AssetService.cs10
13 files changed, 73 insertions, 95 deletions
diff --git a/OpenSim/Data/AssetDataBase.cs b/OpenSim/Data/AssetDataBase.cs
index f723ebf..5deb44e 100644
--- a/OpenSim/Data/AssetDataBase.cs
+++ b/OpenSim/Data/AssetDataBase.cs
@@ -36,15 +36,9 @@ namespace OpenSim.Data
36{ 36{
37 public abstract class AssetDataBase : IAssetDataPlugin 37 public abstract class AssetDataBase : IAssetDataPlugin
38 { 38 {
39 public virtual AssetBase FetchAsset(UUID uuid) 39 public abstract AssetBase GetAsset(UUID uuid);
40 {
41 return FetchStoredAsset(uuid);
42 }
43
44 protected abstract AssetBase FetchStoredAsset(UUID uuid);
45 40
46 public abstract void CreateAsset(AssetBase asset); 41 public abstract void StoreAsset(AssetBase asset);
47 public abstract void UpdateAsset(AssetBase asset);
48 public abstract bool ExistsAsset(UUID uuid); 42 public abstract bool ExistsAsset(UUID uuid);
49 43
50 public abstract List<AssetMetadata> FetchAssetMetadataSet(int start, int count); 44 public abstract List<AssetMetadata> FetchAssetMetadataSet(int start, int count);
diff --git a/OpenSim/Data/IAssetData.cs b/OpenSim/Data/IAssetData.cs
index d13732b..2149bca 100644
--- a/OpenSim/Data/IAssetData.cs
+++ b/OpenSim/Data/IAssetData.cs
@@ -33,9 +33,8 @@ namespace OpenSim.Data
33{ 33{
34 public interface IAssetDataPlugin : IPlugin 34 public interface IAssetDataPlugin : IPlugin
35 { 35 {
36 AssetBase FetchAsset(UUID uuid); 36 AssetBase GetAsset(UUID uuid);
37 void CreateAsset(AssetBase asset); 37 void StoreAsset(AssetBase asset);
38 void UpdateAsset(AssetBase asset);
39 bool ExistsAsset(UUID uuid); 38 bool ExistsAsset(UUID uuid);
40 List<AssetMetadata> FetchAssetMetadataSet(int start, int count); 39 List<AssetMetadata> FetchAssetMetadataSet(int start, int count);
41 void Initialise(string connect); 40 void Initialise(string connect);
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
index a542584..d193cf5 100644
--- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
@@ -122,7 +122,7 @@ namespace OpenSim.Data.MSSQL
122 /// </summary> 122 /// </summary>
123 /// <param name="assetID">the asset UUID</param> 123 /// <param name="assetID">the asset UUID</param>
124 /// <returns></returns> 124 /// <returns></returns>
125 override protected AssetBase FetchStoredAsset(UUID assetID) 125 override public AssetBase GetAsset(UUID assetID)
126 { 126 {
127 string sql = "SELECT * FROM assets WHERE id = @id"; 127 string sql = "SELECT * FROM assets WHERE id = @id";
128 using (AutoClosingSqlCommand command = m_database.Query(sql)) 128 using (AutoClosingSqlCommand command = m_database.Query(sql))
@@ -152,7 +152,16 @@ namespace OpenSim.Data.MSSQL
152 /// Create asset in m_database 152 /// Create asset in m_database
153 /// </summary> 153 /// </summary>
154 /// <param name="asset">the asset</param> 154 /// <param name="asset">the asset</param>
155 override public void CreateAsset(AssetBase asset) 155 override public void StoreAsset(AssetBase asset)
156 {
157 if (ExistsAsset(asset.FullID))
158 UpdateAsset(asset);
159 else
160 InsertAsset(asset);
161 }
162
163
164 private void InsertAsset(AssetBase asset)
156 { 165 {
157 if (ExistsAsset(asset.FullID)) 166 if (ExistsAsset(asset.FullID))
158 { 167 {
@@ -208,7 +217,7 @@ namespace OpenSim.Data.MSSQL
208 /// Update asset in m_database 217 /// Update asset in m_database
209 /// </summary> 218 /// </summary>
210 /// <param name="asset">the asset</param> 219 /// <param name="asset">the asset</param>
211 override public void UpdateAsset(AssetBase asset) 220 private void UpdateAsset(AssetBase asset)
212 { 221 {
213 string sql = @"UPDATE assets set id = @id, name = @name, description = @description, assetType = @assetType, 222 string sql = @"UPDATE assets set id = @id, name = @name, description = @description, assetType = @assetType,
214 local = @local, temporary = @temporary, data = @data 223 local = @local, temporary = @temporary, data = @data
@@ -250,7 +259,7 @@ namespace OpenSim.Data.MSSQL
250 } 259 }
251 } 260 }
252 261
253// Commented out since currently unused - this probably should be called in FetchAsset() 262// Commented out since currently unused - this probably should be called in GetAsset()
254// private void UpdateAccessTime(AssetBase asset) 263// private void UpdateAccessTime(AssetBase asset)
255// { 264// {
256// using (AutoClosingSqlCommand cmd = m_database.Query("UPDATE assets SET access_time = @access_time WHERE id=@id")) 265// using (AutoClosingSqlCommand cmd = m_database.Query("UPDATE assets SET access_time = @access_time WHERE id=@id"))
@@ -276,7 +285,7 @@ namespace OpenSim.Data.MSSQL
276 /// <returns>true if exist.</returns> 285 /// <returns>true if exist.</returns>
277 override public bool ExistsAsset(UUID uuid) 286 override public bool ExistsAsset(UUID uuid)
278 { 287 {
279 if (FetchAsset(uuid) != null) 288 if (GetAsset(uuid) != null)
280 { 289 {
281 return true; 290 return true;
282 } 291 }
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 0865083..1b4377a 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -135,7 +135,7 @@ namespace OpenSim.Data.MySQL
135 /// <param name="assetID">Asset UUID to fetch</param> 135 /// <param name="assetID">Asset UUID to fetch</param>
136 /// <returns>Return the asset</returns> 136 /// <returns>Return the asset</returns>
137 /// <remarks>On failure : throw an exception and attempt to reconnect to database</remarks> 137 /// <remarks>On failure : throw an exception and attempt to reconnect to database</remarks>
138 override protected AssetBase FetchStoredAsset(UUID assetID) 138 override public AssetBase GetAsset(UUID assetID)
139 { 139 {
140 AssetBase asset = null; 140 AssetBase asset = null;
141 lock (_dbConnection) 141 lock (_dbConnection)
@@ -192,7 +192,7 @@ namespace OpenSim.Data.MySQL
192 /// </summary> 192 /// </summary>
193 /// <param name="asset">Asset UUID to create</param> 193 /// <param name="asset">Asset UUID to create</param>
194 /// <remarks>On failure : Throw an exception and attempt to reconnect to database</remarks> 194 /// <remarks>On failure : Throw an exception and attempt to reconnect to database</remarks>
195 override public void CreateAsset(AssetBase asset) 195 override public void StoreAsset(AssetBase asset)
196 { 196 {
197 lock (_dbConnection) 197 lock (_dbConnection)
198 { 198 {
@@ -285,15 +285,6 @@ namespace OpenSim.Data.MySQL
285 } 285 }
286 286
287 /// <summary> 287 /// <summary>
288 /// Update a asset in database, see <see cref="CreateAsset"/>
289 /// </summary>
290 /// <param name="asset">Asset UUID to update</param>
291 override public void UpdateAsset(AssetBase asset)
292 {
293 CreateAsset(asset);
294 }
295
296 /// <summary>
297 /// check if the asset UUID exist in database 288 /// check if the asset UUID exist in database
298 /// </summary> 289 /// </summary>
299 /// <param name="uuid">The asset UUID</param> 290 /// <param name="uuid">The asset UUID</param>
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
index 9d8cec5..aaba15c 100644
--- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
@@ -65,30 +65,24 @@ namespace OpenSim.Data.NHibernate
65 65
66 } 66 }
67 67
68 override protected AssetBase FetchStoredAsset(UUID uuid) 68 override public AssetBase GetAsset(UUID uuid)
69 { 69 {
70 return (AssetBase)manager.Get(typeof(AssetBase), uuid); 70 return (AssetBase)manager.Get(typeof(AssetBase), uuid);
71 } 71 }
72 72
73 private void Save(AssetBase asset) 73 override public void StoreAsset(AssetBase asset)
74 { 74 {
75 AssetBase temp = (AssetBase)manager.Get(typeof(AssetBase), asset.FullID); 75 AssetBase temp = (AssetBase)manager.Get(typeof(AssetBase), asset.FullID);
76 if (temp == null) 76 if (temp == null)
77 { 77 {
78 m_log.InfoFormat("[NHIBERNATE] inserting asset {0}", asset.FullID);
78 manager.Insert(asset); 79 manager.Insert(asset);
79 } 80 }
80 } 81 else
81 82 {
82 override public void CreateAsset(AssetBase asset) 83 m_log.InfoFormat("[NHIBERNATE] updating asset {0}", asset.FullID);
83 { 84 manager.Update(asset);
84 m_log.InfoFormat("[NHIBERNATE] inserting asset {0}", asset.FullID); 85 }
85 Save(asset);
86 }
87
88 override public void UpdateAsset(AssetBase asset)
89 {
90 m_log.InfoFormat("[NHIBERNATE] updating asset {0}", asset.FullID);
91 manager.Update(asset);
92 } 86 }
93 87
94 // private void LogAssetLoad(AssetBase asset) 88 // private void LogAssetLoad(AssetBase asset)
@@ -107,7 +101,7 @@ namespace OpenSim.Data.NHibernate
107 override public bool ExistsAsset(UUID uuid) 101 override public bool ExistsAsset(UUID uuid)
108 { 102 {
109 m_log.InfoFormat("[NHIBERNATE] ExistsAsset: {0}", uuid); 103 m_log.InfoFormat("[NHIBERNATE] ExistsAsset: {0}", uuid);
110 return (FetchAsset(uuid) != null); 104 return (GetAsset(uuid) != null);
111 } 105 }
112 106
113 /// <summary> 107 /// <summary>
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index 72af7a0..3831467 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -90,7 +90,7 @@ namespace OpenSim.Data.SQLite
90 /// </summary> 90 /// </summary>
91 /// <param name="uuid">UUID of ... ?</param> 91 /// <param name="uuid">UUID of ... ?</param>
92 /// <returns>Asset base</returns> 92 /// <returns>Asset base</returns>
93 override protected AssetBase FetchStoredAsset(UUID uuid) 93 override public AssetBase GetAsset(UUID uuid)
94 { 94 {
95 lock (this) 95 lock (this)
96 { 96 {
@@ -119,18 +119,16 @@ namespace OpenSim.Data.SQLite
119 /// Create an asset 119 /// Create an asset
120 /// </summary> 120 /// </summary>
121 /// <param name="asset">Asset Base</param> 121 /// <param name="asset">Asset Base</param>
122 override public void CreateAsset(AssetBase asset) 122 override public void StoreAsset(AssetBase asset)
123 { 123 {
124 //m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString()); 124 //m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString());
125 if (ExistsAsset(asset.FullID)) 125 if (ExistsAsset(asset.FullID))
126 { 126 {
127 //m_log.Info("[ASSET DB]: Asset exists already, ignoring."); 127 LogAssetLoad(asset);
128 } 128
129 else
130 {
131 lock (this) 129 lock (this)
132 { 130 {
133 using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn)) 131 using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn))
134 { 132 {
135 cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.ToString())); 133 cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.ToString()));
136 cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name)); 134 cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name));
@@ -144,29 +142,22 @@ namespace OpenSim.Data.SQLite
144 } 142 }
145 } 143 }
146 } 144 }
147 } 145 else
148
149 /// <summary>
150 /// Update an asset
151 /// </summary>
152 /// <param name="asset"></param>
153 override public void UpdateAsset(AssetBase asset)
154 {
155 LogAssetLoad(asset);
156
157 lock (this)
158 { 146 {
159 using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn)) 147 lock (this)
160 { 148 {
161 cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.ToString())); 149 using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn))
162 cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name)); 150 {
163 cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description)); 151 cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.ToString()));
164 cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type)); 152 cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name));
165 cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); 153 cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description));
166 cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); 154 cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type));
167 cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); 155 cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local));
168 156 cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary));
169 cmd.ExecuteNonQuery(); 157 cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
158
159 cmd.ExecuteNonQuery();
160 }
170 } 161 }
171 } 162 }
172 } 163 }
diff --git a/OpenSim/Data/Tests/BasicAssetTest.cs b/OpenSim/Data/Tests/BasicAssetTest.cs
index 09131c1..1969d76 100644
--- a/OpenSim/Data/Tests/BasicAssetTest.cs
+++ b/OpenSim/Data/Tests/BasicAssetTest.cs
@@ -84,34 +84,34 @@ namespace OpenSim.Data.Tests
84 scrambler.Scramble(a2); 84 scrambler.Scramble(a2);
85 scrambler.Scramble(a3); 85 scrambler.Scramble(a3);
86 86
87 db.CreateAsset(a1); 87 db.StoreAsset(a1);
88 db.CreateAsset(a2); 88 db.StoreAsset(a2);
89 db.CreateAsset(a3); 89 db.StoreAsset(a3);
90 90
91 AssetBase a1a = db.FetchAsset(uuid1); 91 AssetBase a1a = db.GetAsset(uuid1);
92 Assert.That(a1a, Constraints.PropertyCompareConstraint(a1)); 92 Assert.That(a1a, Constraints.PropertyCompareConstraint(a1));
93 93
94 AssetBase a2a = db.FetchAsset(uuid2); 94 AssetBase a2a = db.GetAsset(uuid2);
95 Assert.That(a2a, Constraints.PropertyCompareConstraint(a2)); 95 Assert.That(a2a, Constraints.PropertyCompareConstraint(a2));
96 96
97 AssetBase a3a = db.FetchAsset(uuid3); 97 AssetBase a3a = db.GetAsset(uuid3);
98 Assert.That(a3a, Constraints.PropertyCompareConstraint(a3)); 98 Assert.That(a3a, Constraints.PropertyCompareConstraint(a3));
99 99
100 scrambler.Scramble(a1a); 100 scrambler.Scramble(a1a);
101 scrambler.Scramble(a2a); 101 scrambler.Scramble(a2a);
102 scrambler.Scramble(a3a); 102 scrambler.Scramble(a3a);
103 103
104 db.UpdateAsset(a1a); 104 db.StoreAsset(a1a);
105 db.UpdateAsset(a2a); 105 db.StoreAsset(a2a);
106 db.UpdateAsset(a3a); 106 db.StoreAsset(a3a);
107 107
108 AssetBase a1b = db.FetchAsset(uuid1); 108 AssetBase a1b = db.GetAsset(uuid1);
109 Assert.That(a1b, Constraints.PropertyCompareConstraint(a1a)); 109 Assert.That(a1b, Constraints.PropertyCompareConstraint(a1a));
110 110
111 AssetBase a2b = db.FetchAsset(uuid2); 111 AssetBase a2b = db.GetAsset(uuid2);
112 Assert.That(a2b, Constraints.PropertyCompareConstraint(a2a)); 112 Assert.That(a2b, Constraints.PropertyCompareConstraint(a2a));
113 113
114 AssetBase a3b = db.FetchAsset(uuid3); 114 AssetBase a3b = db.GetAsset(uuid3);
115 Assert.That(a3b, Constraints.PropertyCompareConstraint(a3a)); 115 Assert.That(a3b, Constraints.PropertyCompareConstraint(a3a));
116 116
117 Assert.That(db.ExistsAsset(uuid1), Is.True); 117 Assert.That(db.ExistsAsset(uuid1), Is.True);
diff --git a/OpenSim/Framework/Servers/GetAssetStreamHandler.cs b/OpenSim/Framework/Servers/GetAssetStreamHandler.cs
index bc046cf..c6958de 100644
--- a/OpenSim/Framework/Servers/GetAssetStreamHandler.cs
+++ b/OpenSim/Framework/Servers/GetAssetStreamHandler.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Servers
57 57
58 protected override AssetBase GetAsset(UUID assetID) 58 protected override AssetBase GetAsset(UUID assetID)
59 { 59 {
60 return m_assetProvider.FetchAsset(assetID); 60 return m_assetProvider.GetAsset(assetID);
61 } 61 }
62 } 62 }
63} 63}
diff --git a/OpenSim/Framework/Servers/PostAssetStreamHandler.cs b/OpenSim/Framework/Servers/PostAssetStreamHandler.cs
index 419b408..8bf406c 100644
--- a/OpenSim/Framework/Servers/PostAssetStreamHandler.cs
+++ b/OpenSim/Framework/Servers/PostAssetStreamHandler.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Servers
57 AssetBase asset = (AssetBase) xs.Deserialize(request); 57 AssetBase asset = (AssetBase) xs.Deserialize(request);
58 58
59 m_log.InfoFormat("[REST]: Creating asset {0}", asset.FullID); 59 m_log.InfoFormat("[REST]: Creating asset {0}", asset.FullID);
60 m_assetProvider.CreateAsset(asset); 60 m_assetProvider.StoreAsset(asset);
61 61
62 return new byte[] {}; 62 return new byte[] {};
63 } 63 }
diff --git a/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs b/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs
index 35da73f..be3f518 100644
--- a/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs
+++ b/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs
@@ -128,7 +128,7 @@ namespace OpenSim.Framework.Servers.Tests
128 IAssetDataPlugin assetDataPlugin = new TestAssetDataPlugin(); 128 IAssetDataPlugin assetDataPlugin = new TestAssetDataPlugin();
129 handler = new GetAssetStreamHandler(assetDataPlugin); 129 handler = new GetAssetStreamHandler(assetDataPlugin);
130 130
131 assetDataPlugin.CreateAsset(asset); 131 assetDataPlugin.StoreAsset(asset);
132 return asset; 132 return asset;
133 } 133 }
134 } 134 }
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs
index 0631ee7..92ac84f 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
57 metadata = null; 57 metadata = null;
58 BackendResponse ret; 58 BackendResponse ret;
59 59
60 AssetBase asset = m_assetProvider.FetchAsset(assetID); 60 AssetBase asset = m_assetProvider.GetAsset(assetID);
61 61
62 if (asset == null) ret = BackendResponse.NotFound; 62 if (asset == null) ret = BackendResponse.NotFound;
63 else 63 else
@@ -75,7 +75,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
75 assetData = null; 75 assetData = null;
76 BackendResponse ret; 76 BackendResponse ret;
77 77
78 AssetBase asset = m_assetProvider.FetchAsset(assetID); 78 AssetBase asset = m_assetProvider.GetAsset(assetID);
79 79
80 if (asset == null) ret = BackendResponse.NotFound; 80 if (asset == null) ret = BackendResponse.NotFound;
81 else 81 else
@@ -90,7 +90,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
90 90
91 public BackendResponse TryFetchDataMetadata(UUID assetID, out AssetBase asset) 91 public BackendResponse TryFetchDataMetadata(UUID assetID, out AssetBase asset)
92 { 92 {
93 asset = m_assetProvider.FetchAsset(assetID); 93 asset = m_assetProvider.GetAsset(assetID);
94 94
95 if (asset == null) return BackendResponse.NotFound; 95 if (asset == null) return BackendResponse.NotFound;
96 96
@@ -107,7 +107,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
107 { 107 {
108 BackendResponse ret; 108 BackendResponse ret;
109 109
110 m_assetProvider.CreateAsset(asset); 110 m_assetProvider.StoreAsset(asset);
111 ret = BackendResponse.Success; 111 ret = BackendResponse.Success;
112 112
113 m_server.MetricsProvider.LogAssetCreate(EXTENSION_NAME, ret, asset.FullID, asset.Data.Length, DateTime.Now); 113 m_server.MetricsProvider.LogAssetCreate(EXTENSION_NAME, ret, asset.FullID, asset.Data.Length, DateTime.Now);
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index f25e847..ac8f888 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -140,7 +140,7 @@ namespace OpenSim.Grid.AssetServer
140 140
141 protected void StoreAsset(AssetBase asset) 141 protected void StoreAsset(AssetBase asset)
142 { 142 {
143 m_assetProvider.CreateAsset(asset); 143 m_assetProvider.StoreAsset(asset);
144 } 144 }
145 } 145 }
146} 146}
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs
index fe663eb..88a905c 100644
--- a/OpenSim/Services/AssetService/AssetService.cs
+++ b/OpenSim/Services/AssetService/AssetService.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Services.AssetService
83 if (!UUID.TryParse(id, out assetID)) 83 if (!UUID.TryParse(id, out assetID))
84 return null; 84 return null;
85 85
86 return m_Database.FetchAsset(assetID); 86 return m_Database.GetAsset(assetID);
87 } 87 }
88 88
89 public AssetMetadata GetMetadata(string id) 89 public AssetMetadata GetMetadata(string id)
@@ -93,7 +93,7 @@ namespace OpenSim.Services.AssetService
93 if (!UUID.TryParse(id, out assetID)) 93 if (!UUID.TryParse(id, out assetID))
94 return null; 94 return null;
95 95
96 AssetBase asset = m_Database.FetchAsset(assetID); 96 AssetBase asset = m_Database.GetAsset(assetID);
97 return asset.Metadata; 97 return asset.Metadata;
98 } 98 }
99 99
@@ -104,7 +104,7 @@ namespace OpenSim.Services.AssetService
104 if (!UUID.TryParse(id, out assetID)) 104 if (!UUID.TryParse(id, out assetID))
105 return null; 105 return null;
106 106
107 AssetBase asset = m_Database.FetchAsset(assetID); 107 AssetBase asset = m_Database.GetAsset(assetID);
108 return asset.Data; 108 return asset.Data;
109 } 109 }
110 110
@@ -117,7 +117,7 @@ namespace OpenSim.Services.AssetService
117 if (!UUID.TryParse(id, out assetID)) 117 if (!UUID.TryParse(id, out assetID))
118 return false; 118 return false;
119 119
120 AssetBase asset = m_Database.FetchAsset(assetID); 120 AssetBase asset = m_Database.GetAsset(assetID);
121 121
122 //m_log.DebugFormat("[AssetService]: Got asset {0}", asset); 122 //m_log.DebugFormat("[AssetService]: Got asset {0}", asset);
123 123
@@ -129,7 +129,7 @@ namespace OpenSim.Services.AssetService
129 public string Store(AssetBase asset) 129 public string Store(AssetBase asset)
130 { 130 {
131 //m_log.DebugFormat("[ASSET SERVICE]: Store asset {0} {1}", asset.Name, asset.ID); 131 //m_log.DebugFormat("[ASSET SERVICE]: Store asset {0} {1}", asset.Name, asset.ID);
132 m_Database.CreateAsset(asset); 132 m_Database.StoreAsset(asset);
133 133
134 return asset.ID; 134 return asset.ID;
135 } 135 }