com.sun.star.lib.uno.helper
Class UnoUrl
Object representation and parsing of Uno Urls,
which allow to locate a named Uno object in a
different process. An Uno Url consists of the
specification of a connection, protocol and
rootOid delimited with a ';'.
The syntax of an Uno Url is
[uno:]connection-type,parameters;protocol-name,parameters;objectname";
An example Uno Url will look like this:
socket,host=localhost,port=2002;urp;StarOffice.ServiceManager
For more information about Uno Url please consult
http://udk.openoffice.org/common/man/spec/uno-url.html
Usage:
UnoUrl url = UnoUrl.parseUnoUrl("socket,host=localhost,port=2002;urp;StarOffice.ServiceManager");
getConnection
public String getConnection()
Returns the name of the connection of this
Uno Url. Encoded characters are not allowed.
- The connection name as string.
getConnectionAndParametersAsString
public String getConnectionAndParametersAsString()
Returns the raw specification of the connection
name and parameters. Encoded characters like '%41' are
not decoded.
- The uninterpreted connection name and parameters as string.
getConnectionParameters
public HashMap getConnectionParameters()
Returns the connection parameters as
a Hashmap with key/value pairs. Encoded
characters like '%41' are decoded.
- a HashMap with key/value pairs for connection parameters.
getConnectionParametersAsString
public String getConnectionParametersAsString()
Returns the raw specification of the connection
parameters. Encoded characters like '%41' are
not decoded.
- The uninterpreted connection parameters as string.
getProtocol
public String getProtocol()
Returns the name of the protocol of this
Uno Url. Encoded characters are not allowed.
- The protocol name as string.
getProtocolAndParametersAsString
public String getProtocolAndParametersAsString()
Returns the raw specification of the protocol
name and parameters. Encoded characters like '%41' are
not decoded.
- The uninterpreted protocol name and parameters as string.
getProtocolParameters
public HashMap getProtocolParameters()
Returns the protocol parameters as
a Hashmap with key/value pairs. Encoded
characters like '%41' are decoded.
- a HashMap with key/value pairs for protocol parameters.
getProtocolParametersAsString
public String getProtocolParametersAsString()
Returns the raw specification of the protocol
parameters. Encoded characters like '%41' are
not decoded.
- The uninterpreted protocol parameters as string.
getRootOid
public String getRootOid()
Return the object name. Encoded character are
not allowed.
- The object name as String.
parseUnoUrl
public static UnoUrl parseUnoUrl(String unoUrl)
throws IllegalArgumentException
Parses the given Uno Url and returns
an in memory object representation.
unoUrl
- The given uno URl as string.
- Object representation of class UnoUrl.