|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.portal.url.URLManager
public class URLManager
IURLManager
implementation.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface lumis.portal.url.IURLManager |
---|
IURLManager.CreateStrategy |
Field Summary |
---|
Fields inherited from interface lumis.portal.url.IURLManager |
---|
FRIENDLY_URL_ENABLE_PROPERTY_NAME, FRIENDLY_URL_PATTERN_PROPERTY_NAME, URL_RESOLVER_PROPERTY_NAME, WEBSITE_PROPERTY_NAME |
Constructor Summary | |
---|---|
URLManager()
|
Method Summary | |
---|---|
void |
clearPageCacheReference(WebResource webResource)
Clears the page cache reference in a web resource. |
String |
convertHTMLPathsToDynamicPaths(String html)
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 |
processHTMLDynamicPathReferences(String html)
Processes references to dynamic paths in a given HTML code. |
String |
processHTMLDynamicPathReferences(String htmlContent,
Locale locale,
boolean convertGuestOnlyCaches)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public URLManager()
Method Detail |
---|
public WebResource getWebResourceByDynamicPath(String dynamicPath, IURLManager.CreateStrategy createStrategy) throws PortalException
IURLManager
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.
getWebResourceByDynamicPath
in interface IURLManager
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
.
PortalException
public WebResource getWebResourceByDynamicPath(String dynamicPath, IURLManager.CreateStrategy createStrategy, Locale locale) throws PortalException
IURLManager
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.
getWebResourceByDynamicPath
in interface IURLManager
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
.
PortalException
public String convertHTMLPathsToDynamicPaths(String html) throws PortalException
IURLManager
convertHTMLPathsToDynamicPaths
in interface IURLManager
PortalException
public String processHTMLDynamicPathReferences(String html) throws PortalException
IURLManager
processHTMLDynamicPathReferences
in interface IURLManager
html
- the HTML code.
PortalException
public String processHTMLDynamicPathReferences(String htmlContent, Locale locale, boolean convertGuestOnlyCaches) throws PortalException
IURLManager
processHTMLDynamicPathReferences
in interface IURLManager
locale
- the locale.convertGuestOnlyCaches
- if true, pages with cache enabled only for
guest will also have their dynamic paths converted.
PortalException
public void setWebResourcesMissingData(IWebResourceFactory webResourceFactory, Collection<WebResource> webResources, boolean cacheEnabled, boolean friendlyURLEnabled) throws PortalException
IURLManager
setWebResourcesMissingData
in interface IURLManager
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
public String fixReferencesAccordingToPath(String html, String path) throws PortalException
IURLManager
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.
fixReferencesAccordingToPath
in interface IURLManager
html
- the HTML content to be fixed.path
- the path.
PortalException
public void clearPageCacheReference(WebResource webResource)
webResource
- the web resource.WebResource.pageCache
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |