|
|
|||||
| Package com.dassault_systemes.catweb.base.net.url |
Class PortalURL
|
| Class Hierarchy |
java.lang.Object | +-com.dassault_systemes.catweb.base.net.url.PortalURL
| Class Location |
| Class Description |
public class PortalURL
the PortalURL includes the class java.net.URL . It exports the same mecanism provided by Java and will be able to integrate dynamically new protocols without API modification. This imply the creation of specific classes to support each protocol. These classes must inherits from URLStreamHandler. See @see java.net.URL.URL() comments in the JDK API documentation for more details. PortalURL scheme : protocol://username:password@server_name:portNumber/data_origin.data_extension?arg1=value1&arg2=value2 sample : remotefile://my_server:1570/u/users/my_user/my_file.ext?my_arg=my_value
All Implemented Interfaces: Transferable
| Field Summary |
| protected static final String | ampersand
|
| public static final String | ARG_WITH_MULTI_VALUE
See IR 366397 : arg=value1&arg=value2 |
| public static final String | ARG_WITH_NULL_VALUE
|
| public static final String | COMMAND_INSTANCE_NAME
Reserved argument name for command instance name: "InstanceName" |
| public static final String | COMMAND_NAME
Reserved argument name for command class name: "Command" |
| protected static final int | dot
|
| public static final String | EPL_NO_MIME_TYPE
Reserved argument name in order to specify to not get MIMETypes from URLConnection Usefull for http script URLs like CGIs which should not be executed several times. |
| public static final String | MIME_TYPE
Reserved argument name for MIME Type name: "MIMEType" |
| public static final String | NEW_INSTANCE_NAME
Reserved InstanceName in order to specify the creation of a new instance |
| public static final String | NO_ACTIVATION
Reserved argument name in order to specify to not activate the CATlet |
| protected static final int | questionMark
|
| Constructor Summary |
| PortalURL(String portalURL)
PortalURL constructor. |
| PortalURL(String protocol, String hostname, int portNumber, String dataOrigin, String dataExtension, String username, String password, Hashtable argumentsTable)
PortalURL constructor. |
| PortalURL(PortalURL contextUrl, String subURL)
PortalURL constructor. |
| PortalURL(URL contextUrl, String subURL)
PortalURL constructor. |
| Method Summary |
| public boolean | equals(Object obj)
Compares the equality of an object with this instance |
| public String[] | getArgumentList()
Returns the list of all arguments contained in the URL |
| public String | getCommandInstanceName()
Returns the instance name of the command associated with this URL the reserved argument name is : "CommandInstanceName" |
| public String | getCommandName()
Returns the command name associated with this URL. |
| public String | getContentType()
Returns the content of the pointed file Same method as @see java.net.URLConnection#getContentType() |
| public String | getDataExtension()
Returns the data extension. |
| public String | getDataOrigin()
Returns the data origin. |
| public String | getFile()
Returns the file. |
| public String | getHost()
Returns the hostname of the server on which reside the data Mapped to @see java.net.URL#.getHost() |
| public String | getMIMEType()
Returns the application type associated with the data. |
| public String | getPassword()
Returns the password used for authentication. |
| public int | getPort()
Returns the port number used for the connection. |
| public String | getPostData()
Returns the data that is sent to the webserver through post method, is called from EBrowserCATlet only, do not call from anywhere else It is used in the "other method" of VPM context only. |
| public String | getProtocol()
Returns the protocol used to retreive the data (http, enovia, cdm, remotefile ...) Mapped to @see java.net.URL#getProtocol() |
| public String | getQuery()
Returns the arguments as a query String "arg1=val1&arg2=val2" |
| public URL | getURL()
Returns the url @link java.net.URL instance encapsulated by this PortalURL. |
| public String | getUsername()
Returns the username used for authentication. |
| public String | getValueOfArgument(String argument)
Returns the value associated with an argument. |
| public Vector | getValuesOfArgument(String argument)
Returns the values associated with an argument. |
| protected void | initPortaURLWithString(String portalURL)
|
| public URLConnection | openConnection()
Returns a URLConnection object that represents a
connection to the remote object referred to by the PortalURL. |
| public final InputStream | openStream()
Opens a connection to this URL. |
| public void | setPostData(String PostData)
Sets the data , that is sent to the webserver through post method, intended for MenuItemWizard usage only, Do not use it from anywhere else. |
| public String | toString()
Constructs a string representation of this PortalURL. |
| public String | toStringWithoutSpecifiedArguments(boolean portalArgumentsFlag, String[] arguments)
Returns the string representation of the PortalURL whithout specific Portal arguments if portalArguments = true, and without the specified list of argument |
| Field Detail |
protected static final String ampersand
public static final String ARG_WITH_MULTI_VALUE
See IR 366397 : arg=value1&arg=value2
public static final String ARG_WITH_NULL_VALUE
public static final String COMMAND_INSTANCE_NAME
Reserved argument name for command instance name: "InstanceName"
public static final String COMMAND_NAME
Reserved argument name for command class name: "Command"
protected static final int dot
public static final String EPL_NO_MIME_TYPE
Reserved argument name in order to specify to not get MIMETypes from URLConnection
Usefull for http script URLs like CGIs which should not be executed several times.
public static final String MIME_TYPE
Reserved argument name for MIME Type name: "MIMEType"
public static final String NEW_INSTANCE_NAME
Reserved InstanceName in order to specify the creation of a new instance
public static final String NO_ACTIVATION
Reserved argument name in order to specify to not activate the CATlet
protected static final int questionMark
| Constructor Detail |
PortalURL(String portalURL)
PortalURL constructor. The url is given as a String.
Throws a MalformedURLException if the given String is not a PortalURL.
portalURL
PortalURL(String protocol, String hostname, int portNumber, String dataOrigin, String dataExtension, String username, String password, Hashtable argumentsTable)
PortalURL constructor. The url is given element by element.
In some cases, some elements mais be null or -1 (for port number : default port taken)
The password, if specified, is given encrypted.
protocolhostnameportNumberdataOrigindataExtensionusernamepasswordargumentsTable
PortalURL(PortalURL contextUrl, String subURL)
PortalURL constructor.
Creates a URL by parsing the specification subURL
within a specified context. If the contextUrl argument
is not null and the subURL argument is a
partial URL specification, then any of the strings missing
components are inherited from the contextUrl argument.
contextUrlsubURL
PortalURL(URL contextUrl, String subURL)
PortalURL constructor.
Creates a URL by parsing the specification subURL
within a specified context. If the contextUrl argument
is not null and the subURL argument is a
partial URL specification, then any of the strings missing
components are inherited from the contextUrl argument.
contextUrlsubURL| Method Detail |
public boolean equals(Object obj)
Compares the equality of an object with this instance
obj
public String[] getArgumentList()
Returns the list of all arguments contained in the URL
public String getCommandInstanceName()
Returns the instance name of the command associated with this URL
the reserved argument name is : "CommandInstanceName"
public String getCommandName()
Returns the command name associated with this URL.
the reserved argument name is : "CommandName"
public String getContentType()
Returns the content of the pointed file
Same method as @see java.net.URLConnection#getContentType()
public String getDataExtension()
Returns the data extension.
public String getDataOrigin()
Returns the data origin. In some cases, the data origin may also
contains the data extension.
public String getFile()
Returns the file. (DataOrigin.DataExtension)
Same method as @see java.net.URL#getFile()
public String getHost()
Returns the hostname of the server on which reside the data
Mapped to @see java.net.URL#.getHost()
public String getMIMEType()
Returns the application type associated with the data.
If possible, it is based on the URL content type normally returned by the server.
If this content type is not available, the mime type is resolved from
the data extension.
If the MIME type is specified in the query, it is returned.
public String getPassword()
Returns the password used for authentication. The password is not encrypted
public int getPort()
Returns the port number used for the connection.
Mapped to @see java.net.URL#getPort()
public String getPostData()
Returns the data that is sent to the webserver through post method, is called from EBrowserCATlet only, do not call from anywhere else
It is used in the "other method" of VPM context only.
public String getProtocol()
Returns the protocol used to retreive the data (http, enovia, cdm,
remotefile ...)
Mapped to @see java.net.URL#getProtocol()
public String getQuery()
Returns the arguments as a query String "arg1=val1&arg2=val2"
public URL getURL()
Returns the url @link java.net.URL instance encapsulated by this PortalURL.
This url may be null especially when running inside a browser and using other protocols
than "file" or "http".
public String getUsername()
Returns the username used for authentication. May be null.
public String getValueOfArgument(String argument)
Returns the value associated with an argument.
Returns null if the argument is not present inside the URL.
argument
public Vector getValuesOfArgument(String argument)
Returns the values associated with an argument.
Returns null if the argument is not present inside the URL.
argument
protected void initPortaURLWithString(String portalURL)
public URLConnection openConnection()
Returns a URLConnection object that represents a
connection to the remote object referred to by the PortalURL.
If there is not already an open connection, the connection is
opened by calling the openConnection method of the
protocol handler for this PortalURL.
URLConnection to the PortalURL.
public final InputStream openStream()
Opens a connection to this URL.
For some protocol, always throws an IOException as there are no meaning or no way to
retreive the data on the client (enovia protocol essentially)
Mapped to @see java.net.URL#openStream()
public void setPostData(String PostData)
Sets the data , that is sent to the webserver through post method, intended for MenuItemWizard usage only, Do not use it from anywhere else.
PostData
public String toString()
Constructs a string representation of this PortalURL.
public String toStringWithoutSpecifiedArguments(boolean portalArgumentsFlag, String[] arguments)
Returns the string representation of the PortalURL whithout specific Portal arguments if
portalArguments = true, and without the specified list of argument
portalArgumentsFlagarguments