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

Class WDURLGenerator

java.lang.Object
  extended by com.sap.tc.webdynpro.services.sal.url.api.WDURLGenerator

public abstract class WDURLGenerator
extends 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

Type Classification Type Classification:

This class is part of the Web Dynpro API, so applications may reference it or call any method of this type, but they must not subclass it.


Nested Class Summary
static interface WDURLGenerator.IFactory
          Interface to Web Dynpro internal implementation.
 
Constructor Summary
WDURLGenerator()
           
 
Method Summary
static String getAbsoluteWebResourceURL(IWDWebModule webModule, String resourceName)
          Returns an absolute URL for the specified web resource located in a specified web module.
static String getAbsoluteWebResourceURL(String objectName)
          Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Replacement: Instead of this method which generates a URL path prefix to a Web resource, the overloaded getAbsoluteWebResourceURL methods which generate a URL to an explicitly specified resource should be used. The method may be withdrawn with the first new NetWeaver release in 2006.
static String getAbsoluteWebResourceURL(String objectName, String resourceName)
          Deprecated. Starting with NetWeaver 7.1, this method is deprecated. Reason: A deployable object (=EAR file) can contain more than one Web Dynpro web module (=WAR file) and a resource always belongs to a Web Dynpro web module. Therefore it is not enough to specify a deployable object. Instead the concrete Web Dynpro web module should be specified, i.e. the method getAbsoluteWebResourceURL(IWDWebModule webModule, String resourceName) should be used instead. In case the deprecated method is used it is tried to derive the Web Dynpro web module name from the name of the deployable object. This works only if there is exactly one Web Dynpro web module contained in the deployable object.
static String getAbsoluteWebResourceURL(WDDeployableObjectPart deployableObjectPart)
          Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Replacement: Instead of this method which generates a URL path prefix to a Web resource, the overloaded getAbsoluteWebResourceURL methods which generate a URL to an explicitly specified resource should be used. The method may be withdrawn with the first new NetWeaver release in 2006.
static String getAbsoluteWebResourceURL(WDDeployableObjectPart deployableObjectPart, String resourceName)
          Returns an absolute URL for a specified web resource of a specified deployable object part.
static String getApplicationURL(String deployableObjectName, String applicationPartName)
          Return is the application URL to the deployable object part supplied as input parameter.
static String getApplicationURL(String objectName, String partName, Map urlParameters)
          Return is the application URL for the specified deployable object part with appended URL parameters given by urlParameters.
static String getApplicationURL(WDDeployableObjectPart deployableObjectPart)
          Return is the application URL to the deployable object part supplied as input parameter.
static String getApplicationURL(WDDeployableObjectPart deployableObjectPart, Map urlParameters)
          Return is the application URL for the specified deployableObjectPart with appended URL parameters given by urlParameters.
static String getDynamicApplicationURL(String deployableObjectName, String applicationPartName)
          Return is the dynamic part of the application URL for the application specified by applicationPartName and the deployable object deployableObjectName.
static String getDynamicApplicationURL(WDDeployableObjectPart deployableObjectPart)
          Return is the dynamic part of the application URL for the application part specified by deployableObjectPart.
static String getPortalIconsResourcePath()
          Return is the resource path to the Portal icons.
static String getPortalIconsWebResourcePath()
          Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Instead of this method which generates a URL prefix to a SAP portal icon Web resource, the overloaded getPortalIconWebResourcePath(String) method that generates a URL to an explicitly specified SAP portal icon should be used. The method is may be withdrawn with the first new NetWeaver release in 2006.
static String getPortalIconWebResourcePath(String iconName)
          Return is the Web resource path to the specified Portal icon.
static String getPublicResourcePath(String resourceName)
          Returns the file system path to the resource specified by resourceName that is expected to be in the public directory of the web module (=WAR file) of the currently running Web Dynpro application.
