de.bea.domingo.map
Class NotesLocation

java.lang.Object
  extended by de.bea.domingo.map.NotesLocation

public final class NotesLocation
extends java.lang.Object

Location of a Notes database.

Author:
Kurt Riede

Field Summary
static java.lang.String HTTP_PROTOCOL
          Protocol of a notes location.
static java.lang.String LOCAL_HOST
          Standard identifier for the local host.
static java.lang.String NOTES_PROTOCOL
          Protocol of a notes location.
 
Constructor Summary
NotesLocation(NotesLocation context, java.lang.String path)
          Constructor.
NotesLocation(NotesLocation context, java.lang.String server, java.lang.String path)
          Creates a new local location.
NotesLocation(java.lang.String locationUri)
          Constructor.
NotesLocation(java.lang.String server, java.lang.String path)
          Constructor for local locations.
 
Method Summary
 java.lang.String getHost()
          Returns the host of the notes location or null if it's an IIOP location.
 java.lang.String getIIOPPasswd()
          Deprecated. use getPassword() instead
 java.lang.String getIIOPUser()
          Deprecated. use getUsername() instead
static NotesLocation getInstance(NotesLocation context, java.lang.String server, java.lang.String path)
          Factory method for local Location.
static NotesLocation getInstance(java.lang.String location)
          Factory method for Location objects.
 NotesLocation getLocalLocation()
          Returns the local location corresponding to this location.
 java.lang.String getLocalServer()
          Returns a string representing the local server.
 java.lang.String getPassword()
          Returns the IIOP Password.
 java.lang.String getPath()
          Returns the path of the notes location.
protected  java.lang.String getPathSep()
          Returns the separator string between host and path in locations.
 java.lang.String getProtocol()
          Returns the protocol of the location.
 java.lang.String getServer()
          Returns the server part of a location.
 java.lang.String getUsername()
          Returns the IIOP Username.
 boolean isHttp()
          Checks if the notes location is using the HTTP protocol.
 boolean isIIOP()
          Checks if the notes location is a IIOP location or not.
 boolean isLocal()
          Checks if a notes location is local or not.
protected  void setLocation(java.lang.String locationUri)
          Sets the location string.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NOTES_PROTOCOL

public static final java.lang.String NOTES_PROTOCOL
Protocol of a notes location.

See Also:
Constant Field Values

HTTP_PROTOCOL

public static final java.lang.String HTTP_PROTOCOL
Protocol of a notes location.

See Also:
Constant Field Values

LOCAL_HOST

public static final java.lang.String LOCAL_HOST
Standard identifier for the local host.

See Also:
Constant Field Values
Constructor Detail

NotesLocation

public NotesLocation(java.lang.String locationUri)
Constructor.

Parameters:
locationUri - URI of location of database.

NotesLocation

public NotesLocation(NotesLocation context,
                     java.lang.String path)
Constructor.

Parameters:
context - parent location
path - path relative to context

NotesLocation

public NotesLocation(NotesLocation context,
                     java.lang.String server,
                     java.lang.String path)
Creates a new local location. This method doesn't handle IIOP locations.

Parameters:
context - parent location
server - the server
path - path relative to context

NotesLocation

public NotesLocation(java.lang.String server,
                     java.lang.String path)
Constructor for local locations.

Parameters:
server - the server
path - the path
Method Detail

getInstance

public static NotesLocation getInstance(java.lang.String location)
Factory method for Location objects.

Parameters:
location - the location as url-like string
Returns:
the location object

getInstance

public static NotesLocation getInstance(NotesLocation context,
                                        java.lang.String server,
                                        java.lang.String path)
Factory method for local Location.

Parameters:
context - parent location
server - the server
path - the path
Returns:
the new Location

setLocation

protected void setLocation(java.lang.String locationUri)
Sets the location string.

Parameters:
locationUri - URI of location of database.

getIIOPPasswd

public java.lang.String getIIOPPasswd()
Deprecated. use getPassword() instead

Returns the IIOP Password.

Returns:
String

getPassword

public java.lang.String getPassword()
Returns the IIOP Password.

Returns:
String

getIIOPUser

public java.lang.String getIIOPUser()
Deprecated. use getUsername() instead

Returns the IIOP Username.

Returns:
String

getUsername

public java.lang.String getUsername()
Returns the IIOP Username.

Returns:
String

getPath

public java.lang.String getPath()
Returns the path of the notes location.

Returns:
the path of the notes location.

getLocalLocation

public NotesLocation getLocalLocation()
Returns the local location corresponding to this location. If the location is already local, this instance is returned. If the location is not local, a new location is returned where the host of the location is changed to the local host.

Returns:
local location

isLocal

public boolean isLocal()
Checks if a notes location is local or not.

Returns:
true if the location is local, else false

isIIOP

public boolean isIIOP()
Checks if the notes location is a IIOP location or not.

Returns:
true if it is a IIOP location, else false

isHttp

public boolean isHttp()
Checks if the notes location is using the HTTP protocol.

Returns:
true if the protocol is HTTP, else false

getHost

public java.lang.String getHost()
Returns the host of the notes location or null if it's an IIOP location.

Returns:
the host of the notes location.

getServer

public java.lang.String getServer()
Returns the server part of a location. If the location is a local location or an IIOP location, then the server the empty string, else the name of the server.

Returns:
server part of a location

getLocalServer

public java.lang.String getLocalServer()
Returns a string representing the local server. In case of DIIOP (Corba), this must be the empty string, in case of local call this must be the string "local".

Returns:
local server

getPathSep

protected java.lang.String getPathSep()
Returns the separator string between host and path in locations.

Returns:
separator string between host and path

getProtocol

public java.lang.String getProtocol()
Returns the protocol of the location.

Returns:
protocol of location

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
the location as a string


Domingo Java-API