Web Dynpro API Documentation

com.sap.tc.webdynpro.services.sal.url.api
Class WDURLGenerator

java.lang.Object
  |
  +--com.sap.tc.webdynpro.services.sal.url.api.WDURLGenerator

public abstract class WDURLGenerator
extends java.lang.Object

WDURLGenerator provides static methods which generated URLs for any IWDWebResource objects that are referenced by Web Dynpro applications.
The interface provides methods which are responsible for the following:

See Also:
IWDURLGenerator

Constructor Summary
WDURLGenerator()
           
 
Method Summary
static java.lang.String getAbsoluteWebResourceURL(java.lang.String objectName)
          Returns an absolute URL that points to the root of the public resources of the specified deployable object.
static java.lang.String getAbsoluteWebResourceURL(java.lang.String objectName, java.lang.String resourceName)
          Returns an absolute URL for a specified web resource located in a specified deployable object.
static java.lang.String getAbsoluteWebResourceURL(WDDeployableObjectPart deployableObjectPart)
          Returns an absolute URL pointing to the root of the specified deployable object part.
static java.lang.String getAbsoluteWebResourceURL(WDDeployableObjectPart deployableObjectPart, java.lang.String resourceName)
          Returns an absolute URL for a specified web resource of a specified deployable object part.
static java.lang.String getApplicationURL(java.lang.String deployableObjectName, java.lang.String applicationPartName)
          Return is the application URL to the deployable object part supplied as input parameter.
static java.lang.String getApplicationURL(java.lang.String objectName, java.lang.String partName, java.util.Map urlParameters)
          Return is the application URL for the specified deployable object part with appended URL parameters given by urlParameters.
static java.lang.String getApplicationURL(WDDeployableObjectPart deployableObjectPart)
          Return is the application URL to the deployable object part supplied as input parameter.
static java.lang.String getApplicationURL(WDDeployableObjectPart deployableObjectPart, java.util.Map urlParameters)
          Return is the application URL for the specified deployableObjectPart with appended URL parameters given by urlParameters.
static java.lang.String getDynamicApplicationURL(java.lang.String deployableObjectName, java.lang.String applicationPartName)
          Return is the dynamic part of the application URL for the application specified by applicationPartName and the deployable object deployableObjectName.
static java.lang.String getDynamicApplicationURL(WDDeployableObjectPart deployableObjectPart)
          Return is the dynamic part of the application URL for the application part specified by deployableObjectPart.
static java.lang.String getPortalIconsResourcePath()
          Return is the resource path to the Portal icons.
static java.lang.String getPortalIconsWebResourcePath()
          Return is the Web resource path to the Portal icons.
static java.lang.String getPublicResourcePath(java.lang.String resourceName)
          Returns the file system path to the resource specified by resourceName that is expected to be in the "public" directory of the deployable object (=development component) of the currently running Web Dynpro application.
static java.lang.String getPublicResourcePath(WDDeployableObjectPart part, java.lang.String resourceName)
          Returns the file system path to the resource specified by resourceName that is expected to be in the "public" directory of the deployable object part specified b< part.
static java.lang.String getResourcePath()
          Deprecated. Method will throw a java.lang.UnsupportedOperationException in the next release after NetWeaver 04. Use getResourcePath(String) instead.
static java.lang.String getResourcePath(java.lang.String objectName)
          Returns the real public resource path of a specified deployable object.
static java.lang.String getResourcePath(java.lang.String objectName, java.lang.String resourceName)
          Returns the real public resource path of a specified deployable object.
static java.lang.String getResourcePath(WDDeployableObjectPart deployableObjectPart)
          Returns the real public resource path of a specified deployable object part.
static java.lang.String getResourcePath(WDDeployableObjectPart deployableObjectPart, java.lang.String resourceName)
          Returns the real public resource path of a specified deployable object part.
static java.lang.String getSAPIconsResourcePath()
          Return is the resource path to the SAP icons.
static java.lang.String getSAPIconsWebResourcePath()
          Return is the Web resource path to the SAP icons.
static java.lang.String getStaticApplicationURL()
          Return is the static part of a Web Dynpro application URL.
static java.lang.String getWebResourcePath()
          Returns the web resource path, which is independent from any deployable object or application.
