Interface ServerSchemaGenerator

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String KEY_FILE_PATH
      Key for the file path of the generated schema.
      static java.lang.String KEY_OUTPUT
      Key for the merged (systemOut and systemErr) output of the schema generation.
      static java.lang.String KEY_RETURN_CODE
      Key for the return code of the schema generation.
      static java.lang.String OBJECT_NAME
      A String representing the ObjectName that this MXBean maps to.
      static int RETURN_CODE_ERROR
      Value of KEY_RETURN_CODE when an error is encountered during schema generation.
      static int RETURN_CODE_OK
      Value of KEY_RETURN_CODE when the schema generation is successful.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String generate()
      Generates a schema for the current runtime bundles.
      java.util.Map<java.lang.String,​java.lang.Object> generateInstallSchema​(java.lang.String schemaVersion, java.lang.String outputVersion, java.lang.String encoding, java.lang.String locale)
      Creates a local file containing a schema for the installed features, generated with the given options.
      java.util.Map<java.lang.String,​java.lang.Object> generateInstallSchema​(java.lang.String schemaVersion, java.lang.String outputVersion, java.lang.String encoding, java.lang.String locale, boolean compactOutput)
      Creates a local file containing a schema for the installed features, generated with the given options.
      java.util.Map<java.lang.String,​java.lang.Object> generateServerSchema​(java.lang.String schemaVersion, java.lang.String outputVersion, java.lang.String encoding, java.lang.String locale)
      Creates a local file containing a schema for the current runtime bundles, generated with the given options.
    • Field Detail

      • OBJECT_NAME

        static final java.lang.String OBJECT_NAME
        A String representing the ObjectName that this MXBean maps to.
        See Also:
        Constant Field Values
      • KEY_OUTPUT

        static final java.lang.String KEY_OUTPUT
        Key for the merged (systemOut and systemErr) output of the schema generation. The value is a java.lang.String
        See Also:
        Constant Field Values
      • KEY_FILE_PATH

        static final java.lang.String KEY_FILE_PATH
        Key for the file path of the generated schema. The value is a java.lang.String and represents the absolute location of the generated schema in the server's file system.
        See Also:
        Constant Field Values
    • Method Detail

      • generate

        java.lang.String generate()
        Generates a schema for the current runtime bundles. This is often not the desired output, since it only includes the currently load bundles. Users that are interested in the schema for the full set of installed features should use generateInstallSchema(String, String, String, String).
        Returns:
        a String containing the generated schema for the current runtime.
      • generateServerSchema

        java.util.Map<java.lang.String,​java.lang.Object> generateServerSchema​(java.lang.String schemaVersion,
                                                                                    java.lang.String outputVersion,
                                                                                    java.lang.String encoding,
                                                                                    java.lang.String locale)
        Creates a local file containing a schema for the current runtime bundles, generated with the given options. It is the responsibility of the user to delete this generated file after it is used, since the server will only delete it during the next server startup.
        Parameters:
        schemaVersion - a string that indicates the schema version of the generated schema
        outputVersion - a string that indicates the output version of the generated schema
        encoding - a string that indicates the encoding to be used during generation
        locale - a string that indicates the locale to be used during generation
        Returns:
        a map containing keys KEY_RETURN_CODE, KEY_OUTPUT and KEY_FILE_PATH
      • generateInstallSchema

        java.util.Map<java.lang.String,​java.lang.Object> generateInstallSchema​(java.lang.String schemaVersion,
                                                                                     java.lang.String outputVersion,
                                                                                     java.lang.String encoding,
                                                                                     java.lang.String locale)
        Creates a local file containing a schema for the installed features, generated with the given options. It is the responsibility of the user to delete this generated file after it is used, since the server will only delete it during the next server startup.
        Parameters:
        schemaVersion - a string that indicates the schema version of the generated schema
        outputVersion - a string that indicates the output version of the generated schema
        encoding - a string that indicates the encoding to be used during generation
        locale - a string that indicates the locale to be used during generation
        Returns:
        a map containing keys KEY_RETURN_CODE, KEY_OUTPUT and KEY_FILE_PATH
      • generateInstallSchema

        java.util.Map<java.lang.String,​java.lang.Object> generateInstallSchema​(java.lang.String schemaVersion,
                                                                                     java.lang.String outputVersion,
                                                                                     java.lang.String encoding,
                                                                                     java.lang.String locale,
                                                                                     boolean compactOutput)
        Creates a local file containing a schema for the installed features, generated with the given options. It is the responsibility of the user to delete this generated file after it is used, since the server will only delete it during the next server startup.
        Parameters:
        schemaVersion - a string that indicates the schema version of the generated schema
        outputVersion - a string that indicates the output version of the generated schema
        encoding - a string that indicates the encoding to be used during generation
        locale - a string that indicates the locale to be used during generation
        compactOutput - a boolean value that indicates if the schema output will contain any indenting white spaces, new line feeds or XML comments
        Returns:
        a map containing keys KEY_RETURN_CODE, KEY_OUTPUT and KEY_FILE_PATH