GlobalSettings


URI

<managerRoot_uri>/globalsettings[.<format>]

支持的方法

GETPUTHEAD

父资源

managerRoot

介绍

全局属性配置。GlobalSettings 资源包含了全局属性的配置信息,如服务设置、服务配置信息存储、临时资源存储设置。通过 GET 操作可以获取当前全局属性的配置信息,通过 PUT 操作可更新全局属性的配置。在 iServer 页面进行全局属性配置请详见全局属性设置

支持的方法:

支持的表述格式:RJSON、JSON。

资源层次

HTTP 请求方法

对如下 URI 执行 HTTP 请求,以 rjson 输出格式为例加以说明,其中,supermapiserver 是服务器名。

http://supermapiserver:8090/iserver/manager/globalsettings.rjson

GET 请求

获取全局设置的信息。

请求参数

响应结构

通过对 GlobalSettings 执行GET请求,响应参数如下:

字段 类型 说明
serviceStorage ServiceStorageInfo 服务配置存储信息
repositorySetting RepositorySetting 临时资源存储设置信息
properties Map<String, String> 服务设置信息

响应示例

对 GlobalSettings 资源:http://supermapiserver:8090/iserver/manager/globalsettings.rjson 执行 GET 请求,返回的全局设置信息如下:

{

    "serviceStorage": {

        "connInfo": {

            "password": "SuperMap",

            "minPoolSize": "5",

            "driverClass": "oracle.jdbc.driver.OracleDriver",

            "jdbcUrl": "jdbc:oracle:thin:@192.168.17.219:1521/orcl",

            "maxWait": "3000",

            "dbType": "ORACLE",

            "maxIdleTime": "600",

            "maxPoolSize": "30",

            "initialPoolSize": "5",

            "username": "SuperMap"

        },

        "metaTableName": "iserver_V1_METAINFOS",

        "type": "ORACLE",

        "version": null,

        "tableName": "iserver_V1_SERVICES"

    },

    "repositorySetting": {

        "maxElementsPerGroupInMemory": 0,

        "diskExpiryThreadIntervalSeconds": 120,

        "name": "smcache",

        "maxBytesOnHeap": "200m",

        "diskStorePath": "java.io.tmpdir\\tmpResources",

        "maxBytesLocalDisk": "10g",

        "type": "Ehcache",

        "persistenceStrategy": "localtempswap",

        "diskSpoolBufferSizeMB": 30,

        "memoryStoreEvictionPolicy": "LRU"

    },

    "properties": {

        "realspaceSecurityEnabled": "true",

        "deniedFiles": "",

        "outputPath": "./output",

        "envCheckEnabled": "true",

        "checkDatasourceConnectionInterval": "30",

        "outputSite": "http://{ip}:{port}/{contextPath}/output/",

        "restartWhenCrash": "true",

        "refreshDatasource": "false",

        "realspaceCacheAccessKey": "-116 -104 -55 -34 126 55 17 101 -71 90 -24 -17 -115 80 -56 -17"

    }

}

PUT 请求

更新全局设置的信息。

请求参数

名称 类型 含义
repositorySetting RepositorySetting 临时资源存储设置信息
serviceStorage ServiceStorageInfo 服务存储配置信息
properties Map<String, String> 一般全局属性设置信息

响应结构

通过对 GlobalSettings 执行 PUT 请求,响应参数如下:

 

字段 类型 说明
succeed Boolean 更新全局设置信息是否成功

响应示例

对 GlobalSettings 资源 http://localhost:8090/iserver/manager/GlobalSettings.rjson 执行 PUT 请求,传递请求体如下:

{

    "repositorySetting": {

        "maxBytesOnHeap": "200m",

        "maxBytesLocalDisk": "10g",

        "diskStorePath": "java.io.tmpdir\\tmpResources",

        "type": "Ehcache"

    },

    "properties": {

        "realspaceSecurityEnabled": "true",

        "deniedFiles": "",

        "outputPath": "./output",

        "envCheckEnabled": "true",

        "checkDatasourceConnectionInterval": "30",

        "outputSite": "http://{ip}:{port}/{contextPath}/output/",

        "restartWhenCrash": "true",

        "refreshDatasource": "false",

        "realspaceCacheAccessKey": "-116 -104 -55 -34 126 55 17 101 -71 90 -24 -17 -115 80 -56 -17"

    },

    "serviceStorage": {

        "type": "ORACLE",

        "connInfo": {

            "password": "SuperMap",

            "minPoolSize": "5",

            "driverClass": "oracle.jdbc.driver.OracleDriver",

            "jdbcUrl": "jdbc:oracle:thin:@192.168.17.219:1521/orcl",

            "maxWait": "3000",

            "dbType": "ORACLE",

            "maxIdleTime": "600",

            "maxPoolSize": "30",

            "initialPoolSize": "5",

            "username": "scott"

        },

        "tableName": "SuperMap_V1_SERVICES",

        "metaTableName": "SuperMap_V1_METAINFOS"

    }

}

返回的 rjson 格式响应结果如下:

{“succeed”:"True"}

HEAD 请求

返回跟 GET 请求一样的 HTTP 响应头,但是没有响应实体。可以在不必传输整个响应内容的情况下,获取包含在响应消息头中的元数据信息。元数据信息包括媒体类型,字符编码,压缩编码,实体内容长度等。

HEAD 请求可以用来判断 GlobalSettings 资源是否存在,或者客户端是否有权限访问 GlobalSettings 资源。通过对加.<format>的 URI 执行 HEAD 请求,还可以快速判断 GlobalSettings 资源是否支持<format>格式的表述。

请参见