com.supermap.services.rest

Class RestConfig

  • java.lang.Object
    • com.supermap.services.rest.RestConfig
  • All Implemented Interfaces:
    java.io.Serializable


    public class RestConfig
    extends java.lang.Object
    implements java.io.Serializable
    

    ${services_rest_RestConfig_Title}

    ${services_rest_RestConfig_Description}

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String defaultConfigFileName
      ${services_rest_RestConfig_attribute_defaultConfigFileName_Title}
    • Constructor Summary

      Constructors 
      Constructor and Description
      RestConfig() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object obj)
      Verifies that the object whether it is configured for the resource.
      java.lang.String getAccessControlAllowOrigin()
      Gets the initial value allowed for access control.
      java.util.Map<java.lang.String,java.lang.String> getComponentResourceMapping()
      Gets the mapping between the business component and the resource configuration file name.
      static RestConfig getDefaultConfig()
      ${services_rest_RestConfig_method_getDefaultConfig_Title}
      double getDefaultHoldTime()
      Gets the default survival time for temporary resources.
      java.lang.String getDefaultHttpActionHandlerBeanName()
      Gets the bean name of the default request handler.
      MediaType getDefaultMediaType()
      ${services_rest_RestConfig_method_getDefaultMediaType_Title}
      java.util.List<java.lang.String> getExtensionResourceFinderBeanNames()
      ${services_rest_RestConfig_method_getExtensionResourceFinderBeanNames_Title}
      java.util.List<MediaTypeMappingInfo> getRelationInfos()
      ${services_rest_RestConfig_method_getRelationInfos_Title}
      java.lang.String getResourceFileNames()
      ${services_rest_RestConfig_method_getResourceFileName_Title}
      java.util.Map getRestConfigMap()
      Gets the java.util.Map object that holds the application configuration information, where the key is the name of the configuration item and the value is the value of the configuration item.
      java.lang.String getRootPath()
      Gets the root of the REST application.
      java.util.List<java.lang.String> getSystemDecoderBeanNames()
      ${services_rest_RestConfig_method_getSystemDecoderBeanNames_Title}
      java.util.List<java.lang.String> getSystemEncoderBeanNames()
      ${services_rest_RestConfig_method_getSystemEncoderBeanNames_Title}
      int hashCode()
      Gets the hash value of the object instance
      boolean isDebug()
      ${services_rest_RestConfig_method_isDebug_Title}
      boolean isSecurityControlEnable()
      ${services_rest_RestConfig_method_isSecurityControlEnable_Title}
      static RestConfig parse(java.io.File restConfigFile)
      ${services_rest_RestConfig_method_parseByFile_Title}
      static RestConfig parse(java.util.Map configMap)
      Gets a REST application configuration according to a Map object,.
      void removeCurrentThreadRootPath() 
      void setAccessControlAllowOrigin(java.lang.String accessControlAllowOrigin)
      Sets the initial value allowed for access control.
      void setComponentResourceMapping(java.util.Map<java.lang.String,java.lang.String> componentResourceMapping)
      Sets the mapping between the business component and the resource configuration file name.
      void setCurrentThreadRootPath(java.lang.String value) 
      void setDebug(boolean isDebug)
      Sets whether to use the debug mode flag.
      void setDefaultHoldTime(double defaultHoldTime)
      Sets the default survival time for temporary resources.
      void setDefaultHttpActionHandlerBeanName(java.lang.String defaultHttpActionHandlerBeanName)
      Sets the bean name of the default request handler.
      void setDefaultMediaType(MediaType defaultMediaType)
      ${services_rest_RestConfig_method_setDefaultMediaType_Title}
      void setExtensionResourceFinderBeanNames(java.util.List<java.lang.String> extensionResourceFinderBeanNames)
      ${services_rest_RestConfig_method_setExtensionResourceFinderBeanNames_Title}
      void setRelationInfos(java.util.List<MediaTypeMappingInfo> relationInfos)
      Sets the association information for the URI suffix with the media type.
      void setResourceFileNames(java.lang.String resourceFileNames)
      ${services_rest_RestConfig_method_setResourceFileName_Title}
      void setRootPath(java.lang.String rootPath)
      ${services_rest_RestConfig_method_setRootPath_Title}
      void setSecurityControlEnable(boolean securityControlEnable)
      ${services_rest_RestConfig_method_setSecurityControlEnable_Title}
      void setSystemDecoderBeanNames(java.util.List<java.lang.String> systemDecoderBeanNames)
      ${services_rest_RestConfig_method_setSystemDecoderBeanNames_Title}
      void setSystemEncoderBeanNames(java.util.List<java.lang.String> systemEncoderBeanNames)
      ${services_rest_RestConfig_method_setSystemEncoderBeanNames_Title}
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • defaultConfigFileName

        public static final java.lang.String defaultConfigFileName
        

        ${services_rest_RestConfig_attribute_defaultConfigFileName_Title}

        ${services_rest_RestConfig_attribute_defaultConfigFileName_Description}

    • Constructor Detail

      • RestConfig

        public RestConfig()
        
    • Method Detail

      • getRootPath

        public java.lang.String getRootPath()
        

        Gets the root of the REST application.

        For example: REST application root directory: "/ services / rest", the REST application published in the machine 8090 port, the root resource URI: http: // localhost: 8090 / services / rest, accordingly, maps resources The URI is: http: // localhost: 8090 / services / rest / maps.

        Returns:
        REST The application's root directory string.
      • setCurrentThreadRootPath

        public void setCurrentThreadRootPath(java.lang.String value)
        
      • equals

        public boolean equals(java.lang.Object obj)
        

        Verifies that the object whether it is configured for the resource.

        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj -
        Returns:
      • hashCode

        public int hashCode()
        
        Gets the hash value of the object instance
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hash value
      • getRestConfigMap

        public java.util.Map getRestConfigMap()
        

        Gets the java.util.Map object that holds the application configuration information, where the key is the name of the configuration item and the value is the value of the configuration item.

        ${services_rest_RestConfig_method_getRestConfigMap_Description}

        Returns:
        REST Configuration information mapping.
      • setDebug

        public void setDebug(boolean isDebug)
        

        Sets whether to use the debug mode flag.

        In debug mode, all the media types that the server responds to are in the form of text / plain for debugging purposes.

        Parameters:
        isDebug - isDebug it is set to true for debug mode, otherwise it is set to non-debug mode.
      • setSecurityControlEnable

        public void setSecurityControlEnable(boolean securityControlEnable)
        

        ${services_rest_RestConfig_method_setSecurityControlEnable_Title}

        ${services_rest_RestConfig_method_setSecurityControlEnable_Description}

        Parameters:
        securityControlEnable - ${services_rest_RestConfig_method_setSecurityControlEnable_param_securityControlEnable}
      • setRootPath

        public void setRootPath(java.lang.String rootPath)
        

        ${services_rest_RestConfig_method_setRootPath_Title}

        ${services_rest_RestConfig_method_setRootPath_Description}

        Parameters:
        rootPath - ${services_rest_RestConfig_method_setRootPath_param_rootPath}
      • getExtensionResourceFinderBeanNames

        public java.util.List<java.lang.String> getExtensionResourceFinderBeanNames()
        

        ${services_rest_RestConfig_method_getExtensionResourceFinderBeanNames_Title}

        ${services_rest_RestConfig_method_getExtensionResourceFinderBeanNames_Description}

        Returns:
        ${services_rest_RestConfig_method_getExtensionResourceFinderBeanNames_return}
      • setExtensionResourceFinderBeanNames

        public void setExtensionResourceFinderBeanNames(java.util.List<java.lang.String> extensionResourceFinderBeanNames)
        

        ${services_rest_RestConfig_method_setExtensionResourceFinderBeanNames_Title}

        ${services_rest_RestConfig_method_setExtensionResourceFinderBeanNames_Description}

        Parameters:
        extensionResourceFinderBeanNames - ${services_rest_RestConfig_method_setExtensionResourceFinderBeanNames_param_extensionResourceFinderBeanNames}
      • getResourceFileNames

        public java.lang.String getResourceFileNames()
        

        ${services_rest_RestConfig_method_getResourceFileName_Title}

        ${services_rest_RestConfig_method_getResourceFileName_Description}

        Returns:
        ${services_rest_RestConfig_method_getResourceFileName_return}
      • setResourceFileNames

        public void setResourceFileNames(java.lang.String resourceFileNames)
        

        ${services_rest_RestConfig_method_setResourceFileName_Title}

        ${services_rest_RestConfig_method_setResourceFileName_Description}

        Parameters:
        resourceFileNames - ${services_rest_RestConfig_method_setResourceFileName_param_resourceFileName}
      • getDefaultMediaType

        public MediaType getDefaultMediaType()
        

        ${services_rest_RestConfig_method_getDefaultMediaType_Title}

        ${services_rest_RestConfig_method_getDefaultMediaType_Description}

        Returns:
        ${services_rest_RestConfig_method_getDefaultMediaType_return}
      • setDefaultMediaType

        public void setDefaultMediaType(MediaType defaultMediaType)
        

        ${services_rest_RestConfig_method_setDefaultMediaType_Title}

        ${services_rest_RestConfig_method_setDefaultMediaType_Description}

        Parameters:
        defaultMediaType - ${services_rest_RestConfig_method_setDefaultMediaType_param_defaultMediaType}
      • setRelationInfos

        public void setRelationInfos(java.util.List<MediaTypeMappingInfo> relationInfos)
        

        Sets the association information for the URI suffix with the media type.

        ${services_rest_RestConfig_method_setRelationInfos_Description}

        Parameters:
        relationInfos - ${services_rest_RestConfig_method_setRelationInfos_param_relationInfos}
      • setSystemEncoderBeanNames

        public void setSystemEncoderBeanNames(java.util.List<java.lang.String> systemEncoderBeanNames)
        

        ${services_rest_RestConfig_method_setSystemEncoderBeanNames_Title}

        ${services_rest_RestConfig_method_setSystemEncoderBeanNames_Description}

        Parameters:
        systemEncoderBeanNames - ${services_rest_RestConfig_method_setSystemEncoderBeanNames_param_systemEncoderBeanNames}
      • getSystemEncoderBeanNames

        public java.util.List<java.lang.String> getSystemEncoderBeanNames()
        

        ${services_rest_RestConfig_method_getSystemEncoderBeanNames_Title}

        ${services_rest_RestConfig_method_getSystemEncoderBeanNames_Description}

        Returns:
        ${services_rest_RestConfig_method_getSystemEncoderBeanNames_return}
      • getRelationInfos

        public java.util.List<MediaTypeMappingInfo> getRelationInfos()
        

        ${services_rest_RestConfig_method_getRelationInfos_Title}

        ${services_rest_RestConfig_method_getRelationInfos_Description}

        Returns:
        ${services_rest_RestConfig_method_getRelationInfos_return}
      • getSystemDecoderBeanNames

        public java.util.List<java.lang.String> getSystemDecoderBeanNames()
        

        ${services_rest_RestConfig_method_getSystemDecoderBeanNames_Title}

        ${services_rest_RestConfig_method_getSystemDecoderBeanNames_Description}

        Returns:
        ${services_rest_RestConfig_method_getSystemDecoderBeanNames_return}
      • setSystemDecoderBeanNames

        public void setSystemDecoderBeanNames(java.util.List<java.lang.String> systemDecoderBeanNames)
        

        ${services_rest_RestConfig_method_setSystemDecoderBeanNames_Title}

        ${services_rest_RestConfig_method_setSystemDecoderBeanNames_Description}

        Parameters:
        systemDecoderBeanNames - ${services_rest_RestConfig_method_setSystemDecoderBeanNames_param_systemDecoderBeanNames}
      • isDebug

        public boolean isDebug()
        

        ${services_rest_RestConfig_method_isDebug_Title}

        ${services_rest_RestConfig_method_isDebug_Description}

        Returns:
        ${services_rest_RestConfig_method_isDebug_return}
      • isSecurityControlEnable

        public boolean isSecurityControlEnable()
        

        ${services_rest_RestConfig_method_isSecurityControlEnable_Title}

        ${services_rest_RestConfig_method_isSecurityControlEnable_Description}

        Returns:
        ${services_rest_RestConfig_method_isSecurityControlEnable_return}
      • getComponentResourceMapping

        public java.util.Map<java.lang.String,java.lang.String> getComponentResourceMapping()
        

        Gets the mapping between the business component and the resource configuration file name.

        Returns:
        the mapping between the business component and the resource configuration file name.
      • setComponentResourceMapping

        public void setComponentResourceMapping(java.util.Map<java.lang.String,java.lang.String> componentResourceMapping)
        

        Sets the mapping between the business component and the resource configuration file name.

        Parameters:
        componentResourceMapping - the mapping between the business component and the resource configuration file name.
      • getDefaultHttpActionHandlerBeanName

        public java.lang.String getDefaultHttpActionHandlerBeanName()
        

        Gets the bean name of the default request handler.

        Returns:
        the bean name of the default request handler.
      • setDefaultHttpActionHandlerBeanName

        public void setDefaultHttpActionHandlerBeanName(java.lang.String defaultHttpActionHandlerBeanName)
        

        Sets the bean name of the default request handler.

        Parameters:
        defaultHttpActionHandlerBeanName - The default request handler bean name.
      • parse

        public static RestConfig parse(java.io.File restConfigFile)
        

        ${services_rest_RestConfig_method_parseByFile_Title}

        ${services_rest_RestConfig_method_parseByFile_Description}

        Parameters:
        restConfigFile - ${services_rest_RestConfig_method_parseByFile_param_restConfigFile}
        Returns:
        ${services_rest_RestConfig_method_parseByFile_return}
      • parse

        public static RestConfig parse(java.util.Map configMap)
        

        Gets a REST application configuration according to a Map object,.

        Parameters:
        configMap - The java.util.Map object that stores the application configuration information.
        Returns:
        RestConfig Object.
      • getDefaultConfig

        public static RestConfig getDefaultConfig()
        

        ${services_rest_RestConfig_method_getDefaultConfig_Title}

        ${services_rest_RestConfig_method_getDefaultConfig_Description}

        Returns:
        ${services_rest_RestConfig_method_getDefaultConfig_return}
      • getAccessControlAllowOrigin

        public java.lang.String getAccessControlAllowOrigin()
        

        Gets the initial value allowed for access control.

        Returns:
        access control allows the initial value, which sets the REST service that can be accessed by those services across domains.
      • setAccessControlAllowOrigin

        public void setAccessControlAllowOrigin(java.lang.String accessControlAllowOrigin)
        

        Sets the initial value allowed for access control.

        Parameters:
        accessControlAllowOrigin - Access control allows initial values.
      • getDefaultHoldTime

        public double getDefaultHoldTime()
        

        Gets the default survival time for temporary resources.

        Returns:
        The default survival time for temporary resources.
      • setDefaultHoldTime

        public void setDefaultHoldTime(double defaultHoldTime)
        

        Sets the default survival time for temporary resources.

        Parameters:
        defaultHoldTime - the default survival time for temporary resources.
      • removeCurrentThreadRootPath

        public void removeCurrentThreadRootPath()