Interface ServerSchemaGenerator


public interface ServerSchemaGenerator
This MBean allows callers to generate the schema pertaining to server.xml.

The ObjectName for this MBean is "WebSphere:name=com.ibm.ws.config.serverSchemaGenerator".

  • Field Details

    • OBJECT_NAME

      static final String OBJECT_NAME
      A String representing the ObjectName that this MXBean maps to.
      See Also:
    • KEY_RETURN_CODE

      static final String KEY_RETURN_CODE
      Key for the return code of the schema generation. The value is an integer that will be either RETURN_CODE_OK or RETURN_CODE_ERROR.
      See Also:
    • KEY_OUTPUT

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

      static final 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:
    • RETURN_CODE_OK

      static final int RETURN_CODE_OK
      Value of KEY_RETURN_CODE when the schema generation is successful.
      See Also:
    • RETURN_CODE_ERROR

      static final int RETURN_CODE_ERROR
      Value of KEY_RETURN_CODE when an error is encountered during schema generation.
      See Also:
  • Method Details

    • generate

      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

      Map<String,Object> generateServerSchema(String schemaVersion, String outputVersion, String encoding, 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

      Map<String,Object> generateInstallSchema(String schemaVersion, String outputVersion, String encoding, 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

      Map<String,Object> generateInstallSchema(String schemaVersion, String outputVersion, String encoding, 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