31 using System.Reflection;
35 using System.Text.RegularExpressions;
37 using System.Xml.Serialization;
38 using OpenSim.Server.Base;
39 using OpenSim.Services.Interfaces;
40 using OpenSim.Framework;
41 using OpenSim.Framework.ServiceAuth;
42 using OpenSim.Framework.Servers.HttpServer;
44 namespace OpenSim.Server.Handlers.
Asset
58 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
68 base(
"DELETE",
"/assets")
70 m_AssetService = service;
71 m_allowedTypes = allowedTypes;
75 base(
"DELETE",
"/assets", auth)
77 m_AssetService = service;
78 m_allowedTypes = allowedTypes;
85 string[] p = SplitParams(path);
91 string assetID = p[0];
93 AssetBase asset = m_AssetService.Get(assetID);
97 || (
int)(asset.Flags & AssetFlags.Maptile) != 0)
99 result = m_AssetService.Delete(assetID);
104 "[ASSET SERVER DELETE HANDLER]: Request to delete asset {0}, but type is {1} and allowed remote delete types are {2}",
111 XmlSerializer xs =
new XmlSerializer(typeof(
bool));
112 return ServerUtils.SerializeResult(xs, result);
AssetServerDeleteHandler(IAssetService service, AllowedRemoteDeleteTypes allowedTypes, IServiceAuth auth)
Base streamed request handler.
AssetServerDeleteHandler(IAssetService service, AllowedRemoteDeleteTypes allowedTypes)
AllowedRemoteDeleteTypes
Remote deletes allowed.
override byte[] ProcessRequest(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
Asset class. All Assets are reference by this class or a class derived from this class ...