Class UnoUrl


  • public class UnoUrl
    extends java.lang.Object
    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("socket,host=localhost,port=2002;urp;StarOffice.ServiceManager");
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getConnection()
      Returns the name of the connection of this Uno Url.
      java.lang.String getConnectionAndParametersAsString()
      Returns the raw specification of the connection name and parameters.
      java.util.HashMap<java.lang.String,​java.lang.String> getConnectionParameters()
      Returns the connection parameters as a Hashmap with key/value pairs.
      java.lang.String getConnectionParametersAsString()
      Returns the raw specification of the connection parameters.
      java.lang.String getProtocol()
      Returns the name of the protocol of this Uno Url.
      java.lang.String getProtocolAndParametersAsString()
      Returns the raw specification of the protocol name and parameters.
      java.util.HashMap<java.lang.String,​java.lang.String> getProtocolParameters()
      Returns the protocol parameters as a Hashmap with key/value pairs.
      java.lang.String getProtocolParametersAsString()
      Returns the raw specification of the protocol parameters.
      java.lang.String getRootOid()
      Return the object name.
      static UnoUrl parseUnoUrl​(java.lang.String unoUrl)
      Parses the given Uno Url and returns an in memory object representation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getConnection

        public java.lang.String getConnection()
        Returns the name of the connection of this Uno Url. Encoded characters are not allowed.
        Returns:
        The connection name as string.
      • getProtocol

        public java.lang.String getProtocol()
        Returns the name of the protocol of this Uno Url. Encoded characters are not allowed.
        Returns:
        The protocol name as string.
      • getRootOid

        public java.lang.String getRootOid()
        Return the object name. Encoded character are not allowed.
        Returns:
        The object name as String.
      • getProtocolParameters

        public java.util.HashMap<java.lang.String,​java.lang.String> getProtocolParameters()
        Returns the protocol parameters as a Hashmap with key/value pairs. Encoded characters like '%41' are decoded.
        Returns:
        a HashMap with key/value pairs for protocol parameters.
      • getConnectionParameters

        public java.util.HashMap<java.lang.String,​java.lang.String> getConnectionParameters()
        Returns the connection parameters as a Hashmap with key/value pairs. Encoded characters like '%41' are decoded.
        Returns:
        a HashMap with key/value pairs for connection parameters.
      • getProtocolParametersAsString

        public java.lang.String getProtocolParametersAsString()
        Returns the raw specification of the protocol parameters. Encoded characters like '%41' are not decoded.
        Returns:
        The uninterpreted protocol parameters as string.
      • getConnectionParametersAsString

        public java.lang.String getConnectionParametersAsString()
        Returns the raw specification of the connection parameters. Encoded characters like '%41' are not decoded.
        Returns:
        The uninterpreted connection parameters as string.
      • getProtocolAndParametersAsString

        public java.lang.String getProtocolAndParametersAsString()
        Returns the raw specification of the protocol name and parameters. Encoded characters like '%41' are not decoded.
        Returns:
        The uninterpreted protocol name and parameters as string.
      • getConnectionAndParametersAsString

        public java.lang.String getConnectionAndParametersAsString()
        Returns the raw specification of the connection name and parameters. Encoded characters like '%41' are not decoded.
        Returns:
        The uninterpreted connection name and parameters as string.
      • parseUnoUrl

        public static UnoUrl parseUnoUrl​(java.lang.String unoUrl)
                                  throws com.sun.star.lang.IllegalArgumentException
        Parses the given Uno Url and returns an in memory object representation.
        Parameters:
        unoUrl - The given uno URl as string.
        Returns:
        Object representation of class UnoUrl.
        Throws:
        java.lang.IllegalArgumentException - if Url cannot be parsed.
        com.sun.star.lang.IllegalArgumentException