Top Description Inners Fields Constructors Methods
com.sun.star.lib.uno.helper

public Class UnoUrl

extends Object
Class Inheritance
Imports
java.io.UnsupportedEncodingException, java.nio.ByteBuffer, java.util.HashMap

Object representation and parsing of Uno Urls, which allow to locate a named Uno object in a different process. A Uno Url consists of the specification of a connection, protocol and rootOid delimited with a ';'. The syntax of a 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("uno:socket,host=localhost,port=2002;urp;StarOffice.ServiceManager");

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final UnoUrl.UnoUrlPart
private static final String
private static final String
private final UnoUrl.UnoUrlPart
private final String
private static final String

Constructor Summary

AccessConstructor and Description
private
UnoUrl(UnoUrl.UnoUrlPart connectionPart, UnoUrl.UnoUrlPart protocolPart, String rootOid)

Method Summary

Modifier and TypeMethod and Description
private static HashMap<String, String>
private static String
public String

Returns:

The connection name as string.
getConnection
()

Returns the name of the connection of this Uno Url.

public String

Returns:

The uninterpreted connection name and parameters as string.
getConnectionAndParametersAsString
()

Returns the raw specification of the connection name and parameters.

public HashMap<String, String>

Returns:

a HashMap with key/value pairs for connection parameters.
getConnectionParameters
()

Returns the connection parameters as a Hashmap with key/value pairs.

public String

Returns:

The uninterpreted connection parameters as string.
getConnectionParametersAsString
()

Returns the raw specification of the connection parameters.

public String

Returns:

The protocol name as string.
getProtocol
()

Returns the name of the protocol of this Uno Url.

public String

Returns:

The uninterpreted protocol name and parameters as string.
getProtocolAndParametersAsString
()

Returns the raw specification of the protocol name and parameters.

public HashMap<String, String>

Returns:

a HashMap with key/value pairs for protocol parameters.
getProtocolParameters
()

Returns the protocol parameters as a Hashmap with key/value pairs.

public String

Returns:

The uninterpreted protocol parameters as string.
getProtocolParametersAsString
()

Returns the raw specification of the protocol parameters.

public String

Returns:

The object name as String.
getRootOid
()

Return the object name.

private static boolean
private static boolean
isValidString(String identifier, String validCharSet)

public static UnoUrl

Returns:

Object representation of class UnoUrl.
parseUnoUrl
(String
The given uno URl as string.
unoUrl
)

Parses the given Uno Url and returns an in memory object representation.

private static UnoUrl.UnoUrlPart
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

connectionback to summary
private final UnoUrl.UnoUrlPart connection
FORMAT_ERRORback to summary
private static final String FORMAT_ERROR
OID_CHAR_SETback to summary
private static final String OID_CHAR_SET
protocolback to summary
private final UnoUrl.UnoUrlPart protocol
rootOidback to summary
private final String rootOid
VALUE_CHAR_SETback to summary
private static final String VALUE_CHAR_SET

Constructor Detail

UnoUrlback to summary
private UnoUrl(UnoUrl.UnoUrlPart connectionPart, UnoUrl.UnoUrlPart protocolPart, String rootOid)

Method Detail

buildParamHashMapback to summary
private static HashMap<String, String> buildParamHashMap(String paramString) throws com.sun.star.lang.IllegalArgumentException
decodeUTF8back to summary
private static String decodeUTF8(String s) throws com.sun.star.lang.IllegalArgumentException
getConnectionback to summary
public String getConnection()

Returns the name of the connection of this Uno Url. Encoded characters are not allowed.

Returns:String

The connection name as string.

getConnectionAndParametersAsStringback to summary
public String getConnectionAndParametersAsString()

Returns the raw specification of the connection name and parameters. Encoded characters like '%41' are not decoded.

Returns:String

The uninterpreted connection name and parameters as string.

getConnectionParametersback to summary
public HashMap<String, String> getConnectionParameters()

Returns the connection parameters as a Hashmap with key/value pairs. Encoded characters like '%41' are decoded.

Returns:HashMap<String, String>

a HashMap with key/value pairs for connection parameters.

getConnectionParametersAsStringback to summary
public String getConnectionParametersAsString()

Returns the raw specification of the connection parameters. Encoded characters like '%41' are not decoded.

Returns:String

The uninterpreted connection parameters as string.

getProtocolback to summary
public String getProtocol()

Returns the name of the protocol of this Uno Url. Encoded characters are not allowed.

Returns:String

The protocol name as string.

getProtocolAndParametersAsStringback to summary
public String getProtocolAndParametersAsString()

Returns the raw specification of the protocol name and parameters. Encoded characters like '%41' are not decoded.

Returns:String

The uninterpreted protocol name and parameters as string.

getProtocolParametersback to summary
public HashMap<String, String> getProtocolParameters()

Returns the protocol parameters as a Hashmap with key/value pairs. Encoded characters like '%41' are decoded.

Returns:HashMap<String, String>

a HashMap with key/value pairs for protocol parameters.

getProtocolParametersAsStringback to summary
public String getProtocolParametersAsString()

Returns the raw specification of the protocol parameters. Encoded characters like '%41' are not decoded.

Returns:String

The uninterpreted protocol parameters as string.

getRootOidback to summary
public String getRootOid()

Return the object name. Encoded character are not allowed.

Returns:String

The object name as String.

isAlphaNumericback to summary
private static boolean isAlphaNumeric(String s)
isValidStringback to summary
private static boolean isValidString(String identifier, String validCharSet)
parseUnoUrlback to summary
public static UnoUrl parseUnoUrl(String unoUrl) throws com.sun.star.lang.IllegalArgumentException

Parses the given Uno Url and returns an in memory object representation.

Parameters
unoUrl:String

The given uno URl as string.

Returns:UnoUrl

Object representation of class UnoUrl.

Exceptions
IllegalArgumentException:
if Url cannot be parsed.
parseUnoUrlPartback to summary
private static UnoUrl.UnoUrlPart parseUnoUrlPart(String thePart) throws com.sun.star.lang.IllegalArgumentException
com.sun.star.lib.uno.helper back to summary

private Class UnoUrl.UnoUrlPart

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final HashMap<String, String>
private final String
private final String

Constructor Summary

AccessConstructor and Description
public
UnoUrlPart(String uninterpretedParameterString, String partTypeName, HashMap<String, String> partParameters)

Method Summary

Modifier and TypeMethod and Description
public HashMap<String, String>
public String
public String
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

partParametersback to summary
private final HashMap<String, String> partParameters
partTypeNameback to summary
private final String partTypeName
uninterpretedParameterStringback to summary
private final String uninterpretedParameterString

Constructor Detail

UnoUrlPartback to summary
public UnoUrlPart(String uninterpretedParameterString, String partTypeName, HashMap<String, String> partParameters)

Method Detail

getPartParametersback to summary
public HashMap<String, String> getPartParameters()
getPartTypeNameback to summary
public String getPartTypeName()
getUninterpretedParameterStringback to summary
public String getUninterpretedParameterString()
getUninterpretedStringback to summary
public String getUninterpretedString()