static String getPublicResourcePath(WDDeployableObjectPart part, 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 by part.
static String getQueryString(Map<String,Object> urlParameters, String encoding)
          Converts a Map of parameters into the corresponding query string.
static String getResourcePath(IWDWebModule webModule)
          Returns the real public resource path of a specified Web Dynpro web module (=WAR file) and the containing deployable object (=EAR file).
static String getResourcePath(IWDWebModule webModule, String resourceName)
          Returns the real public resource path of a Web Dynpro web module (=WAR file) and the containing deployable object (=EAR file).
static String getResourcePath(String objectName)
          Deprecated. Starting with NetWeaver 7.1, this method is deprecated. Reason: A deployable object (=EAR file) can contain more than one Web Dynpro web module (=WAR file) and a resource always belongs to a Web Dynpro web module. Therefore it is not enough to specify a deployable object. Instead the concrete Web Dynpro web module should be specified, i.e. the method getResourcePath(IWDWebModule webModule) should be used instead. In case the deprecated method is used it is tried to derive the Web Dynpro web module name from the name of the deployable object. This works only if there is exactly one Web Dynpro web module contained in the deployable object.
static String getResourcePath(String objectName, String resourceName)
          Deprecated. Starting with NetWeaver 7.1, this method is deprecated. Reason: A deployable object (=EAR file) can contain more than one Web Dynpro web module (=WAR file) and a resource always belongs to a Web Dynpro web module. Therefore it is not enough to specify a deployable object. Instead the concrete Web Dynpro web module should be specified, i.e. the method getResourcePath(IWDWebModule webModule, String resourceName) should be used instead. In case the deprecated method is used it is tried to derive the Web Dynpro web module name from the name of the deployable object. This works only if there is exactly one Web Dynpro web module contained in the deployable object.
static String getResourcePath(WDDeployableObjectPart deployableObjectPart)
          Returns the real public resource path of a specified deployable object part.
static String getResourcePath(WDDeployableObjectPart deployableObjectPart, String resourceName)
          Returns the real public resource path of a specified deployable object part.
static String getSAPIconsResourcePath()
          Return is the resource path to the SAP icons.
static String getSAPIconsWebResourcePath()
          Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Instead of this method which generates a URL prefix to a SAP icon Web resource, the overloaded getSAPIconWebResourcePath(String) method that generates a URL to an explicitly specified SAP icon should be used. The method is may be withdrawn with the first new NetWeaver release in 2006.
static String getSAPIconWebResourcePath(String iconName)
          Return is the Web resource path to the specified SAP icon.
static String getStaticApplicationURL()
          Return is the static part of a Web Dynpro application URL.
static String getWebResourcePath(String objectName)
          Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Replacement: Instead of this method which generates a URL path prefix to a Web resource, the overloaded getWebResourcePath methods which generate a path to an explicitly specified resource should be used. The method may be withdrawn with the first new NetWeaver release in 2006.
static String getWebResourcePath(WDDeployableObjectPart deployableObjectPart)
          Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Replacement: Instead of this method which generates a URL path prefix to a Web resource, the overloaded getWebResourcePath methods which generate a path to an explicitly specified resource should be used. The method may be withdrawn with the first new NetWeaver release in 2006.
static String getWebResourceUrl(IWDWebModule webModule, String resourceName)
          Returns an URL to a web resource specified by resourceName which must be located in the specified Web Dynpro web module.
static String getWebResourceURL(String objectName)
          Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Replacement: Instead of this method which generates a URL path prefix to a Web resource, the overloaded getWebResourceURL methods which generate a URL to an explicitly specified resource should be used. The method may be withdrawn with the first new NetWeaver release in 2006.
static String getWebResourceUrl(String deployableObjectName, String resourceName)
          Deprecated. Starting with NetWeaver 7.1, this method is deprecated. Reason: A deployable object (=EAR file) can contain more than one Web Dynpro web module (=WAR file) and a resource always belongs to a Web Dynpro web module. Therefore it is not enough to specify a deployable object. Instead the concrete Web Dynpro web module should be specified, i.e. the method getWebResourceUrl(IWDWebModule webModule, String resourceName) should be used instead. In case the deprecated method is used it is tried to derive the Web Dynpro web module name from the name of the deployable object. This works only if there is exactly one Web Dynpro web module contained in the deployable object.
static String getWebResourceURL(String objectName, String resourceName)
          Deprecated. Starting with NW04 SP19, NW04s SP11, NW07 SP2, the method is deprecated. Reason for the deprecation is that the resourceName provided as input parameter is not URL encoded in the current implementation. To not break already running code where the resourceName is encoded outside of the method, the method is deprecated and replaced by the (@link #getWebResourceUrl(String, String)).
static String getWebResourceURL(WDDeployableObjectPart deployableObjectPart)
          Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Replacement: Instead of this method which generates a URL path prefix to a Web resource, the overloaded getWebResourceURL methods which generate a URL to an explicitly specified resource should be used. The method may be withdrawn with the first new NetWeaver release in 2006.
static String getWebResourceUrl(WDDeployableObjectPart deployableObjectPart, String resourceName)
          Returns an URL to a web resource specified by resourceName which must be located in the given deployableObjectPart.
static String getWebResourceURL(WDDeployableObjectPart deployableObjectPart, String resourceName)
          Deprecated. Starting with NW04 SP19, NW04s SP11, NW07 SP2, the method is deprecated. Reason for the deprecation is that the resourceName provided as input parameter is not URL encoded in the current implementation. To not break already running code where the resourceName is encoded outside of the method, the method is deprecated and replaced by the (@link #getWebResourceUrl(com.sap.tc.webdynpro.services.sal.deployment.api.WDDeployableObjectPart, String)).
static String getWebResourceURLForPath(String relativePath)
          Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. No replacement is available.
static String getWorkloadBalancedApplicationURL(String deployableObjectName, String applicationPartName)
          Return is the application URL of the application deployable object part supplied as input parameter.
static String getWorkloadBalancedApplicationURL(String objectName, String partName, Map urlParameters)
          Return is the workload balanced application URL for the specified deployable object part with appended URL parameters given by urlParameters.
static String getWorkloadBalancedApplicationURL(WDDeployableObjectPart deployableObjectPart)
          Return is the application URL of the application deployable object part supplied as input parameter.
static String getWorkloadBalancedApplicationURL(WDDeployableObjectPart deployableObjectPart, Map urlParameters)
          Return is the workload balanced application URL for the specified deployableObjectPart with appended URL parameters given by urlParameters.
static boolean isSecureURL(String url)
          Checks whether the URL specified as input parameter is secure, i.e. is accepted by the URL checker.
 
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 String getPublicResourcePath(String resourceName)
Returns the file system path to the resource specified by resourceName that is expected to be in the public directory of the web module (=WAR file) of the currently running Web Dynpro application. The public directory contains resources which are not accessible by others via URL (i.e. resources under WEB-INF folder).

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 NetWeaver 7.1, this path refers to a resource in the WEB-INF folder of the current application.

Returns:
the file system path to the specified resource under the WEB-INF directory of the currently running application

getPublicResourcePath

public static String getPublicResourcePath(WDDeployableObjectPart part,
                                           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 by part. 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 NetWeaver 7.1, this path refers to a resource in the WEB-INF folder of the specified deployable object part.

Returns:
the file system path to the specified resource under the WEB-INF directory of the specified deployable object part

getResourcePath

public static String getResourcePath(String objectName)
Deprecated. Starting with NetWeaver 7.1, this method is deprecated. Reason: A deployable object (=EAR file) can contain more than one Web Dynpro web module (=WAR file) and a resource always belongs to a Web Dynpro web module. Therefore it is not enough to specify a deployable object. Instead the concrete Web Dynpro web module should be specified, i.e. the method getResourcePath(IWDWebModule webModule) should be used instead. In case the deprecated method is used it is tried to derive the Web Dynpro web module name from the name of the deployable object. This works only if there is exactly one Web Dynpro web module contained in the deployable object.

Returns the real public resource path of a specified deployable object (=EAR file) and the derived Web Dynpro web module name (=WAR file name). This method can only be used if the deployable object contains exactly one Web Dynpro web module with the standard name.
On SAP NetWeaver 7.1, this is
 C:/usr/sap/<SID>/JC<INST-NR>/j2ee/cluster/apps/<objectName>/<webModuleName>
 

Parameters:
objectName - the name of an deployable object
Returns:
the deployable object dependent real resource path

getResourcePath

public static String getResourcePath(IWDWebModule webModule)
Returns the real public resource path of a specified Web Dynpro web module (=WAR file) and the containing deployable object (=EAR file).
On SAP NetWeaver 7.1, this is
 C:/usr/sap/<SID>/JC<INST-NR>/j2ee/cluster/apps/<objectName>/<webModuleName>
 

Parameters:
webModule - the Web Dynpro web module instance
Returns:
the web module dependent real resource path

getResourcePath

public static String getResourcePath(String objectName,
                                     String resourceName)
Deprecated. Starting with NetWeaver 7.1, this method is deprecated. Reason: A deployable object (=EAR file) can contain more than one Web Dynpro web module (=WAR file) and a resource always belongs to a Web Dynpro web module. Therefore it is not enough to specify a deployable object. Instead the concrete Web Dynpro web module should be specified, i.e. the method getResourcePath(IWDWebModule webModule, String resourceName) should be used instead. In case the deprecated method is used it is tried to derive the Web Dynpro web module name from the name of the deployable object. This works only if there is exactly one Web Dynpro web module contained in the deployable object.

Returns the real public resource path of a specified deployable object (=EAR file) and the derived Web Dynpro web module name (=WAR file name). This method can only be used if the deployable object contains exactly one Web Dynpro web module with the standard name.
On SAP NetWeaver 7.1, this is for example
 C:/usr/sap/<SID>/JC<INST-NR>/j2ee/cluster/apps/<objectName>/<webModuleName>/<resourcePath>/<resourceName>
 

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 (relative to the specified deployable object)
Returns:
the deployable object dependent real resource path

getResourcePath

public static String getResourcePath(IWDWebModule webModule,
                                     String resourceName)
Returns the real public resource path of a Web Dynpro web module (=WAR file) and the containing deployable object (=EAR file). This method can only be used if the deployabel object contains exactly one Web Dynpro web module with the standard name.
On SAP NetWeaver 7.1, this is
 C:/usr/sap/<SID>/JC<INST-NR>/j2ee/cluster/apps/<objectName>/<webModuleName>/<resourcePath>/<resourceName>
 

Parameters:
webModule - the Web Dynpro web module which contains the requested resource.
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 (relative to the specified deployable object)
Returns:
the web module dependent real resource path

getResourcePath

public static String getResourcePath(WDDeployableObjectPart deployableObjectPart)
Returns the real public resource path of a specified deployable object part.
On SAP NetWeaver 7.1, this is
 C:/usr/sap/<SID>/JC<INST-NR>/j2ee/cluster/apps/<objectName>/<webModuleName>/<partType>/<deployableObjectPart>
 

Parameters:
deployableObjectPart - a deployable object part
Returns:
the deployable object part dependent real resource path

getResourcePath

public static String getResourcePath(WDDeployableObjectPart deployableObjectPart,
                                     String resourceName)
                              throws WDAliasResolvingException
Returns the real public resource path of a specified deployable object part.

On SAP NetWeaver 7.1, this is

 C:/usr/sap/<SID>/JC<INST-NR>/j2ee/cluster/apps/<objectName>/<webModuleName>/<partType>/<deployableObjectPart>/<resourcePath>/<resourceName>
 

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 (relative 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 String getWebResourcePath(String objectName)
Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Replacement: Instead of this method which generates a URL path prefix to a Web resource, the overloaded getWebResourcePath methods which generate a path to an explicitly specified resource should be used. The method may be withdrawn with the first new NetWeaver release in 2006.

Returns the used web resource path of a specified deployable object.
On SAP NetWeaver 7.0, this is (depending on the environment the Web Dynpro runtime runs) something like
 ../../../resources/<objectName>
 
(the relative URL to the resource of the deployable object).

Note, that a relative path to a Web resource should not be concatenated to the result of this method. In a portal environment, for instance, this would lead to an error. For such an use case, the method getWebResourceURL(String, String) should be used.

Usually, Web Dynpro generates relative URLs and leaves it to the Web Container to generate absolute ones. Whether the host and port of the server node will be used or the host and port of the load balancer is a matter of a central configuration in "Http Provider" service. More information about this can be found in SAP Help portal: http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm

Parameters:
objectName - the name of an deployable object.
Returns:
the web resource path of a specified deployable object

getWebResourcePath

public static String getWebResourcePath(WDDeployableObjectPart deployableObjectPart)
Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Replacement: Instead of this method which generates a URL path prefix to a Web resource, the overloaded getWebResourcePath methods which generate a path to an explicitly specified resource should be used. The method may be withdrawn with the first new NetWeaver release in 2006.

Returns the used web resource path of a specified deployable object part.

On SAP NetWeaver 7.0, this is (depending on the environment the Web Dynpro runtime runs) something like

 ../../../resources/<objectName>/<partType>/<deployableObjectPart>
 
(the relative URL to the resource of the deployable object part), whereas the objectName is the name of the deployable object of the deployableObjectPart, and partType is the type of the deployable object part.

Note, that a relative path to a Web resource should not be concatenated to the result of this method. In a portal environment, for instance, this would lead to an error. For such an use case, the method getWebResourceURL(WDDeployableObjectPart, String) should be used.

Usually, Web Dynpro generates relative URLs and leaves it to the Web Container to generate absolute ones. Whether the host and port of the server node will be used or the host and port of the load balancer is a matter of a central configuration in "Http Provider" service. More information about this can be found in SAP Help portal: http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm

Parameters:
deployableObjectPart - a deployable object part
Returns:
the web resource path of a specified deployable object part

getWebResourceURL

public static String getWebResourceURL(String objectName,
                                       String resourceName)
                                throws WDURLException
Deprecated. Starting with NW04 SP19, NW04s SP11, NW07 SP2, the method is deprecated. Reason for the deprecation is that the resourceName provided as input parameter is not URL encoded in the current implementation. To not break already running code where the resourceName is encoded outside of the method, the method is deprecated and replaced by the (@link #getWebResourceUrl(String, String)).

Returns an URL for a specified web resource located in a specified deployable object.

On SAP NetWeaver 7.0, this is (depending on the environment the Web Dynpro runtime runs) something like

 ../../../resources/<objectName>/<resourceName>
 
(the relative URL to the specified resource of the given deployable object).

Usually, Web Dynpro generates relative URLs and leaves it to the Web Container to generate absolute ones. Whether the host and port of the server node will be used or the host and port of the load balancer is a matter of a central configuration in "Http Provider" service. More information about this can be found in SAP Help portal: http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm

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 String getWebResourceURL(String objectName)
                                throws WDURLException
Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Replacement: Instead of this method which generates a URL path prefix to a Web resource, the overloaded getWebResourceURL methods which generate a URL to an explicitly specified resource should be used. The method may be withdrawn with the first new NetWeaver release in 2006.

Returns an URL that points to the root of the public resources of the specified deployable object, i.e. returns the same like the method getWebResourcePath(String).

Note, that a relative path to a Web resource should not be concatenated to the result of this method. In a portal environment, for instance, this would lead to an error. For such an use case, the method getWebResourceURL(String, String) should be used.

Usually, Web Dynpro generates relative URLs and leaves it to the Web Container to generate absolute ones. Whether the host and port of the server node will be used or the host and port of the load balancer is a matter of a central configuration in "Http Provider" service. More information about this can be found in SAP Help portal: http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm

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 String getWebResourceURL(WDDeployableObjectPart deployableObjectPart,
                                       String resourceName)
                                throws WDURLException
Deprecated. Starting with NW04 SP19, NW04s SP11, NW07 SP2, the method is deprecated. Reason for the deprecation is that the resourceName provided as input parameter is not URL encoded in the current implementation. To not break already running code where the resourceName is encoded outside of the method, the method is deprecated and replaced by the (@link #getWebResourceUrl(com.sap.tc.webdynpro.services.sal.deployment.api.WDDeployableObjectPart, String)).

Returns an URL for a specified web resource of a given deployable object part.

On SAP NetWeaver 7.0, this is (depending on the environment the Web Dynpro runtime runs) something like

 ../../../resources/<objectName>/<partType>/<depoyableObjectName>/<resourceName>
 
(the relative URL to the specified resource of the given deployable object part), whereas the objectName is the name of the deployable object of the deployableObjectPart.

Usually, Web Dynpro generates relative URLs and leaves it to the Web Container to generate absolute ones. Whether the host and port of the server node will be used or the host and port of the load balancer is a matter of a central configuration in "Http Provider" service. More information about this can be found in SAP Help portal: http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm

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 String getWebResourceURL(WDDeployableObjectPart deployableObjectPart)
                                throws WDURLException
Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Replacement: Instead of this method which generates a URL path prefix to a Web resource, the overloaded getWebResourceURL methods which generate a URL to an explicitly specified resource should be used. The method may be withdrawn with the first new NetWeaver release in 2006.

Returns an URL pointing to the root of the specified deployable object part, i.e. returns the same like the method getWebResourcePath(WDDeployableObjectPart).

Note, that a relative path to a Web resource should not be concatenated to the result of this method. In a portal environment, for instance, this would lead to an error. For such an use case, the method getWebResourceURL(WDDeployableObjectPart, String) should be used.

Usually, Web Dynpro generates relative URLs and leaves it to the Web Container to generate absolute ones. Whether the host and port of the server node will be used or the host and port of the load balancer is a matter of a central configuration in "Http Provider" service. More information about this can be found in SAP Help portal: http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm

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)

getWebResourceUrl

public static String getWebResourceUrl(String deployableObjectName,
                                       String resourceName)
Deprecated. Starting with NetWeaver 7.1, this method is deprecated. Reason: A deployable object (=EAR file) can contain more than one Web Dynpro web module (=WAR file) and a resource always belongs to a Web Dynpro web module. Therefore it is not enough to specify a deployable object. Instead the concrete Web Dynpro web module should be specified, i.e. the method getWebResourceUrl(IWDWebModule webModule, String resourceName) should be used instead. In case the deprecated method is used it is tried to derive the Web Dynpro web module name from the name of the deployable object. This works only if there is exactly one Web Dynpro web module contained in the deployable object.

Returns an URL to a web resource specified by resourceName which must be located in the deployable object specified by deployableObjectName. The provided resourceName will be URL encoded within this method, but it should not contain an unencoded URL query parameter string. If it contains query parameters, the callers of the method must take care by themselves that the query string is already properly URL encoded.

On SAP NetWeaver 7.1, such a Web resource URL looks for instance like the following:

 ../../../resources/<deploaybleObjectName>/<resourceName>
 

Usually, Web Dynpro generates relative URLs and leaves it to the Web Container to generate absolute ones. Whether the host and port of the server node will be used or the host and port of the load balancer is a matter of central configuration in "Http Provider" service. More information about this can be found in SAP Help portal: http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm

Parameters:
deployableObjectName - name of the deployable object in which the Web resource is located
resourceName - the name of the resource (including any relative path information like "pictures/myImage.gif"). This parameter must not be null or unspecified. The resourceName is URL encoded within this method, but should not contain an unencoded URL query string.
Returns:
the URL to the specified web resource

getWebResourceUrl

public static String getWebResourceUrl(IWDWebModule webModule,
                                       String resourceName)
Returns an URL to a web resource specified by resourceName which must be located in the specified Web Dynpro web module. The provided resourceName will be URL encoded within this method, but it should not contain an unencoded URL query parameter string. If it contains query parameters, the callers of the method must take care by themselves that the query string is already properly URL encoded.

On SAP NetWeaver 7.1, such a Web resource URL looks for instance like the following:

 ../../../resources/<deploaybleObjectName>/<resourceName>
 

Usually, Web Dynpro generates relative URLs and leaves it to the Web Container to generate absolute ones. Whether the host and port of the server node will be used or the host and port of the load balancer is a matter of central configuration in "Http Provider" service. More information about this can be found in SAP Help portal: http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm

Parameters:
webModule - the Web Dynpro web module in which the Web resource is located
resourceName - the name of the resource (including any relative path information like "pictures/myImage.gif"). This parameter must not be null or unspecified. The resourceName is URL encoded within this method, but should not contain an unencoded URL query string.
Returns:
the URL to the specified web resource

getWebResourceUrl

public static String getWebResourceUrl(WDDeployableObjectPart deployableObjectPart,
                                       String resourceName)
Returns an URL to a web resource specified by resourceName which must be located in the given deployableObjectPart. The provided resourceName will be URL encoded within this method, but it should not contain an unencoded URL query parameter string. If it contains query parameters, the callers of the method must take care by themselves that the query string is already properly URL encoded.

On SAP NetWeaver 7.1, such a Web resource URL looks for instance like the following:

 ../../../resources/<deploaybleObjectName>/<deployableObjectPartType>/<depoyableObjectPartName>/<resourceName>
 

Usually, Web Dynpro generates relative URLs and leaves it to the Web Container to generate absolute ones. Whether the host and port of the server node will be used or the host and port of the load balancer is a matter of central configuration in "Http Provider" service. More information about this can be found in SAP Help portal: http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm

Parameters:
deployableObjectPart - the deployable object part in which the Web resource is located
resourceName - the name of the resource (including any relative path information like "pictures/myImage.gif"). This parameter must not be null or unspecified. The resourceName is URL encoded within this method, but should not contain an unencoded URL query string.
Returns:
the URL to the specified web resource

getWebResourceURLForPath

public static String getWebResourceURLForPath(String relativePath)
                                       throws WDURLException
Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. No replacement is available.

Returns the URL pointing to the Web resource specified by relativePath. The relativePath denotes a relative path on the file system that starts at the root directory of the Web resources. The method can be used to create URLs for resources specified by relative paths on the file system.

Example: WDURLGenerator.getWebResourceURLForPath("./com/sap/MyDC/test.gif") returns (depending on the environment the Web Dynpro runtime runs) something like

 ../../../resources/com/sap/MyDC/test.gif"
 

Usually, Web Dynpro generates relative URLs and leaves it to the Web Container to generate absolute ones. Whether the host and port of the server node will be used or the host and port of the load balancer is a matter of a central configuration in "Http Provider" service. More information about this can be found in SAP Help portal: http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm

Parameters:
relativePath - relative path on the file system that starts at the root directory of the Web resources; the path might start with a "." followed by a file path separator or without file path separator
Returns:
URL to the Web resource specified by relativePath
Throws:
NullPointerException - if relativePath is null
WDURLException - if relativePath is null or empty, or it contains the characters ":" or "..", or it starts with a leading file separator

getAbsoluteWebResourceURL

public static String getAbsoluteWebResourceURL(String objectName,
                                               String resourceName)
                                        throws WDURLException
Deprecated. Starting with NetWeaver 7.1, this method is deprecated. Reason: A deployable object (=EAR file) can contain more than one Web Dynpro web module (=WAR file) and a resource always belongs to a Web Dynpro web module. Therefore it is not enough to specify a deployable object. Instead the concrete Web Dynpro web module should be specified, i.e. the method getAbsoluteWebResourceURL(IWDWebModule webModule, String resourceName) should be used instead. In case the deprecated method is used it is tried to derive the Web Dynpro web module name from the name of the deployable object. This works only if there is exactly one Web Dynpro web module contained in the deployable object.

Returns an absolute URL for the 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. The resourceName is not URL encoded, i.e. this must be done by the users of this method if needed
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 String getAbsoluteWebResourceURL(IWDWebModule webModule,
                                               String resourceName)
                                        throws WDURLException
Returns an absolute URL for the specified web resource located in a specified web module. See also getWebResourceURL(IWDWebModule, String). *

Parameters:
webModule - the Web Dynpro web module. 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. The resourceName is not URL encoded, i.e. this must be done by the users of this method if needed
Returns:
the URL for a web resource located in a specified Web Dynpro web module
Throws:
WDURLException

getAbsoluteWebResourceURL

public static String getAbsoluteWebResourceURL(String objectName)
                                        throws WDURLException
Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Replacement: Instead of this method which generates a URL path prefix to a Web resource, the overloaded getAbsoluteWebResourceURL methods which generate a URL to an explicitly specified resource should be used. The method may be withdrawn with the first new NetWeaver release in 2006.

Returns an absolute URL that points to the root of the public resources of the specified deployable object. See also getWebResourceURL(String).

Note: If a reverse proxy is used in the landscape, the reverse proxy must be configured in a way that the used client protocol (e.g. HTTP or HTTPS) as well as the client host and port are mapped to the internal requests.

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 String getAbsoluteWebResourceURL(WDDeployableObjectPart deployableObjectPart)
                                        throws WDURLException
Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Replacement: Instead of this method which generates a URL path prefix to a Web resource, the overloaded getAbsoluteWebResourceURL methods which generate a URL to an explicitly specified resource should be used. The method may be withdrawn with the first new NetWeaver release in 2006.

Returns an absolute URL pointing to the root of the specified deployable object part. See also getWebResourceURL(WDDeployableObjectPart).

Note: If a reverse proxy is used in the landscape, the reverse proxy must be configured in a way that the used client protocol (e.g. HTTP or HTTPS) as well as the client host and port are mapped to the internal requests.

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 String getAbsoluteWebResourceURL(WDDeployableObjectPart deployableObjectPart,
                                               String resourceName)
                                        throws WDURLException
Returns an absolute URL for a specified web resource of a specified deployable object part. See also getWebResourceURL(WDDeployableObjectPart, String).

Note: If a reverse proxy is used in the landscape, the reverse proxy must be configured in a way that the used client protocol (e.g. HTTP or HTTPS) as well as the client host and port are mapped to the internal requests.

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. The resourceName is not URL encoded, i.e. this must be done by the users of this method if needed
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 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

Usually, Web Dynpro generates relative URLs and leaves it to the Web Container to generate absolute ones. Whether the host and port of the server node will be used or the host and port of the load balancer is a matter of a central configuration in "Http Provider" service. More information about this can be found in SAP Help portal: http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm

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 String getApplicationURL(String deployableObjectName,
                                       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.

Usually, Web Dynpro generates relative URLs and leaves it to the Web Container to generate absolute ones. Whether the host and port of the server node will be used or the host and port of the load balancer is a matter of a central configuration in "Http Provider" service. More information about this can be found in SAP Help portal: http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm

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 String getApplicationURL(WDDeployableObjectPart deployableObjectPart,
                                       Map urlParameters)
                                throws WDURLException
Return is the application URL for the specified deployableObjectPart with appended URL parameters given by urlParameters. All keys in the map must be of type java.lang.String. The value can either be of type java.lang.String or java.lang.String[] when the parameter should be added more than once.

Usually, Web Dynpro generates relative URLs and leaves it to the Web Container to generate absolute ones. Whether the host and port of the server node will be used or the host and port of the load balancer is a matter of a central configuration in "Http Provider" service. More information about this can be found in SAP Help portal: http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm

Parameters:
deployableObjectPart - a deployable object part representing a Web Dynpro application
urlParameters - key/value pairs added as URL parameters; all keys must be of type String and the value can be String or 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 String getApplicationURL(String objectName,
                                       String partName,
                                       Map urlParameters)
                                throws WDURLException
Return is the application URL for the specified deployable object part with appended URL parameters given by urlParameters. All keys in the map must be of type java.lang.String. The value can either be of type java.lang.String or java.lang.String[] when the parameter should be added more than once.

Usually, Web Dynpro generates relative URLs and leaves it to the Web Container to generate absolute ones. Whether the host and port of the server node will be used or the host and port of the load balancer is a matter of a central configuration in "Http Provider" service. More information about this can be found in SAP Help portal: http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm

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; all keys must be of type String and the value can be String or 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)

getDynamicApplicationURL

public static String getDynamicApplicationURL(String deployableObjectName,
                                              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 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 String getStaticApplicationURL()
Return is the static part of a Web Dynpro application URL.

On SAP NetWeaver 7.0, this is "/webdynpro/dispatcher".

Returns:
the static part of a Web Dynpro application URL

getWorkloadBalancedApplicationURL

public static 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(...).

Please note that these URLs won't work to access a Web AS system via a reverse proxy.

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 String getWorkloadBalancedApplicationURL(String deployableObjectName,
                                                       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.

Usually, Web Dynpro generates relative URLs and leaves it to the Web Container to generate absolute ones. Whether the host and port of the server node will be used or the host and port of the load balancer is a matter of a central configuration in "Http Provider" service. More information about this can be found in SAP Help portal: http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm

Please note that these URLs won't work to access a Web AS system via a reverse proxy.

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

getWorkloadBalancedApplicationURL

public static String getWorkloadBalancedApplicationURL(WDDeployableObjectPart deployableObjectPart,
                                                       Map urlParameters)
                                                throws WDURLException
Return is the workload balanced application URL for the specified deployableObjectPart with appended URL parameters given by urlParameters. All keys in the map must be of type java.lang.String. The value can either be of type java.lang.String or java.lang.String[] when the parameter should be added more than once.

Please note that these URLs won't work to access a Web AS system via a reverse proxy.

Parameters:
deployableObjectPart - a deployable object part representing a Web Dynpro application
urlParameters - key/value pairs added as URL parameters; all keys must be of type String and the value can be String or 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 String getWorkloadBalancedApplicationURL(String objectName,
                                                       String partName,
                                                       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 keys in the map must be of type java.lang.String. The value can either be of type java.lang.String or java.lang.String[] when the parameter should be added more than once.

Please note that these URLs won't work to access a Web AS system via a reverse proxy.

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; all keys must be of type String and the value can be String or 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 String getSAPIconsResourcePath()
Return is the resource path to the SAP icons.

On SAP NetWeaver 7.0, 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

getSAPIconsWebResourcePath

public static String getSAPIconsWebResourcePath()
Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Instead of this method which generates a URL prefix to a SAP icon Web resource, the overloaded getSAPIconWebResourcePath(String) method that generates a URL to an explicitly specified SAP icon should be used. The method is may be withdrawn with the first new NetWeaver release in 2006.

Return is the Web resource path to the SAP icons.

On SAP NetWeaver 7.0, this is

../../../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

getSAPIconWebResourcePath

public static String getSAPIconWebResourcePath(String iconName)
Return is the Web resource path to the specified SAP icon.

On SAP NetWeaver 7.0, this is

../../../resources/sap.com/tc~wd~dispwda/global/sapIcons/
(the relative URL to the SAP icon).

Returns:
the Web resource path to the specified SAP icon

getPortalIconsResourcePath

public static String getPortalIconsResourcePath()
Return is the resource path to the Portal icons.

On SAP NetWeaver 7.0, 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

getPortalIconsWebResourcePath

public static String getPortalIconsWebResourcePath()
Deprecated. Starting with SAP NetWeaver 7.0, the method is deprecated. Instead of this method which generates a URL prefix to a SAP portal icon Web resource, the overloaded getPortalIconWebResourcePath(String) method that generates a URL to an explicitly specified SAP portal icon should be used. The method is may be withdrawn with the first new NetWeaver release in 2006.

Return is the Web resource path to the Portal icons.

On SAP NetWeaver 7.0, this is

../../../resources/sap.com/tc~wd~dispwda/global/portalIcons
(the relative URL to the root of the Portal icons).

Returns:
the Web resource path to the portal icons

getPortalIconWebResourcePath

public static String getPortalIconWebResourcePath(String iconName)
Return is the Web resource path to the specified Portal icon.

On SAP NetWeaver 7.0, this is

../../../resources/sap.com/tc~wd~dispwda/global/portalIcons/
(the relative URL to the Portal icons).

Returns:
the Web resource path to the specified portal icon

isSecureURL

public static boolean isSecureURL(String url)
Checks whether the URL specified as input parameter is secure, i.e. is accepted by the URL checker. A URL is accepted by the URL checker if it does not contain any JavaScript tags, uses an allowed protocol and follows the rules of a standard conform URL. In case the URL is secure, the method returns true, otherwise false.

A similar check is made when using UI controls which are dealing with URLs, like WDLinkToURL. If those controls are used with an insecure URL, it will lead to a RuntimeException and termination of the application.

Parameters:
url - URL that should be checked
Returns:
true, if the URL is secure

getQueryString

public static String getQueryString(Map<String,Object> urlParameters,
                                    String encoding)
                             throws UnsupportedEncodingException
Converts a Map of parameters into the corresponding query string. The query string will be encoded in UTF-8. The method properly escapes all characters not allowed in query strings using the %xx notation.

Parameters:
urlParameters - a map of parameters. The keys in this map are the parameter names, the values the parameter values. They are converted to Strings using toString(). String arrays however are treated specially. If the value is an array of Strings, the key is added to the query string several times, once for each entry in the array.
If a value is null, the key will be omitted. If it is empty, an empty value will be assigned.
encoding - the encoding used for the % escaping. If it is null or empty, "UTF-8" is chosen.
Returns:
the encoded query string
Throws:
UnsupportedEncodingException - if the encoding is not supported
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] WD-RUNTIME [sap.com] tc/wd/api default BC-WD-JAV-RUN
[sap.com] WD-RUNTIME [sap.com] tc/wd/webdynprodeprecated - BC-WD-JAV
[sap.com] WD-RUNTIME [sap.com] tc/wd/webdynprodeprecated default BC-WD-JAV


Copyright 2014 SAP AG Complete Copyright Notice