Ruddi™ UDDI Client API
1.0

inspireit.uddi.request
Class UDDIProfile

java.lang.Object
  |
  +--inspireit.uddi.request.UDDIProfile
All Implemented Interfaces:
java.io.Serializable

public class UDDIProfile
extends java.lang.Object
implements java.io.Serializable

UDDIProfile defines a context of execution for a UDDI client/server interaction. The system properties are automatically part of the profile. In addition, the following properties can be set:

It is to be noticed that property names starting with "inspireit" are considered as reserved keywords. Trying to register a property with a name starting with "inspireit" and that is not a recognized reserved keyword will lead to the throwing of a runtime exception.

Author:
Bertrand Fontaine, INSPIRE IT $Revision: 1.2 $
See Also:
Serialized Form

Field Summary
protected  java.util.Hashtable properties
          Internal structure to keep track of the profile properties.
 
Constructor Summary
UDDIProfile()
          UDDIProfile default constructor.
UDDIProfile(java.net.URL queryURL, java.net.URL publishURL, java.lang.String username, java.lang.String password, int version)
          UDDIProfile constructor.
 
Method Summary
protected  void checkKeynameValidity(java.lang.String keyname)
          Checks whether the keyname of a property is valid.
 java.lang.String getPassword()
          Gets the password required to publish.
 java.lang.String getProperty(java.lang.String keyname)
          Gets a profile property by name.
 java.net.URL getPublishURL()
          Gets the URL to which publishing requests are sent.
 java.net.URL getQueryURL()
          Gets the URL to which query requests are sent.
 java.net.URL getSecurityURL()
          Gets the URL to which security requests are sent.
 java.lang.String getUsername()
          Gets the username required to publish.
 int getVersion()
          Gets the UDDI version in use.
static inspireit.uddi.request.UDDIProfile load(java.lang.String filename)
          Loads a UDDIProfile from a file.
 void save(java.lang.String filename)
          Saves a UDDIProfile to a file.
 void setPassword(java.lang.String password)
          Sets the password required to publish.
 void setProperty(java.lang.String keyname, java.lang.String keyvalue)
          Sets a property to the profile.
 void setPublishURL(java.net.URL publishURL)
          Sets the URL to which publishing requests are sent.
 void setQueryURL(java.net.URL queryURL)
          Sets the URL to which query requests are sent.
 void setSecurityURL(java.net.URL securityURL)
          Sets the URL to which security requests are sent.
 void setUsername(java.lang.String username)
          Sets the username required to publish.
 void setVersion(int version)
          Sets the UDDI version in use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

protected java.util.Hashtable properties
Internal structure to keep track of the profile properties.

Constructor Detail

UDDIProfile

public UDDIProfile()
UDDIProfile default constructor.


UDDIProfile

public UDDIProfile(java.net.URL queryURL,
                   java.net.URL publishURL,
                   java.lang.String username,
                   java.lang.String password,
                   int version)
UDDIProfile constructor.

Parameters:
queryURL - URL to which query requests are sent.
publishURL - URL to which publishing requests are sent.
username - The username required to publish.
password - The password required to publish.
version - The UDDI version in use.
Method Detail

setProperty

public void setProperty(java.lang.String keyname,
                        java.lang.String keyvalue)
Sets a property to the profile.

Parameters:
keyname - The name under which the property is known.
keyvalue - The property value.

getProperty

public java.lang.String getProperty(java.lang.String keyname)
Gets a profile property by name.

Parameters:
keyname - The name of the property.
Returns:
the value of the property

load

public static inspireit.uddi.request.UDDIProfile load(java.lang.String filename)
                                               throws java.lang.Exception
Loads a UDDIProfile from a file.

Parameters:
filename - The file name.
Returns:
the UDDIProfile stored in the file
Throws:
if - the UDDIProfile could not be read from the file
java.lang.Exception

save

public void save(java.lang.String filename)
          throws java.lang.Exception
Saves a UDDIProfile to a file.

Parameters:
filename - The file name.
Throws:
if - the UDDIProfile could not be written to the file
java.lang.Exception

setQueryURL

public void setQueryURL(java.net.URL queryURL)
Sets the URL to which query requests are sent.

Parameters:
queryURL - The URL to which query requests are sent.

getQueryURL

public java.net.URL getQueryURL()
Gets the URL to which query requests are sent.

Returns:
the URL to which query requests are sent

setPublishURL

public void setPublishURL(java.net.URL publishURL)
Sets the URL to which publishing requests are sent.

Parameters:
publishURL - The URL to which publishing requests are sent.

getPublishURL

public java.net.URL getPublishURL()
Gets the URL to which publishing requests are sent.

Returns:
the URL to which publishing requests are sent

setSecurityURL

public void setSecurityURL(java.net.URL securityURL)
Sets the URL to which security requests are sent. If no security URL is provided, the publishing URL is used instead.

Parameters:
securityURL - The URL to which security requests are sent.

getSecurityURL

public java.net.URL getSecurityURL()
Gets the URL to which security requests are sent. If no security URL has been provided, null is returned. However, in that context, the publishing URL will be used to attempt performing the required security operations.

Returns:
the URL to which security requests are sent

setUsername

public void setUsername(java.lang.String username)
Sets the username required to publish.

Parameters:
username - The username required to publish.

getUsername

public java.lang.String getUsername()
Gets the username required to publish.

Returns:
the usename required to publish

getPassword

public java.lang.String getPassword()
Gets the password required to publish.

Returns:
the password required to publish

setPassword

public void setPassword(java.lang.String password)
Sets the password required to publish.

Parameters:
password - The password required to publish.

setVersion

public void setVersion(int version)
Sets the UDDI version in use. If an invalid version is passed, a Runtime exception is thrown.

Parameters:
version - The UDDI version in use
See Also:
UDDIConstants

getVersion

public int getVersion()
Gets the UDDI version in use.

Returns:
the UDDI version in use
See Also:
UDDIConstants

checkKeynameValidity

protected void checkKeynameValidity(java.lang.String keyname)
                             throws java.lang.RuntimeException
Checks whether the keyname of a property is valid. Keynames that start with "inspireit" have to be recognized as reserved keywords.

Parameters:
keyname - The keyname to validate.
Throws:
java.lang.RuntimeException - if the keyname is not valid

Ruddi™ UDDI Client API
1.0

Download now! | Submit a bug or feature
(c) 2003 INSPIRE IT
Bld Brand Whitlock 109
1200 Brussels, Belgium
All Rights Reserved.