|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.cms.dispatcher.AbstractItemResolver
com.arsdigita.cms.dispatcher.MultilingualItemResolver
com.arsdigita.cms.dispatcher.CategoryItemResolverImpl
Resolves items to URLs and URLs to items with category-based URLs for multiple language variants. Created Mon Jan 20 14:30:03 2003.
Nested Class Summary | |
protected class |
CategoryItemResolverImpl.CategoryTemplateResolver
|
Field Summary | |
static String |
CATEGORIES_PREFIX
|
Fields inherited from class com.arsdigita.cms.dispatcher.MultilingualItemResolver |
ITEM_ID, SEPARATOR, versionId |
Fields inherited from class com.arsdigita.cms.dispatcher.AbstractItemResolver |
TEMPLATE_CONTEXT_PREFIX |
Fields inherited from interface com.arsdigita.cms.dispatcher.ItemResolver |
versionId |
Fields inherited from interface com.arsdigita.cms.dispatcher.TemplateResolver |
versionId |
Constructor Summary | |
CategoryItemResolverImpl()
|
Method Summary | |
String |
generateItemURL(com.arsdigita.bebop.PageState state,
BigDecimal itemId,
String name,
ContentSection section,
String context)
Generates a URL for a content item. |
String |
generateItemURL(com.arsdigita.bebop.PageState state,
BigDecimal itemId,
String name,
ContentSection section,
String context,
com.arsdigita.categorization.Category category)
Generates a URL for a content item. |
String |
generateItemURL(com.arsdigita.bebop.PageState state,
BigDecimal itemId,
String name,
ContentSection section,
String context,
String templateContext)
Generates a URL for a content item. |
String |
generateItemURL(com.arsdigita.bebop.PageState state,
BigDecimal itemId,
String name,
ContentSection section,
String context,
String templateContext,
com.arsdigita.categorization.Category category)
Generates a URL for a content item. |
String |
generateItemURL(com.arsdigita.bebop.PageState state,
ContentItem item,
ContentSection section,
String context)
Generates a URL for a content item. |
String |
generateItemURL(com.arsdigita.bebop.PageState state,
ContentItem item,
ContentSection section,
String context,
com.arsdigita.categorization.Category category)
Generates a URL for a content item. |
String |
generateItemURL(com.arsdigita.bebop.PageState state,
ContentItem item,
ContentSection section,
String context,
String templateContext)
Generates a URL for a content item. |
String |
generateItemURL(com.arsdigita.bebop.PageState state,
ContentItem item,
ContentSection section,
String context,
String templateContext,
com.arsdigita.categorization.Category category)
Generates a URL for a content item. |
protected String |
generateLiveURL(ContentSection section,
ContentItem item,
String templateContext,
com.arsdigita.categorization.Category category)
Generate a language-independent URL to the item in the given section. |
protected String |
generatePreviewURL(ContentSection section,
ContentItem item,
String templateContext,
com.arsdigita.categorization.Category category)
Generate a URL which can be used to preview the item , using the given
templateContext . |
com.arsdigita.categorization.Category |
getCategory(javax.servlet.http.HttpServletRequest request)
Gets the category for the current request (if set by getItem(section, url, context) |
com.arsdigita.categorization.Category[] |
getCategoryPath(javax.servlet.http.HttpServletRequest request)
Gets the category path for the current request (if set by getItem(section, url, context) |
ContentItem |
getItem(ContentSection section,
String url,
String context)
Returns a content item based on section, url, and use context. |
String |
getTemplate(ContentSection section,
ContentItem item,
javax.servlet.http.HttpServletRequest request)
Returns the JSP template filename relative to the webapp root. |
String |
getTemplateContext(javax.servlet.http.HttpServletRequest request)
Gets the template context from the request. |
String |
getTemplatePath(Template template)
Returns the JSP template filename relative to the webapp root for a given Template reference. |
String |
getTemplateXSLPath(Template template)
Returns the XSL template filename relative to the webapp root for a given Template reference. |
boolean |
isIndexRequest(javax.servlet.http.HttpServletRequest request)
Whether the current request is an index item request (i.e. |
void |
setTemplateContext(String sTemplateContext,
javax.servlet.http.HttpServletRequest request)
Sets the TemplateContext parameter in the request |
Methods inherited from class com.arsdigita.cms.dispatcher.MultilingualItemResolver |
generateDraftURL, generateLiveURL, generatePreviewURL, getCurrentContext, getItemFromDraftURL, getItemFromLangAndBundle, getItemFromLiveURL, getMasterPage, getNameAndLangFromURLFrag |
Methods inherited from class com.arsdigita.cms.dispatcher.AbstractItemResolver |
getTemplateFromURL, stripTemplateFromURL |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.arsdigita.cms.dispatcher.ItemResolver |
getCurrentContext, getMasterPage, getTemplateFromURL, stripTemplateFromURL |
Field Detail |
public static final String CATEGORIES_PREFIX
Constructor Detail |
public CategoryItemResolverImpl()
Method Detail |
public com.arsdigita.categorization.Category getCategory(javax.servlet.http.HttpServletRequest request)
getCategory
in interface CategoryItemResolver
request
- The current request
public com.arsdigita.categorization.Category[] getCategoryPath(javax.servlet.http.HttpServletRequest request)
getCategoryPath
in interface CategoryItemResolver
request
- The current request
public boolean isIndexRequest(javax.servlet.http.HttpServletRequest request)
isIndexRequest
in interface CategoryItemResolver
request
- The current request
public ContentItem getItem(ContentSection section, String url, String context)
getItem
in interface ItemResolver
getItem
in class MultilingualItemResolver
section
- The current content sectionurl
- The section-relative URLcontext
- The use context,
e.g. ContentItem.LIVE
,
CMSDispatcher.PREVIEW
or
ContentItem.DRAFT
. See MultilingualItemResolver.getCurrentContext(com.arsdigita.bebop.PageState)
.
public String generateItemURL(com.arsdigita.bebop.PageState state, BigDecimal itemId, String name, ContentSection section, String context, com.arsdigita.categorization.Category category)
generateItemURL
in interface CategoryItemResolver
itemId
- The item IDname
- The name of the content pagestate
- The page statesection
- the content section to which the item belongscontext
- the context of the URL, such as "live" or "admin"category
- the Category to use as the context for
generating the URL
MultilingualItemResolver.getCurrentContext(com.arsdigita.bebop.PageState)
public String generateItemURL(com.arsdigita.bebop.PageState state, BigDecimal itemId, String name, ContentSection section, String context, String templateContext, com.arsdigita.categorization.Category category)
generateItemURL
in interface CategoryItemResolver
itemId
- The item IDname
- The name of the content pagestate
- The page statesection
- the content section to which the item belongscontext
- the context of the URL, such as "live" or "admin"templateContext
- the context for the URL, such as "public"category
- the Category to use as the context for
MultilingualItemResolver.getCurrentContext(com.arsdigita.bebop.PageState)
public String generateItemURL(com.arsdigita.bebop.PageState state, ContentItem item, ContentSection section, String context, com.arsdigita.categorization.Category category)
generateItemURL
in interface CategoryItemResolver
item
- The itemstate
- The page statesection
- the content section to which the item belongscontext
- the context of the URL, such as "live" or "admin"category
- the Category to use as the context for
MultilingualItemResolver.getCurrentContext(com.arsdigita.bebop.PageState)
public String generateItemURL(com.arsdigita.bebop.PageState state, ContentItem item, ContentSection section, String context, String templateContext, com.arsdigita.categorization.Category category)
generateItemURL
in interface CategoryItemResolver
item
- The itemstate
- The page statesection
- the content section to which the item belongscontext
- the context of the URL, such as "live" or "admin"templateContext
- the context for the URL, such as "public"category
- the Category to use as the context for
MultilingualItemResolver.getCurrentContext(com.arsdigita.bebop.PageState)
public String generateItemURL(com.arsdigita.bebop.PageState state, BigDecimal itemId, String name, ContentSection section, String context)
generateItemURL
in interface ItemResolver
generateItemURL
in class MultilingualItemResolver
itemId
- The item IDname
- The name of the content pagestate
- The page statesection
- the content section to which the item belongscontext
- the context of the URL, such as "live" or
"admin"
MultilingualItemResolver.getCurrentContext(com.arsdigita.bebop.PageState)
public String generateItemURL(com.arsdigita.bebop.PageState state, BigDecimal itemId, String name, ContentSection section, String context, String templateContext)
generateItemURL
in interface ItemResolver
generateItemURL
in class MultilingualItemResolver
itemId
- The item IDname
- The name of the content pagestate
- The page statesection
- the content section to which the item belongscontext
- the context of the URL, such as "live" or
"admin"templateContext
- the context for the URL, such as
"public"
MultilingualItemResolver.getCurrentContext(com.arsdigita.bebop.PageState)
public String generateItemURL(com.arsdigita.bebop.PageState state, ContentItem item, ContentSection section, String context)
generateItemURL
in interface ItemResolver
generateItemURL
in class MultilingualItemResolver
item
- The itemstate
- The page statesection
- the content section to which the item belongscontext
- the context of the URL, such as "live" or
"admin"
MultilingualItemResolver.getCurrentContext(com.arsdigita.bebop.PageState)
public String generateItemURL(com.arsdigita.bebop.PageState state, ContentItem item, ContentSection section, String context, String templateContext)
generateItemURL
in interface ItemResolver
generateItemURL
in class MultilingualItemResolver
item
- The itemstate
- The page statesection
- the content section to which the item belongscontext
- the context of the URL, such as "live" or
"admin"templateContext
- the context for the URL, such as
"public"
MultilingualItemResolver.getCurrentContext(com.arsdigita.bebop.PageState)
protected String generateLiveURL(ContentSection section, ContentItem item, String templateContext, com.arsdigita.categorization.Category category)
item
in the given section.When a client retrieves this URL, the URL is resolved to point to a specific language instance of the item referenced here, i.e. this URL will be resolved to a language-specific URL internally.
section
- the ContentSection
that contains this itemitem
- ContentItem
for which a URL should be
constructed.templateContext
- template context; will be ignored if null
category
- the Category to use for URL generation
item
in the given section
, which will
be presented within the given templateContext
protected String generatePreviewURL(ContentSection section, ContentItem item, String templateContext, com.arsdigita.categorization.Category category)
item
, using the given
templateContext
.Only a specific language instance can be previewed, meaning there no language negotiation is involved when a request is made to a URL that has been generated by this method.
section
- The ContentSection
which contains
the item
item
- The ContentItem
for which a URL should
be generated.templateContext
- the context that determines which
template should render the item when it is previewed; ignored
if the argument given here is null
category
- the Category to use for URL generation
item
public String getTemplate(ContentSection section, ContentItem item, javax.servlet.http.HttpServletRequest request)
TemplateResolver
getTemplate
in interface TemplateResolver
section
- The ContentSection for the requestitem
- The ContentItem for the requestrequest
- The current HttpServletRequest
public String getTemplateXSLPath(Template template)
TemplateResolver
getTemplateXSLPath
in interface TemplateResolver
template
- The Template to resolve the URL for.
public String getTemplatePath(Template template)
TemplateResolver
getTemplatePath
in interface TemplateResolver
template
- The Template to resolve the URL for.
public void setTemplateContext(String sTemplateContext, javax.servlet.http.HttpServletRequest request)
TemplateResolver
setTemplateContext
in interface TemplateResolver
sTemplateContext
- the template context to setrequest
- the request in which to set the template contextpublic String getTemplateContext(javax.servlet.http.HttpServletRequest request)
TemplateResolver
getTemplateContext
in interface TemplateResolver
request
- the request from which to get the template context
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |