Package com.ibm.websphere.config.mbeans
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Key for the file path of the generated schema.static final String
Key for the merged (systemOut and systemErr) output of the schema generation.static final String
Key for the return code of the schema generation.static final String
A String representing theObjectName
that this MXBean maps to.static final int
Value ofKEY_RETURN_CODE
when an error is encountered during schema generation.static final int
Value ofKEY_RETURN_CODE
when the schema generation is successful. -
Method Summary
Modifier and TypeMethodDescriptiongenerate()
Generates a schema for the current runtime bundles.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.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.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.
-
Field Details
-
OBJECT_NAME
A String representing theObjectName
that this MXBean maps to.- See Also:
-
KEY_RETURN_CODE
Key for the return code of the schema generation. The value is an integer that will be eitherRETURN_CODE_OK
orRETURN_CODE_ERROR
.- See Also:
-
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
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_OKValue ofKEY_RETURN_CODE
when the schema generation is successful.- See Also:
-
RETURN_CODE_ERROR
static final int RETURN_CODE_ERRORValue ofKEY_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 usegenerateInstallSchema(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 schemaoutputVersion
- a string that indicates the output version of the generated schemaencoding
- a string that indicates the encoding to be used during generationlocale
- a string that indicates the locale to be used during generation- Returns:
- a map containing keys
KEY_RETURN_CODE
,KEY_OUTPUT
andKEY_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 schemaoutputVersion
- a string that indicates the output version of the generated schemaencoding
- a string that indicates the encoding to be used during generationlocale
- a string that indicates the locale to be used during generation- Returns:
- a map containing keys
KEY_RETURN_CODE
,KEY_OUTPUT
andKEY_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 schemaoutputVersion
- a string that indicates the output version of the generated schemaencoding
- a string that indicates the encoding to be used during generationlocale
- a string that indicates the locale to be used during generationcompactOutput
- 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
andKEY_FILE_PATH
-