static java.lang.String getWebResourcePath(java.lang.String objectName)
          Returns the used web resource path of a specified deployable object.
static java.lang.String getWebResourcePath(WDDeployableObjectPart deployableObjectPart)
          Returns the used web resource path of a specified deployable object part.
static java.lang.String getWebResourceURL(java.lang.String objectName)
          Returns an URL that points to the root of the public resources of the specified deployable object.
static java.lang.String getWebResourceURL(java.lang.String objectName, java.lang.String resourceName)
          Returns an URL for a specified web resource located in a specified deployable object.
static java.lang.String getWebResourceURL(WDDeployableObjectPart deployableObjectPart)
          Returns an URL pointing to the root of the specified deployable object part.
static java.lang.String getWebResourceURL(WDDeployableObjectPart deployableObjectPart, java.lang.String resourceName)
          Returns an URL for a specified web resource of a specified deployable object part.
static java.lang.String getWorkloadBalancedApplicationURL(java.lang.String deployableObjectName, java.lang.String applicationPartName)
          Return is the application URL of the application deployable object part supplied as input parameter.
static java.lang.String getWorkloadBalancedApplicationURL(java.lang.String objectName, java.lang.String partName, java.util.Map urlParameters)
          Return is the workload balanced application URL for the specified deployable object part with appended URL parameters given by urlParameters.
static java.lang.String getWorkloadBalancedApplicationURL(WDDeployableObjectPart deployableObjectPart)
          Return is the application URL of the application deployable object part supplied as input parameter.
static java.lang.String getWorkloadBalancedApplicationURL(WDDeployableObjectPart deployableObjectPart, java.util.Map urlParameters)
          Return is the workload balanced application URL for the specified deployableObjectPart with appended URL parameters given by urlParameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WDURLGenerator

public WDURLGenerator()
Method Detail

getPublicResourcePath

public static java.lang.String getPublicResourcePath(java.lang.String resourceName)
Returns the file system path to the resource specified by resourceName that is expected to be in the "public" directory of the deployable object (=development component) of the currently running Web Dynpro application. The "public" directory contains resources which are not accessible by others via URL.

Using this method, it is possible to access resources which are imported in the SAP NetWeaver Developer Studio under the "/src/configuration" folder of a Web Dynpro project and then deployed together with this project.

On SAP J2EE Engine 6.40, this is ".\temp\webdynpro\public\\resourceName". Note that the path is relative to the engine's startup directory.

Returns:
the file system path to the specified resource under the root directory of the current deployable object

getPublicResourcePath

public static java.lang.String getPublicResourcePath(WDDeployableObjectPart part,
                                                     java.lang.String resourceName)
Returns the file system path to the resource specified by resourceName that is expected to be in the "public" directory of the deployable object part specified b< part. The "public" directory contains resources which are not accessible by others via URL. The specified part must belong to a referenced deployable object (=development component) of the currently executed Web Dynpro application, otherwise an IllegalArgumentException will be thrown.

Using this method, it is possible to access resources which are imported in the SAP NetWeaver Developer Studio under the "/src/configuration//" folder of a Web Dynpro project and then deployed together with this project.

On SAP J2EE Engine 6.40, this is ".\temp\webdynpro\public\\\\resourceName". Note that the path is relative to the engine's startup directory.

Returns:
the file system path to the specified resource under the root directory of the current deployable object
Throws:
java.lang.IllegalArgumentException - if the specified part does not belong to a referenced deployable object of the currently running application

getResourcePath

public static java.lang.String getResourcePath()
Deprecated. Method will throw a java.lang.UnsupportedOperationException in the next release after NetWeaver 04. Use getResourcePath(String) instead.

