* Cleanup and CCC (Code Convention Conformance)
parent
91a096dca6
commit
1c70790a8f
|
@ -34,10 +34,10 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.ApplicationPlugins.Rest.Regions
|
namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||||
{
|
{
|
||||||
|
|
||||||
public partial class RestRegionPlugin : RestPlugin
|
public partial class RestRegionPlugin : RestPlugin
|
||||||
{
|
{
|
||||||
#region POST methods
|
#region POST methods
|
||||||
|
|
||||||
public string PostHandler(string request, string path, string param,
|
public string PostHandler(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
|
@ -68,10 +68,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||||
|
|
||||||
Scene scene = null;
|
Scene scene = null;
|
||||||
App.SceneManager.TryGetScene(regionID, out scene);
|
App.SceneManager.TryGetScene(regionID, out scene);
|
||||||
if (null == scene) return Failure(httpResponse, OSHttpStatusCode.ClientErrorNotFound,
|
if (null == scene)
|
||||||
|
return Failure(httpResponse, OSHttpStatusCode.ClientErrorNotFound,
|
||||||
"POST", "cannot find region {0}", regionID.ToString());
|
"POST", "cannot find region {0}", regionID.ToString());
|
||||||
|
|
||||||
if (2 == comps.Length) {
|
if (2 == comps.Length)
|
||||||
|
{
|
||||||
// check for {prims}
|
// check for {prims}
|
||||||
switch (comps[1].ToLower())
|
switch (comps[1].ToLower())
|
||||||
{
|
{
|
||||||
|
|
|
@ -150,14 +150,16 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||||
|
|
||||||
public XmlTextWriter XmlWriter
|
public XmlTextWriter XmlWriter
|
||||||
{
|
{
|
||||||
get {
|
get
|
||||||
|
{
|
||||||
if (null == _xw)
|
if (null == _xw)
|
||||||
{
|
{
|
||||||
_sw = new StringWriter();
|
_sw = new StringWriter();
|
||||||
_xw = new RestXmlWriter(_sw);
|
_xw = new RestXmlWriter(_sw);
|
||||||
_xw.Formatting = Formatting.Indented;
|
_xw.Formatting = Formatting.Indented;
|
||||||
}
|
}
|
||||||
return _xw; }
|
return _xw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string XmlWriterResult
|
public string XmlWriterResult
|
||||||
|
@ -171,14 +173,18 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||||
return _sw.ToString();
|
return _sw.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion properties
|
#endregion properties
|
||||||
|
|
||||||
|
|
||||||
#region methods
|
#region methods
|
||||||
// TODO: required by IPlugin, but likely not at all right
|
|
||||||
string m_version = "0.0";
|
|
||||||
|
|
||||||
public string Version { get { return m_version; } }
|
// TODO: required by IPlugin, but likely not at all right
|
||||||
|
private string m_version = "0.0";
|
||||||
|
|
||||||
|
public string Version
|
||||||
|
{
|
||||||
|
get { return m_version; }
|
||||||
|
}
|
||||||
|
|
||||||
public void Initialise()
|
public void Initialise()
|
||||||
{
|
{
|
||||||
|
@ -402,6 +408,7 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||||
|
|
||||||
return String.Format("<error>{0}</error>", e.Message);
|
return String.Format("<error>{0}</error>", e.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion methods
|
#endregion methods
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue