|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IURLManager
Provides URL resolution and mapping management.
Nested Class Summary | |
---|---|
static class |
IURLManager.CreateStrategy
Contains creation strategy options. |
Field Summary | |
---|---|
static String |
EXTENSION_HTML_PROPERTY_NAME
Property used to indicate the extension to be used for HTML web resources. |
static String |
EXTENSION_SHTML_PROPERTY_NAME
Property used to indicate the extension to be used for SHTML web resources. |
static String |
FORCE_FIRST_PAGE_LINK_TO_CHANNEL_LINK_PROPERTY_NAME
Property used to indicate that links to the first page of a channel should link to the channel web resource instead. |
static String |
FRIENDLY_URL_ENABLE_PROPERTY_NAME
The name of the property that indicates where friendly URL is enabled. |
static String |
FRIENDLY_URL_PATTERN_PROPERTY_NAME
The name of a default property that contains a pattern for the IURLResolver. |
static String |
URL_RESOLVER_PROPERTY_NAME
The name of the property where the class name of the IURLResolver
implementation is stored. |
static String |
WEBSITE_PROPERTY_NAME
|
Method Summary | |
---|---|
String |
convertHTMLPathsToDynamicPaths(String html)
Deprecated. Since 6.2.0, replaced by convertHTMLPathsToDynamicPaths(String, IWebsite)
due to the inclusion of multiple websites feature.
For best compatibility, this method resolves based on the
default website's main non-secure URL. If there is no default website,
it will throw an |
String |
convertHTMLPathsToDynamicPaths(String html,
IWebsite baseWebsite)
Replaces, in an HTML code, paths to web resources by the corresponding dynamic path. |
String |
fixReferencesAccordingToPath(String html,
String path)
Fixes references within an HTML according to the given path. |
WebResource |
getWebResourceByDynamicPath(String dynamicPath,
IURLManager.CreateStrategy createStrategy)
Returns a web resource for the given dynamic path. |
WebResource |
getWebResourceByDynamicPath(String dynamicPath,
IURLManager.CreateStrategy createStrategy,
Locale locale)
Returns a web resource for the given dynamic path. |
String |
getWebResourcePathByDynamicPath(String dynamicPath,
Locale locale)
Deprecated. Since 6.2.0, due to inclusion of website feature, the web resource path is not unique, so this method is no longer appropriated for its original purpose of adjusting links URIs. Consider using getWebResourceURI(String, Locale, IWebsite, boolean) instead. |
URI |
getWebResourceURI(String dynamicPath,
Locale locale,
IWebsite baseWebsite,
boolean baseSecure)
Returns the URI for referencing a web resource given its dynamic path. |
String |
processHTMLDynamicPathReferences(String html)
Deprecated. Since 6.2.0, replaced by processHTMLDynamicPathReferences(String, Locale, IWebsite, boolean)
due to the inclusion of multiple websites feature.
For best compatibility, this method resolves based on the
default website's main non-secure URL. If there is no default website,
it will throw an |
String |
processHTMLDynamicPathReferences(String htmlModifiedContent,
Locale locale,
boolean convertGuestOnlyCaches)
Deprecated. Since 6.2.0, replaced by processHTMLDynamicPathReferences(String, Locale, IWebsite, boolean)
due to the inclusion of multiple websites feature.
For best compatibility, this method resolves based on the
default website's main non-secure URL. If there is no default website,
it will throw an
|
String |
processHTMLDynamicPathReferences(String htmlContent,
Locale locale,
IWebsite baseWebsite,
boolean baseSecure)
Processes references to dynamic paths in a given HTML code. |
void |
setWebResourcesMissingData(IWebResourceFactory webResourceFactory,
Collection<WebResource> webResources,
boolean cacheEnabled,
boolean friendlyURLEnabled)
Sets missing data in the given web resources. |
Field Detail |
---|
static final String URL_RESOLVER_PROPERTY_NAME
IURLResolver
implementation is stored.
static final String WEBSITE_PROPERTY_NAME
static final String FRIENDLY_URL_ENABLE_PROPERTY_NAME
static final String FRIENDLY_URL_PATTERN_PROPERTY_NAME
static final String FORCE_FIRST_PAGE_LINK_TO_CHANNEL_LINK_PROPERTY_NAME
false
.
#convertFirstPagePathToChannelPath(String)
,
Constant Field Valuesstatic final String EXTENSION_HTML_PROPERTY_NAME
htmlGeneration/htmlFileExtension
specified in
lumisportalconfig.xml
.
EXTENSION_SHTML_PROPERTY_NAME
,
Constant Field Valuesstatic final String EXTENSION_SHTML_PROPERTY_NAME
htmlGeneration/shtmlFileExtension
specified
in lumisportalconfig.xml
.
EXTENSION_HTML_PROPERTY_NAME
,
Constant Field ValuesMethod Detail |
---|
@Deprecated String getWebResourcePathByDynamicPath(String dynamicPath, Locale locale) throws PortalException
getWebResourceURI(String, Locale, IWebsite, boolean)
instead.
AUTO
strategy for getting
the web resource.
The returned path may be a variant from the real web resource path, according to the dynamicPath parameters and other configurations.
dynamicPath
- the dynamic path.locale
- the the web resource locale.
PortalException
URI getWebResourceURI(String dynamicPath, Locale locale, IWebsite baseWebsite, boolean baseSecure) throws PortalException
The returned URI may be relative to the specified base website, or absolute if it is not possible to create such relative URI.
dynamicPath
- the web resource's dynamic path.locale
- the web resource's locale.baseWebsite
- the website the URI is relative to (in case it is
generated as relative). May be null
if the base website is unknown.
If not specified, the returned URI will be absolute.baseSecure
- true
if the base URL for the returned URI is
secure, false
otherwise. If the web resource requires a different
secure level (HTTP or HTTPS), the URI will have to be absolute.
PortalException
WebResource getWebResourceByDynamicPath(String dynamicPath, IURLManager.CreateStrategy createStrategy) throws PortalException
If the corresponding web resource already exists in the persistence, that
instance is returned. Otherwise, createStrategy
defines the
behavior:
PortalObjectNotFoundException
.This method uses its own transactions.
dynamicPath
- the dynamic path.createStrategy
- the strategy used if no web resource exists in
persistence for the given dynamic path.
PortalObjectNotFoundException
- if no web resource for the given
dynamic path exists, and createStrategy
is
NEVER
.
IllegalArgumentException
- if the specified dynamic path could not
be resolved into a web resource.
PortalException
WebResource getWebResourceByDynamicPath(String dynamicPath, IURLManager.CreateStrategy createStrategy, Locale locale) throws PortalException
If the corresponding web resource already exists in the persistence, that
instance is returned. Otherwise, createStrategy
defines the
behavior:
PortalObjectNotFoundException
.This method uses its own transactions.
dynamicPath
- the dynamic path.createStrategy
- the strategy used if no web resource exists in
persistence for the given dynamic path.locale
- the web resource's locale.
PortalObjectNotFoundException
- if no web resource for the given
dynamic path exists, and createStrategy
is
NEVER
.
IllegalArgumentException
- if the specified dynamic path could not
be resolved into a web resource.
PortalException
@Deprecated String processHTMLDynamicPathReferences(String html) throws PortalException
processHTMLDynamicPathReferences(String, Locale, IWebsite, boolean)
due to the inclusion of multiple websites feature.
For best compatibility, this method resolves based on the
default website's main non-secure URL. If there is no default website,
it will throw an IllegalStateException
.
html
- the HTML code.
PortalException
@Deprecated String convertHTMLPathsToDynamicPaths(String html) throws PortalException
convertHTMLPathsToDynamicPaths(String, IWebsite)
due to the inclusion of multiple websites feature.
For best compatibility, this method resolves based on the
default website's main non-secure URL. If there is no default website,
it will throw an IllegalStateException
.
htmlContent
- the HTML code.
PortalException
String convertHTMLPathsToDynamicPaths(String html, IWebsite baseWebsite) throws PortalException
htmlContent
- the HTML code.baseWebsite
- the website the HTML belongs to.
PortalException
@Deprecated String processHTMLDynamicPathReferences(String htmlModifiedContent, Locale locale, boolean convertGuestOnlyCaches) throws PortalException
processHTMLDynamicPathReferences(String, Locale, IWebsite, boolean)
due to the inclusion of multiple websites feature.
For best compatibility, this method resolves based on the
default website's main non-secure URL. If there is no default website,
it will throw an IllegalStateException
.
convertGuestOnlyCaches
parameter is no longer supported and is ignored.
htmlContent
- the HTML code.locale
- the locale.convertGuestOnlyCaches
- if true, pages with cache enabled only for
guest will also have their dynamic paths converted.
PortalException
String processHTMLDynamicPathReferences(String htmlContent, Locale locale, IWebsite baseWebsite, boolean baseSecure) throws PortalException
htmlContent
- the HTML code.locale
- the locale.baseWebsite
- the website the HTML is relative to (in case it is
generated as relative). May be null
if the base website is unknown.
If not specified, the generated hrefs will be absolute.baseSecure
- true
if the base URL for the HTML is
secure, false
otherwise. If a href requires a different
secure level (HTTP or HTTPS), it will have to be absolute.
PortalException
void setWebResourcesMissingData(IWebResourceFactory webResourceFactory, Collection<WebResource> webResources, boolean cacheEnabled, boolean friendlyURLEnabled) throws PortalException
webResourceFactory
- the web resource factory of the given web resources.webResources
- the web resources.cacheEnabled
- indicates that cache is enabled.friendlyURLEnabled
- indicates that friendly URL is enabled.
PortalException
String fixReferencesAccordingToPath(String html, String path) throws PortalException
The HTML passed in to this method should be appropriate for the context root of the solution. This method changes path references in the HTML such that the references are relative to the specified path. The path must begin with the "/" character and be relative to the web application root.
html
- the HTML content to be fixed.path
- the path.
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |