Class RestContext
- java.lang.Object
-
- com.supermap.services.rest.RestContext
-
public class RestContext extends java.lang.Object${services_rest_RestContext_Title}
${services_rest_RestContext_Description}
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringAPPBEANMAPREST application component mapping.static java.lang.StringCORE_BEAN_FILENAMEREST The path to the core component (bean) configuration file (relative to the Jar package for SuperMap iServer).static java.lang.StringDEFAULT_CONTEXT_FILENAMEThe default REST application context configuration file path (default relative to the installation root).static java.lang.StringDEFAULT_CONTEXT_JARPATHThe default REST application context profile in the Jar package path (as opposed to the SuperMap iServer Jar package).static java.lang.StringERRORError message "ERROR".static java.lang.StringEXTENDS_RESOURCE_FILENAMEExtending the path of the resource's configuration file (default relative to the installation root).
-
Constructor Summary
Constructors Constructor and Description RestContext()The Constructor.RestContext(java.io.File file, java.util.List<java.lang.Object> beans)Constructs a REST application context based on a contextual configuration file for the file system.RestContext(java.util.List<java.lang.Object> beans)${services_rest_RestContext_constructor_RestContextByDefault_Title}RestContext(ResourceManager resourceManager, RestConfig restConfig, TempObjRepository tempObjRepository, ResourceStatusManager resourceStatusManager)${services_rest_RestContext_constructor_RestContextByParam_Title}RestContext(java.lang.String appContextFileName)Constructs an application context based on the given REST application context configuration file.RestContext(java.lang.String appContextFileName, java.util.List<java.lang.Object> beans)The Constructor.
-
Method Summary
Methods Modifier and Type Method and Description java.lang.Objectget(java.lang.String key)${services_rest_RestContext_method_get_Title}java.util.MapgetAttributes()${services_rest_RestContext_method_getAttributes_Title}InterfaceContextgetInterfaceContext()Gets the interface context.ResourceManagergetResourceManager()${services_rest_RestContext_method_getResourceManager_Title}ResourceStatusManagergetResourceStatusManager()${services_rest_RestContext_method_getResourceStatusManager_Title}RestConfiggetRestConfig()${services_rest_RestContext_method_getRestConfig_Title}java.util.List<Decoder>getSystemDecoders()Gets the default parser.java.util.List<Encoder>getSystemEncoders()Gets the default resource expression generator.TempObjRepositorygetTempObjRepository()Obtains the algorithm parameters and algorithm results in the REST application context.VerifiergetVerifier()Returns to the security tester in the REST service.protected voidloadExpandPlugin(java.util.List components)Initialize the REST service interface plug-in associated with the corresponding service component.java.lang.Objectput(java.lang.String key, java.lang.Object obj)${services_rest_RestContext_method_put_Title}voidsetAttributes(java.util.Map attributes)${services_rest_RestContext_method_setAttributes_Title}voidsetInterfaceContext(InterfaceContext interfaceContext)Sets the interface context.voidsetResourceManager(ResourceManager resourceManager)${services_rest_RestContext_method_setResourceManager_Title}voidsetResourceStatusManager(ResourceStatusManager resourceStatusManager)${services_rest_RestContext_method_setResourceStatusManager_Title}voidsetRestConfig(RestConfig restConfig)${services_rest_RestContext_method_setRestConfig_Title}voidsetTempObjRepository(TempObjRepository tempObjRepository)${services_rest_RestContext_method_setTempObjRepository_Title}voidsetVerifier(Verifier verifier)Sets to the security tester in the REST service.
-
-
-
Field Detail
-
DEFAULT_CONTEXT_FILENAME
public static final java.lang.String DEFAULT_CONTEXT_FILENAME
The default REST application context configuration file path (default relative to the installation root).
-
DEFAULT_CONTEXT_JARPATH
public static final java.lang.String DEFAULT_CONTEXT_JARPATH
The default REST application context profile in the Jar package path (as opposed to the SuperMap iServer Jar package).
-
CORE_BEAN_FILENAME
public static final java.lang.String CORE_BEAN_FILENAME
REST The path to the core component (bean) configuration file (relative to the Jar package for SuperMap iServer).
-
EXTENDS_RESOURCE_FILENAME
public static final java.lang.String EXTENDS_RESOURCE_FILENAME
Extending the path of the resource's configuration file (default relative to the installation root).
-
APPBEANMAP
public static final java.lang.String APPBEANMAP
REST application component mapping.
-
ERROR
public static final java.lang.String ERROR
Error message "ERROR".
-
-
Constructor Detail
-
RestContext
public RestContext()
The Constructor.
-
RestContext
public RestContext(java.util.List<java.lang.Object> beans)
${services_rest_RestContext_constructor_RestContextByDefault_Title}
${services_rest_RestContext_constructor_RestContextByDefault_Description}
-
RestContext
public RestContext(java.lang.String appContextFileName)
Constructs an application context based on the given REST application context configuration file.- Parameters:
appContextFileName- REST Applies the context profile path.
-
RestContext
public RestContext(java.io.File file, java.util.List<java.lang.Object> beans)Constructs a REST application context based on a contextual configuration file for the file system.- Parameters:
file- REST Apply the context configuration file (File object).
-
RestContext
public RestContext(java.lang.String appContextFileName, java.util.List<java.lang.Object> beans)The Constructor.
- Parameters:
appContextFileName- REST Applies the context profile path.beans- Context configuration object.
-
RestContext
public RestContext(ResourceManager resourceManager, RestConfig restConfig, TempObjRepository tempObjRepository, ResourceStatusManager resourceStatusManager)
${services_rest_RestContext_constructor_RestContextByParam_Title}
${services_rest_RestContext_constructor_RestContextByParam_Description}
- Parameters:
resourceManager- ${ services_rest_RestContext_constructor_RestContextByParam_param_resourceManager }restConfig- ${ services_rest_RestContext_constructor_RestContextByParam_param_restConfig }tempObjRepository- ${ services_rest_RestContext_constructor_RestContextByParam_param_tempObjRepository }resourceStatusManager- ${services_rest_RestContext_constructor_RestContextByParam_param_resourceStatusManager }
-
-
Method Detail
-
loadExpandPlugin
protected void loadExpandPlugin(java.util.List components)
Initialize the REST service interface plug-in associated with the corresponding service component. Such as filters, Encoder, Decoder and so on.- Parameters:
components- Service component list
-
get
public java.lang.Object get(java.lang.String key)
${services_rest_RestContext_method_get_Title}
${services_rest_RestContext_method_get_Description}
- Parameters:
key- ${services_rest_RestContext_method_get_param_key}- Returns:
- ${services_rest_RestContext_method_get_return}
-
put
public java.lang.Object put(java.lang.String key, java.lang.Object obj)${services_rest_RestContext_method_put_Title}
${services_rest_RestContext_method_put_Description}
- Parameters:
key- ${services_rest_RestContext_method_put_param_key}obj- ${services_rest_RestContext_method_put_param_obj}- Returns:
- ${services_rest_RestContext_method_put_return}
-
getResourceManager
public ResourceManager getResourceManager()
${services_rest_RestContext_method_getResourceManager_Title}
${services_rest_RestContext_method_getResourceManager_Description}
- Returns:
- ${services_rest_RestContext_method_getResourceManager_return}
-
setResourceManager
public void setResourceManager(ResourceManager resourceManager)
${services_rest_RestContext_method_setResourceManager_Title}
${services_rest_RestContext_method_setResourceManager_Description}
- Parameters:
resourceManager- ${ services_rest_RestContext_method_setResourceManager_param_resourceManager }
-
setRestConfig
public void setRestConfig(RestConfig restConfig)
${services_rest_RestContext_method_setRestConfig_Title}
${services_rest_RestContext_method_setRestConfig_Description}
- Parameters:
restConfig- ${services_rest_RestContext_method_setRestConfig_param_restConfig }
-
getRestConfig
public RestConfig getRestConfig()
${services_rest_RestContext_method_getRestConfig_Title}
${services_rest_RestContext_method_getRestConfig_Description}
- Returns:
- ${services_rest_RestContext_method_getRestConfig_return}
-
getAttributes
public java.util.Map getAttributes()
${services_rest_RestContext_method_getAttributes_Title}
${services_rest_RestContext_method_getAttributes_Description}
- Returns:
- ${services_rest_RestContext_method_getAttributes_return}
-
getTempObjRepository
public TempObjRepository getTempObjRepository()
Obtains the algorithm parameters and algorithm results in the REST application context.
Algorithm parameters and algorithm results warehouse, is to save the algorithm results, temporary resources and other places.
- Returns:
- ${services_rest_RestContext_method_getTempObjRepository_return}
-
setTempObjRepository
public void setTempObjRepository(TempObjRepository tempObjRepository)
${services_rest_RestContext_method_setTempObjRepository_Title}
${services_rest_RestContext_method_setTempObjRepository_Description}
- Parameters:
tempObjRepository- ${ services_rest_RestContext_method_setTempObjRepository_param_tempObjRepository }
-
setAttributes
public void setAttributes(java.util.Map attributes)
${services_rest_RestContext_method_setAttributes_Title}
${services_rest_RestContext_method_setAttributes_Description}
- Parameters:
attributes- ${services_rest_RestContext_method_setAttributes_param_attributes }
-
getResourceStatusManager
public ResourceStatusManager getResourceStatusManager()
${services_rest_RestContext_method_getResourceStatusManager_Title}
${services_rest_RestContext_method_getResourceStatusManager_Description}
- Returns:
- ${services_rest_RestContext_method_getResourceStatusManager_return }
-
setResourceStatusManager
public void setResourceStatusManager(ResourceStatusManager resourceStatusManager)
${services_rest_RestContext_method_setResourceStatusManager_Title}
${services_rest_RestContext_method_setResourceStatusManager_Description}
- Parameters:
resourceStatusManager- ${services_rest_RestContext_method_setResourceStatusManager_param_resourceStatusManager }
-
getSystemEncoders
public java.util.List<Encoder> getSystemEncoders()
Gets the default resource expression generator.
The resource expression generator is used to transform the state of the resource into a specified type of expression, such as a json format.
- Returns:
- the default resource expression generator.
-
getSystemDecoders
public java.util.List<Decoder> getSystemDecoders()
Gets the default parser.
The parser is used to deserialize a certain type of parameter string into a Java object, such as a json-formatted parameter string.
- Returns:
- default parameter parser sequence.
-
getInterfaceContext
public InterfaceContext getInterfaceContext()
Gets the interface context.
- Returns:
- the interface context.
-
setInterfaceContext
public void setInterfaceContext(InterfaceContext interfaceContext)
Sets the interface context.
- Parameters:
interfaceContext- interface context.
-
getVerifier
public Verifier getVerifier()
Returns to the security tester in the REST service.- Returns:
- safety tester.
-
setVerifier
public void setVerifier(Verifier verifier)
Sets to the security tester in the REST service.
- Parameters:
verifier- Safety test device.
-
-