Returns the real public resource path, which is independent from any deployable object or deployable object part.
On SAP J2EE Engine 6.40, this is ".\temp\webdynpro\web" (the path is relative to the engine's startup directory)
Returns:
the application independent real resource path

getResourcePath

public static java.lang.String getResourcePath(java.lang.String objectName)
Returns the real public resource path of a specified deployable object.
On SAP J2EE Engine 6.40, this is ".\temp\webdynpro\web\" (the path is relative to the engine's startup directory)
Parameters:
objectName - the name of an deployable object
Returns:
the deployable object dependent real resource path

getResourcePath

public static java.lang.String getResourcePath(java.lang.String objectName,
                                               java.lang.String resourceName)
Returns the real public resource path of a specified deployable object.
On SAP J2EE Engine 6.40, this is ".\temp\webdynpro\web\\" (the path is relative to the engine's startup directory)
Parameters:
objectName - the name of an deployable object
resourceName - the name of the resource for which the path should be created. This parameter must not be null or unspecified. It is interpreted as a relative path (relativ to the specified deployable object)
Returns:
the deployable object dependent real resource path

getResourcePath

public static java.lang.String getResourcePath(WDDeployableObjectPart deployableObjectPart)
Returns the real public resource path of a specified deployable object part.
On SAP J2EE Engine 6.40, this is ".\temp\webdynpro\web\\\" (the path is relative to the engine's startup directory), where the objectName is the name of the deployable object of the deployableObjectPart, and partType is the type of the deployable object part.
Parameters:
deployableObjectPart - a deployable object part
Returns:
the deployable object part dependent real resource path

getResourcePath

public static java.lang.String getResourcePath(WDDeployableObjectPart deployableObjectPart,
                                               java.lang.String resourceName)
                                        throws WDAliasResolvingException
Returns the real public resource path of a specified deployable object part.
On SAP J2EE Engine 6.40, this is ".\temp\webdynpro\web\\\\" (the path is relative to the engine's startup directory), where the objectName is the name of the deployable object of the deployableObjectPart, and partType is the type of the deployable object part.
Parameters:
deployableObjectPart - a deployable object part
resourceName - the name of the resource for which the path should be created. This parameter must not be null or unspecified. It is interpreted as a relative path (relativ to the specified deployable object).
Returns:
the deployable object part dependent real resource path
Throws:
WDAliasResolvingException - if the specified resourceName contains an alias that couldn't be resolved

getWebResourcePath

public static java.lang.String getWebResourcePath()
Returns the web resource path, which is independent from any deployable object or application.
On SAP J2EE Engine 6.40, this is "/webdynpro/resources" (the relative URL to the Web resources root).
Returns:
the application independent web resource path

getWebResourcePath

public static java.lang.String getWebResourcePath(java.lang.String objectName)
Returns the used web resource path of a specified deployable object.
On SAP J2EE Engine 6.40, this is "/webdynpro/resources/" (the relative URL to the resource of the deployable object).
Parameters:
objectName - the name of an deployable object.
Returns:
the web resource path of a specified deployable object

getWebResourcePath

public static java.lang.String getWebResourcePath(WDDeployableObjectPart deployableObjectPart)
Returns the used web resource path of a specified deployable object part.
On SAP J2EE Engine 6.40, this is "/webdynpro/resources///" (the relative URL to the resource of the deployable object part), whereat the objectName is the name of the deployable object of the deployableObjectPart, and partType is the type of the deployable object part.
Parameters:
deployableObjectPart - a deployable object part
Returns:
the web resource path of a specified deployable object part

getWebResourceURL

public static java.lang.String getWebResourceURL(java.lang.String objectName,
                                                 java.lang.String resourceName)
                                          throws WDURLException
Returns an URL for a specified web resource located in a specified deployable object.
On SAP J2EE Engine 6.40, this is "/webdynpro/resources//" (the relative URL to the specified resource of the given deployable object).
Parameters:
objectName - the name of an deployable object. This parameter must not be null or unspecified.
resourceName - the name of the resource (inclusive any relative path information like "pictures/myImage.gif"); This parameter must not be null or unspecified.
Returns:
the URL for a web resource located in a specified deployable object
Throws:
WDURLException - if the URL to the web resource couldn't be generated

getWebResourceURL

public static java.lang.String getWebResourceURL(java.lang.String objectName)
                                          throws WDURLException
Returns an URL that points to the root of the public resources of the specified deployable object. Returns the same like the method getWebResourcePath(String).
Parameters:
objectName - the name of an deployable object. This parameter must not be null or unspecified.
Returns:
the URL for a web resource located in a specified deployable object
Throws:
WDURLException - if the URL to the web resource couldn't be generated
See Also:
getWebResourcePath(String)

getWebResourceURL

public static java.lang.String getWebResourceURL(WDDeployableObjectPart deployableObjectPart,
                                                 java.lang.String resourceName)
                                          throws WDURLException
Returns an URL for a specified web resource of a specified deployable object part.
On SAP J2EE Engine 6.40, this is "/webdynpro/resources////" (the relative URL to the specified resource of the given deployable object part), whereat the objectName is the name of the deployable object of the deployableObjectPart.
Parameters:
deployableObjectPart - a deployable object part
resourceName - the name of the resource (inclusive any relative path information like "pictures/myImage.gif"). This parameter must not be null or unspecified.
Returns:
the URL for a web resource located in a specified deployable object part
Throws:
WDURLException - if the URL to the web resource couldn't be generated

getWebResourceURL

public static java.lang.String getWebResourceURL(WDDeployableObjectPart deployableObjectPart)
                                          throws WDURLException
Returns an URL pointing to the root of the specified deployable object part. Returns the same like the method getWebResourcePath(WDDeployableObjectPart).
Parameters:
deployableObjectPart - a deployable object part
Returns:
the URL for a web resource located in a specified deployable object part
Throws:
WDURLException - if the URL to the web resource couldn't be generated
See Also:
getWebResourcePath(WDDeployableObjectPart)

getAbsoluteWebResourceURL

public static java.lang.String getAbsoluteWebResourceURL(java.lang.String objectName,
                                                         java.lang.String resourceName)
                                                  throws WDURLException
Returns an absolute URL for a specified web resource located in a specified deployable object. See also getWebResourceURL(String, String).
Parameters:
objectName - the name of an deployable object. This parameter must not be null or unspecified.
resourceName - the name of the resource (inclusive any relative path information like "pictures/myImage.gif"). This parameter must not be null or unspecified.
Returns:
the URL for a web resource located in a specified deployable object
Throws:
WDURLException - if the URL to the web resource couldn't be generated
See Also:
getWebResourceURL(String, String)

getAbsoluteWebResourceURL

public static java.lang.String getAbsoluteWebResourceURL(java.lang.String objectName)
                                                  throws WDURLException
Returns an absolute URL that points to the root of the public resources of the specified deployable object. See also getWebResourceURL(String).
Parameters:
objectName - the name of an deployable object. This parameter must not be null or unspecified.
Returns:
the URL for a web resource located in a specified deployable object
Throws:
WDURLException - if the URL to the web resource couldn't be generated
See Also:
getWebResourceURL(String)

getAbsoluteWebResourceURL

public static java.lang.String getAbsoluteWebResourceURL(WDDeployableObjectPart deployableObjectPart)
                                                  throws WDURLException
Returns an absolute URL pointing to the root of the specified deployable object part. See also getWebResourceURL(WDDeployableObjectPart).
Parameters:
deployableObjectPart - a deployable object part
Returns:
the URL for a web resource located in a specified deployable object part
Throws:
WDURLException - if the URL to the web resource couldn't be generated
See Also:
getWebResourceURL(WDDeployableObjectPart)

getAbsoluteWebResourceURL

public static java.lang.String getAbsoluteWebResourceURL(WDDeployableObjectPart deployableObjectPart,
                                                         java.lang.String resourceName)
                                                  throws WDURLException
Returns an absolute URL for a specified web resource of a specified deployable object part. See also getWebResourceURL(WDDeployableObjectPart, String).
Parameters:
deployableObjectPart - a deployable object part
resourceName - the name of the resource (inclusive any relative path information like "pictures/myImage.gif"). This parameter must not be null or unspecified.
Returns:
the URL for a web resource located in a specified deployable object part
Throws:
WDURLException - if the URL to the web resource couldn't be generated
See Also:
getWebResourceURL(WDDeployableObjectPart, String)

getApplicationURL

public static java.lang.String getApplicationURL(WDDeployableObjectPart deployableObjectPart)
                                          throws WDURLException
Return is the application URL to the deployable object part supplied as input parameter. Precondition: deployableObjectPart.getType() == WDDeployableObjectPartType.APPLICATION
Parameters:
deployableObjectPart - a deployable object part representing a Web Dynpro application
Returns:
the URL to the application
Throws:
WDURLException - if the URL couldn't be generated

getApplicationURL

public static java.lang.String getApplicationURL(java.lang.String deployableObjectName,
                                                 java.lang.String applicationPartName)
                                          throws WDURLException
Return is the application URL to the deployable object part supplied as input parameter. Precondition: There must be a deployable object part of type WDDeployableObjectPartType.APPLICATION with the given applicationPartName within the deployable object with name deployableObjectName.
Parameters:
deployableObjectName - the name of a deployable object
applicationPartName - the name of a application deployable object part
Returns:
the URL to the application
Throws:
WDURLException - if the URL couldn't be generated

getDynamicApplicationURL

public static java.lang.String getDynamicApplicationURL(java.lang.String deployableObjectName,
                                                        java.lang.String applicationPartName)
                                                 throws WDURLException
Return is the dynamic part of the application URL for the application specified by applicationPartName and the deployable object deployableObjectName.
Parameters:
deployableObjectName - the name of the deployable object to which the application belongs
applicationPartName - the (fully-qualified) name of the application part
Returns:
the dynamic part of the application URL (e.g. "local/Test/TestApp" for an application with application part name "com.sap.test.TestApp" that is in the deployable object "local/Test")
Throws:
WDURLException - if the URL couldn't be generated

getDynamicApplicationURL

public static java.lang.String getDynamicApplicationURL(WDDeployableObjectPart deployableObjectPart)
                                                 throws WDURLException
Return is the dynamic part of the application URL for the application part specified by deployableObjectPart.
Precondition: deployableObjectPart.getType() == WDDeployableObjectPartType.APPLICATION
Parameters:
deployableObjectPart - the deployable object part of the application
Returns:
the dynamic part of the application URL (e.g. "local/Test/TestApp" for an application with application part name "com.sap.test.TestApp" that is in the deployable object "local/Test")
Throws:
WDURLException - if the URL couldn't be generated

getStaticApplicationURL

public static java.lang.String getStaticApplicationURL()
Return is the static part of a Web Dynpro application URL.
On SAP J2EE Engine 6.40, this is "/webdynpro/dispatcher".
Returns:
the static part of a Web Dynpro application URL

getWorkloadBalancedApplicationURL

public static java.lang.String getWorkloadBalancedApplicationURL(WDDeployableObjectPart deployableObjectPart)
                                                          throws WDURLException
Return is the application URL of the application deployable object part supplied as input parameter. The application URL refers to the host, port and protocol of the Web dispatcher that is specified in the "default" configuration property set. The Web dispatcher is responsible for dispatching incoming requests to the server nodes of the cluster in a workload balanced way.
If no Web dispatcher is defined in the "default" properties, the method returns the same URL as when calling the method getApplicationURL(...).
Precondition: deployableObjectPart.getType() == WDDeployableObjectPartType.APPLICATION
Parameters:
deployableObjectPart - a deployable object part representing a Web Dynpro application
Returns:
the workload balanced URL of the application
Throws:
WDURLException - if the URL couldn't be generated

getWorkloadBalancedApplicationURL

public static java.lang.String getWorkloadBalancedApplicationURL(java.lang.String deployableObjectName,
                                                                 java.lang.String applicationPartName)
                                                          throws WDURLException
Return is the application URL of the application deployable object part supplied as input parameter. The application URL refers to the host, port and protocol of the Web dispatcher that is specified in the "default" configuration property set. The Web dispatcher is responsible for dispatching incoming requests to the server nodes of the cluster in a workload balanced way.
If no Web dispatcher is defined in the "default" properties, the method returns the same URL as when calling the method getApplicationURL(...).
Precondition: There must be a deployable object part of type WDDeployableObjectPartType.APPLICATION with the given applicationPartName within the deployable object with name deployableObjectName.
Parameters:
deployableObjectName - the name of a deployable object
applicationPartName - the name of a application deployable object part
Returns:
the URL to the application
Throws:
WDURLException - if the URL couldn't be generated

getApplicationURL

public static java.lang.String getApplicationURL(WDDeployableObjectPart deployableObjectPart,
                                                 java.util.Map urlParameters)
                                          throws WDURLException
Return is the application URL for the specified deployableObjectPart with appended URL parameters given by urlParameters. All key/value pairs in the map must be of type java.lang.String.
Parameters:
deployableObjectPart - a deployable object part representing a Web Dynpro application
urlParameters - key/value pairs added as URL parameters; they must be of type String
Returns:
the application URL for the specified deployableObjectPart with appended URL parameters given by urlParameters
Throws:
WDURLException - if the URL couldn't be generated
See Also:
getApplicationURL(WDDeployableObjectPart)

getApplicationURL

public static java.lang.String getApplicationURL(java.lang.String objectName,
                                                 java.lang.String partName,
                                                 java.util.Map urlParameters)
                                          throws WDURLException
Return is the application URL for the specified deployable object part with appended URL parameters given by urlParameters. All key/value pairs in the map must be of type java.lang.String.
Parameters:
objectName - name of a deployable object that contains the application
partName - the name of a application deployable object part
urlParameters - key/value pairs added as URL parameters; they must be of type String
Returns:
the application URL for the specified deployable object part with appended URL parameters given by urlParameters
Throws:
WDURLException - if the URL couldn't be generated
See Also:
getApplicationURL(String, String)

getWorkloadBalancedApplicationURL

public static java.lang.String getWorkloadBalancedApplicationURL(WDDeployableObjectPart deployableObjectPart,
                                                                 java.util.Map urlParameters)
                                                          throws WDURLException
Return is the workload balanced application URL for the specified deployableObjectPart with appended URL parameters given by urlParameters. All key/value pairs in the map must be of type java.lang.String.
Parameters:
deployableObjectPart - a deployable object part representing a Web Dynpro application
urlParameters - key/value pairs added as URL parameters; they must be of type String
Returns:
the workload balanced application URL for the specified deployableObjectPart with appended URL parameters given by urlParameters
Throws:
WDURLException - if the URL couldn't be generated
See Also:
getWorkloadBalancedApplicationURL(WDDeployableObjectPart)

getWorkloadBalancedApplicationURL

public static java.lang.String getWorkloadBalancedApplicationURL(java.lang.String objectName,
                                                                 java.lang.String partName,
                                                                 java.util.Map urlParameters)
                                                          throws WDURLException
Return is the workload balanced application URL for the specified deployable object part with appended URL parameters given by urlParameters. All key/value pairs in the map must be of type java.lang.String.
Parameters:
objectName - name of a deployable object that contains the application
partName - the name of a application deployable object part
urlParameters - key/value pairs added as URL parameters; they must be of type String
Returns:
the workload balanced application URL for the specified deployable object part with appended URL parameters given by urlParameters
Throws:
WDURLException - if the URL couldn't be generated
See Also:
getWorkloadBalancedApplicationURL(String, String)

getSAPIconsResourcePath

public static java.lang.String getSAPIconsResourcePath()
Return is the resource path to the SAP icons.
On SAP J2EE Engine 6.40, this is ".\temp\webdynpro\web\sap.com\tc~wd~dispwda\global\sapIcons" (the path is relative to the engine's startup directory)
Returns:
the resource path to the SAP icons
See Also:
getResourcePath()

getSAPIconsWebResourcePath

public static java.lang.String getSAPIconsWebResourcePath()
Return is the Web resource path to the SAP icons.
On SAP J2EE Engine 6.40, this is "/webdynpro/resources/sap.com/tc~wd~dispwda/global/sapIcons" (the relative URL to the root of the SAP icons).
Returns:
the Web resource path to the SAP icons
See Also:
getWebResourcePath()

getPortalIconsResourcePath

public static java.lang.String getPortalIconsResourcePath()
Return is the resource path to the Portal icons.
On SAP J2EE Engine 6.40, this is ".\temp\webdynpro\web\sap.com\tc~wd~dispwda\global\portalIcons" (the path is relative to the engine's startup directory)
Returns:
the resource path to the Portal icons
See Also:
getResourcePath()

getPortalIconsWebResourcePath

public static java.lang.String getPortalIconsWebResourcePath()
Return is the Web resource path to the Portal icons.
On SAP J2EE Engine 6.40, this is "/webdynpro/resources/sap.com/tc~wd~dispwda/global/portalIcons" (the relative URL to the root of the SAP icons).
Returns:
the Web resource path to the portal icons
See Also:
getWebResourcePath()

Web Dynpro API Documentation

Copyright © 2004 SAP AG. Automatically generated Thu Mar 3 2005, 22:15