diff options
Diffstat (limited to 'OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs')
-rw-r--r-- | OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs b/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs index b6eabe3..33e5aa6 100644 --- a/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs | |||
@@ -52,6 +52,8 @@ namespace OpenSim.Server.Handlers.Simulation | |||
52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
53 | private ISimulationService m_SimulationService; | 53 | private ISimulationService m_SimulationService; |
54 | 54 | ||
55 | public ObjectHandler() { } | ||
56 | |||
55 | public ObjectHandler(ISimulationService sim) | 57 | public ObjectHandler(ISimulationService sim) |
56 | { | 58 | { |
57 | m_SimulationService = sim; | 59 | m_SimulationService = sim; |
@@ -110,7 +112,7 @@ namespace OpenSim.Server.Handlers.Simulation | |||
110 | 112 | ||
111 | } | 113 | } |
112 | 114 | ||
113 | protected virtual void DoObjectPost(Hashtable request, Hashtable responsedata, UUID regionID) | 115 | protected void DoObjectPost(Hashtable request, Hashtable responsedata, UUID regionID) |
114 | { | 116 | { |
115 | OSDMap args = Utils.GetOSDMap((string)request["body"]); | 117 | OSDMap args = Utils.GetOSDMap((string)request["body"]); |
116 | if (args == null) | 118 | if (args == null) |
@@ -181,7 +183,7 @@ namespace OpenSim.Server.Handlers.Simulation | |||
181 | try | 183 | try |
182 | { | 184 | { |
183 | // This is the meaning of POST object | 185 | // This is the meaning of POST object |
184 | result = m_SimulationService.CreateObject(destination, sog, false); | 186 | result = CreateObject(destination, sog); |
185 | } | 187 | } |
186 | catch (Exception e) | 188 | catch (Exception e) |
187 | { | 189 | { |
@@ -192,6 +194,12 @@ namespace OpenSim.Server.Handlers.Simulation | |||
192 | responsedata["str_response_string"] = result.ToString(); | 194 | responsedata["str_response_string"] = result.ToString(); |
193 | } | 195 | } |
194 | 196 | ||
197 | // subclasses can override this | ||
198 | protected virtual bool CreateObject(GridRegion destination, ISceneObject sog) | ||
199 | { | ||
200 | return m_SimulationService.CreateObject(destination, sog, false); | ||
201 | } | ||
202 | |||
195 | protected virtual void DoObjectPut(Hashtable request, Hashtable responsedata, UUID regionID) | 203 | protected virtual void DoObjectPut(Hashtable request, Hashtable responsedata, UUID regionID) |
196 | { | 204 | { |
197 | OSDMap args = Utils.GetOSDMap((string)request["body"]); | 205 | OSDMap args = Utils.GetOSDMap((string)request["body"]); |