Finished HG Service Store. Not fully functional because of problems with asset.ID insisting on being a UUID string.

This commit is contained in:
diva
2009-05-18 20:04:59 +00:00
parent 1cc9d1fd8d
commit 13da5a9fba
3 changed files with 47 additions and 39 deletions

View File

@@ -94,7 +94,7 @@ namespace OpenSim.Services.AssetService
// We're instantiating this class explicitly, but this won't
// work in general, because the remote grid may be running
// an asset server that has a different protocol.
// Eventually we will want a piece of meta-protocol asking
// Eventually we will want a piece of protocol asking
// the remote server about its kind. Definitely cool thing to do!
connector = new AssetServicesConnector(url);
m_connectors.Add(url, connector);
@@ -152,6 +152,17 @@ namespace OpenSim.Services.AssetService
public string Store(AssetBase asset)
{
string url = string.Empty;
string assetID = string.Empty;
if (StringToUrlAndAssetID(asset.ID, out url, out assetID))
{
IAssetService connector = GetConnector(url);
// Restore the assetID to a simple UUID
asset.ID = assetID;
return connector.Store(asset);
}
return String.Empty;
}