public class RevisionAdministrator
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RevisionAdministrator.SchemaType |
Constructor and Description |
---|
RevisionAdministrator(javax.xml.registry.Connection connection)
Constructs new
RevisionAdministrator object. |
RevisionAdministrator(com.centrasite.jaxr.JAXRAccessor jaxr)
Constructs new
RevisionAdministrator object. |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
createObjectType(java.lang.String namespace,
java.lang.String type)
Delivers an objectType string in the shape: "{namespace}type"
|
void |
defineUserSchema(java.lang.String schemaName)
Defines a doctype-schema from user defined type.
|
void |
disable()
Disables the revision and checkpoint environment.
|
void |
enable()
Enables the revision and checkpoint environment.
|
void |
enableNewTypes()
Enables new types during repair: a repair step has added a new
type or some new types, now create the corresponding versioned schemas.
|
boolean |
isEnabled()
Checks it the revision infrastructure is enabled.
|
static void |
main(java.lang.String[] args)
Main entry that provides the possiblity to activate the revision feature via direct
call (from the command line)
|
void |
printStatus(boolean extended)
Prints status about enabling of revision.
|
void |
setLogging(boolean logging)
Enables logging during revision enablement.
|
void |
undefineUserSchema(java.lang.String schemaName)
Undefines a doctype-schema from user defined type.
|
void |
update(RevisionAdministrator.SchemaType schemaType)
Updates the base schemas during repair: a repair step has updated one
of the base schemas, now update the versioned schema by recreating it.
|
public RevisionAdministrator(com.centrasite.jaxr.JAXRAccessor jaxr) throws javax.xml.registry.JAXRException
RevisionAdministrator
object.jaxr
- the jaxr accessor object.javax.xml.registry.JAXRException
- if an internal error occurs on creating the instance.public RevisionAdministrator(javax.xml.registry.Connection connection) throws javax.xml.registry.JAXRException
RevisionAdministrator
object.connection
- a jaxr connection object.javax.xml.registry.JAXRException
- if an internal error occurs on creating the instance.public void setLogging(boolean logging)
logging
- true
do logging during enable()public void enable() throws RevisionException
After enablement all JAXR objects will create revisions on insert and update. It has no effect if the feature is already enabled. Finally it commits all the updates.
RevisionException
- could not be enabledpublic void disable() throws RevisionException
RevisionException
- if an internal error occurspublic void enableNewTypes() throws java.lang.Exception
java.lang.Exception
- if an internal error occurspublic void update(RevisionAdministrator.SchemaType schemaType) throws java.lang.Exception
schemaType
- a versioned schema of type SchemaType
java.lang.Exception
- if an internal error occurspublic boolean isEnabled()
true
revision is enabled;
false
disabledpublic void defineUserSchema(java.lang.String schemaName)
schemaName
- the name of the schema (typically: "uddi_...")public void undefineUserSchema(java.lang.String schemaName)
schemaName
- the name of the schema (typically: "uddi_...")public void printStatus(boolean extended) throws java.lang.Exception
extended
- true
extended view;
false
just print "true" or "false"java.lang.Exception
- if an internal error occurspublic static java.lang.String createObjectType(java.lang.String namespace, java.lang.String type)
namespace
- the namespace of the objecttype
- the type of the objectpublic static void main(java.lang.String[] args) throws java.lang.Exception
args
- function [-h host] [-user user] [-password password] function: -enable, -disable, -check
java.lang.Exception
- if an internal error occurs