|
SAP NetWeaver 7.3 (SP 11) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sap.tc.webdynpro.services.sal.url.api.WDURLGenerator
public abstract class WDURLGenerator
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:
IWDURLGenerator
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 |
|---|
public WDURLGenerator()
| Method Detail |
|---|
public static String getPublicResourcePath(String resourceName)
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.
public static String getPublicResourcePath(WDDeployableObjectPart part,
String resourceName)
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/
On SAP NetWeaver 7.1, this path refers to a resource in the WEB-INF folder
of the specified deployable object part.
public static String getResourcePath(String objectName)
C:/usr/sap/<SID>/JC<INST-NR>/j2ee/cluster/apps/<objectName>/<webModuleName>
objectName - the name of an deployable object
public static String getResourcePath(IWDWebModule webModule)
C:/usr/sap/<SID>/JC<INST-NR>/j2ee/cluster/apps/<objectName>/<webModuleName>
webModule - the Web Dynpro web module instance
public static String getResourcePath(String objectName,
String resourceName)
C:/usr/sap/<SID>/JC<INST-NR>/j2ee/cluster/apps/<objectName>/<webModuleName>/<resourcePath>/<resourceName>
objectName - the name of an deployable objectresourceName - 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)
public static String getResourcePath(IWDWebModule webModule,
String resourceName)
C:/usr/sap/<SID>/JC<INST-NR>/j2ee/cluster/apps/<objectName>/<webModuleName>/<resourcePath>/<resourceName>
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)
public static String getResourcePath(WDDeployableObjectPart deployableObjectPart)
C:/usr/sap/<SID>/JC<INST-NR>/j2ee/cluster/apps/<objectName>/<webModuleName>/<partType>/<deployableObjectPart>
deployableObjectPart - a deployable object part
public static String getResourcePath(WDDeployableObjectPart deployableObjectPart,
String resourceName)
throws WDAliasResolvingException
On SAP NetWeaver 7.1, this is
C:/usr/sap/<SID>/JC<INST-NR>/j2ee/cluster/apps/<objectName>/<webModuleName>/<partType>/<deployableObjectPart>/<resourcePath>/<resourceName>
deployableObjectPart - a deployable object partresourceName - 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).
WDAliasResolvingException - if the specified resourceName contains an
alias that couldn't be resolvedpublic static String getWebResourcePath(String objectName)
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.
../../../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
objectName - the name of an deployable object.
public static String getWebResourcePath(WDDeployableObjectPart deployableObjectPart)
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.
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
deployableObjectPart - a deployable object part
public static String getWebResourceURL(String objectName,
String resourceName)
throws WDURLException
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)).
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
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.
WDURLException - if the URL to the web resource couldn't be generated
public static String getWebResourceURL(String objectName)
throws WDURLException
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.
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
objectName - the name of an deployable object. This parameter must not be
null or unspecified.
WDURLException - if the URL to the web resource couldn't be generatedgetWebResourcePath(String)
public static String getWebResourceURL(WDDeployableObjectPart deployableObjectPart,
String resourceName)
throws WDURLException
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)).
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
deployableObjectPart - a deployable object partresourceName - the name of the resource (inclusive any relative path information like
"pictures/myImage.gif"). This parameter must not be null or
unspecified.
WDURLException - if the URL to the web resource couldn't be generated
public static String getWebResourceURL(WDDeployableObjectPart deployableObjectPart)
throws WDURLException
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.
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
deployableObjectPart - a deployable object part
WDURLException - if the URL to the web resource couldn't be generatedgetWebResourcePath(WDDeployableObjectPart)
public static String getWebResourceUrl(String deployableObjectName,
String resourceName)
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
deployableObjectName - name of the deployable object in which the Web resource is locatedresourceName - 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.
public static String getWebResourceUrl(IWDWebModule webModule,
String resourceName)
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
webModule - the Web Dynpro web module in which the Web resource is locatedresourceName - 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.
public static String getWebResourceUrl(WDDeployableObjectPart deployableObjectPart,
String resourceName)
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
deployableObjectPart - the deployable object part in which the Web resource is locatedresourceName - 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.
public static String getWebResourceURLForPath(String relativePath)
throws WDURLException
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
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
relativePath
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
public static String getAbsoluteWebResourceURL(String objectName,
String resourceName)
throws WDURLException
getWebResourceURL(String, String).
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
WDURLException - if the URL to the web resource couldn't be generatedgetWebResourceURL(String, String)
public static String getAbsoluteWebResourceURL(IWDWebModule webModule,
String resourceName)
throws WDURLException
getWebResourceURL(IWDWebModule, String). *
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
WDURLException
public static String getAbsoluteWebResourceURL(String objectName)
throws WDURLException
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.
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.
objectName - the name of an deployable object. This parameter must not be
null or unspecified.
WDURLException - if the URL to the web resource couldn't be generatedgetWebResourceURL(String)
public static String getAbsoluteWebResourceURL(WDDeployableObjectPart deployableObjectPart)
throws WDURLException
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.
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.
deployableObjectPart - a deployable object part
WDURLException - if the URL to the web resource couldn't be generatedgetWebResourceURL(WDDeployableObjectPart)
public static String getAbsoluteWebResourceURL(WDDeployableObjectPart deployableObjectPart,
String resourceName)
throws WDURLException
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.
deployableObjectPart - a deployable object partresourceName - 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
WDURLException - if the URL to the web resource couldn't be generatedgetWebResourceURL(WDDeployableObjectPart, String)
public static String getApplicationURL(WDDeployableObjectPart deployableObjectPart)
throws WDURLException
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
deployableObjectPart - a deployable object part representing a Web Dynpro application
WDURLException - if the URL couldn't be generated
public static String getApplicationURL(String deployableObjectName,
String applicationPartName)
throws WDURLException
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
deployableObjectName - the name of a deployable objectapplicationPartName - the name of a application deployable object part
WDURLException - if the URL couldn't be generated
public static String getApplicationURL(WDDeployableObjectPart deployableObjectPart,
Map urlParameters)
throws WDURLException
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
deployableObjectPart - a deployable object part representing a Web Dynpro applicationurlParameters - key/value pairs added as URL parameters; all keys must be of type String and the value can be String or String[]
deployableObjectPart with appended
URL parameters given by urlParameters
WDURLException - if the URL couldn't be generatedgetApplicationURL(WDDeployableObjectPart)
public static String getApplicationURL(String objectName,
String partName,
Map urlParameters)
throws WDURLException
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
objectName - name of a deployable object that contains the applicationpartName - the name of a application deployable object parturlParameters - key/value pairs added as URL parameters; all keys must be of type String and the value can be String or String[]
urlParameters
WDURLException - if the URL couldn't be generatedgetApplicationURL(String, String)
public static String getDynamicApplicationURL(String deployableObjectName,
String applicationPartName)
throws WDURLException
applicationPartName and the deployable object deployableObjectName.
deployableObjectName - the name of the deployable object to which the application belongsapplicationPartName - the (fully-qualified) name of the application part
WDURLException - if the URL couldn't be generated
public static String getDynamicApplicationURL(WDDeployableObjectPart deployableObjectPart)
throws WDURLException
deployableObjectPart.
deployableObjectPart - the deployable object part of the application
WDURLException - if the URL couldn't be generatedpublic static String getStaticApplicationURL()
On SAP NetWeaver 7.0, this is "/webdynpro/dispatcher".
public static String getWorkloadBalancedApplicationURL(WDDeployableObjectPart deployableObjectPart)
throws WDURLException
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
deployableObjectPart - a deployable object part representing a Web Dynpro application
WDURLException - if the URL couldn't be generated
public static String getWorkloadBalancedApplicationURL(String deployableObjectName,
String applicationPartName)
throws WDURLException
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.
deployableObjectName - the name of a deployable objectapplicationPartName - the name of a application deployable object part
WDURLException - if the URL couldn't be generated
public static String getWorkloadBalancedApplicationURL(WDDeployableObjectPart deployableObjectPart,
Map urlParameters)
throws WDURLException
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.
deployableObjectPart - a deployable object part representing a Web Dynpro applicationurlParameters - key/value pairs added as URL parameters; all keys must be of type String and the value can be String or String[]
deployableObjectPart with appended URL parameters given by urlParameters
WDURLException - if the URL couldn't be generatedgetWorkloadBalancedApplicationURL(WDDeployableObjectPart)
public static String getWorkloadBalancedApplicationURL(String objectName,
String partName,
Map urlParameters)
throws WDURLException
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.
objectName - name of a deployable object that contains the applicationpartName - the name of a application deployable object parturlParameters - key/value pairs added as URL parameters; all keys must be of type String and the value can be String or String[]
urlParameters
WDURLException - if the URL couldn't be generatedgetWorkloadBalancedApplicationURL(String, String)public static String getSAPIconsResourcePath()
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)
public static String getSAPIconsWebResourcePath()
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.
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).
public static String getSAPIconWebResourcePath(String iconName)
On SAP NetWeaver 7.0, this is
../../../resources/sap.com/tc~wd~dispwda/global/sapIcons/(the relative URL to the SAP icon).
public static String getPortalIconsResourcePath()
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)
public static String getPortalIconsWebResourcePath()
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.
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).
public static String getPortalIconWebResourcePath(String iconName)
On SAP NetWeaver 7.0, this is
../../../resources/sap.com/tc~wd~dispwda/global/portalIcons/(the relative URL to the Portal icons).
public static boolean isSecureURL(String url)
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.
url - URL that should be checked
public static String getQueryString(Map<String,Object> urlParameters,
String encoding)
throws UnsupportedEncodingException
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.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.
UnsupportedEncodingException - if the encoding is not supported| Access Rights |
|---|
| 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]
|
-
|
BC-WD-JAV
|
[sap.com] WD-RUNTIME
|
[sap.com]
|
default
|
BC-WD-JAV
|
|
SAP NetWeaver 7.3 (SP 11) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||