|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jafer.registry.uddi.TModelManager
public class TModelManager
This class manages TModel instances in the registry it is connected to. These
have to be initialised first for the user to perform any operations on
service providers and their services. The TModels implement the registry
protocol and category concepts. In order to create missing tmodels a user
name and credential is required. Some applications do not want to expose
these to the user hence the TModelManager can be created in two modes.
Read only - The manager will only attempt to load the tmodels
throwing a RegistryNotInitialisedException if expected models are not found
Create - The manager will load and create any tmodels that are
missing.
Field Summary | |
---|---|
static java.lang.String |
CATEGORY_DDC
Stores a reference to the DDC TMODEL key. |
static java.lang.String |
CATEGORY_GENERAL_KEYWORDS
Stores a reference to the general keywords TMODEL key. |
static java.lang.String |
CATEGORY_LCSH
Stores a reference to the LCSH TMODEL key. |
protected static java.util.logging.Logger |
logger
Stores a reference to the Logger |
static java.lang.String |
PROTOCOL_SRW
Stores a reference to the SRW TMODEL key. |
static java.lang.String |
PROTOCOL_Z3950
Stores a reference to the Z3950 TMODEL key. |
static java.lang.String |
TMODEL_CONFIG_FILE
Stores a reference to the configuration file location |
private java.util.HashMap |
tModels
Stores a reference to the cache of available TModels. |
Constructor Summary | |
---|---|
TModelManager(org.uddi4j.client.UDDIProxy registryConnection)
This constructor assumes that all TModels are set up already in the registry and hence searches to find the required keys only. |
|
TModelManager(org.uddi4j.client.UDDIProxy registryConnection,
java.lang.String username,
java.lang.String credential)
This constructor assumes that all TModels are not set up in the registry and hence attempts to define them if it is unable to locate them first. |
Method Summary | |
---|---|
private void |
buildTModelCache(org.uddi4j.client.UDDIProxy registryConnection,
java.lang.String username,
java.lang.String credential,
boolean createIfNotFound)
This method is responsible for building the cache of available TMOdels. |
private TModel |
createJaferTModel(org.uddi4j.client.UDDIProxy registryConnection,
java.lang.String username,
java.lang.String credential,
boolean createIfNotFound,
org.w3c.dom.Node jaferTModelNode)
Creates a complete Jafer TModel that encapsulates the set of defined UDDI TModels. |
TModel |
getCategoryTModel(CategoryType categoryType)
This method returns a TModel representing the category type |
TModel |
getProtocolTModel(Protocol protocol)
This method returns a TModel representing the protocol |
TModel |
getTModel(java.lang.String tModelName)
Gets the specified TModel instance |
private org.uddi4j.datatype.tmodel.TModel |
publishTModel(org.uddi4j.client.UDDIProxy registryConnection,
java.lang.String username,
java.lang.String credential,
java.lang.String name,
java.lang.String description,
java.lang.String docURL)
This method creates the TModel in the registry and then returns it. |
private org.uddi4j.datatype.tmodel.TModel |
retrieveTModel(org.uddi4j.client.UDDIProxy registryConnection,
java.lang.String key)
This method creates the TModel by retrieving it from the UDDI registry |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROTOCOL_Z3950
public static final java.lang.String PROTOCOL_SRW
public static final java.lang.String CATEGORY_DDC
public static final java.lang.String CATEGORY_LCSH
public static final java.lang.String CATEGORY_GENERAL_KEYWORDS
public static final java.lang.String TMODEL_CONFIG_FILE
protected static java.util.logging.Logger logger
private java.util.HashMap tModels
Constructor Detail |
---|
public TModelManager(org.uddi4j.client.UDDIProxy registryConnection) throws RegistryNotInitialisedException, RegistryException
registryConnection
- The instance to use to comunicate with the
registry
RegistryNotInitialisedException
RegistryException
public TModelManager(org.uddi4j.client.UDDIProxy registryConnection, java.lang.String username, java.lang.String credential) throws RegistryException, InvalidAuthorisationDetailsException
registryConnection
- The connection to the UDDI registryusername
- The username of the user using the registry.credential
- The credential required to authenticate user
RegistryNotInitialisedException
- Signifies the registry has not
been pre-initialised
RegistryInitialisationException
InvalidAuthorisationDetailsException
RegistryException
Method Detail |
---|
public TModel getTModel(java.lang.String tModelName)
tModelName
- The name of the TModel required
public TModel getCategoryTModel(CategoryType categoryType) throws RegistryException
categoryType
- The category type to check against
RegistryException
public TModel getProtocolTModel(Protocol protocol) throws RegistryException
protocol
- The protocol type to check against
RegistryException
private void buildTModelCache(org.uddi4j.client.UDDIProxy registryConnection, java.lang.String username, java.lang.String credential, boolean createIfNotFound) throws RegistryNotInitialisedException, RegistryException, InvalidAuthorisationDetailsException
registryConnection
- The connection to the UDDI registryusername
- The username of the user using the registry.credential
- The credential required to authenticate usercreateIfNotFound
- Flag to indicate if the the TModel should be
created if not found
RegistryNotInitialisedException
RegistryExceptionImpl
InvalidAuthorisationDetailsException
RegistryException
private TModel createJaferTModel(org.uddi4j.client.UDDIProxy registryConnection, java.lang.String username, java.lang.String credential, boolean createIfNotFound, org.w3c.dom.Node jaferTModelNode) throws RegistryNotInitialisedException, RegistryException, JaferException, InvalidAuthorisationDetailsException
registryConnection
- The connection to the UDDI registryusername
- The username of the user using the registry.credential
- The credential required to authenticate usercreateIfNotFound
- Flag to indicate if the the TModel should be
created if not foundjaferTModelNode
- The XML node representing a jafer tmodel in the
configuration file
RegistryNotInitialisedException
RegistryExceptionImpl
JaferException
InvalidAuthorisationDetailsException
RegistryException
private org.uddi4j.datatype.tmodel.TModel publishTModel(org.uddi4j.client.UDDIProxy registryConnection, java.lang.String username, java.lang.String credential, java.lang.String name, java.lang.String description, java.lang.String docURL) throws RegistryException, InvalidAuthorisationDetailsException
registryConnection
- The connection to the UDDI registryusername
- The username of the user using the registry.credential
- The credential required to authenticate username
- The name of the model to createdescription
- the description of the model to createdocURL
- The url to the tmodel overview document
RegistryExceptionImpl
InvalidAuthorisationDetailsException
RegistryException
private org.uddi4j.datatype.tmodel.TModel retrieveTModel(org.uddi4j.client.UDDIProxy registryConnection, java.lang.String key) throws RegistryException
registryConnection
- The connection to the UDDI registrykey
- The key for the TModel
RegistryExceptionImpl
RegistryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |