|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.endeca.infront.cartridge.model.LinkBuilder
public class LinkBuilder
A class that represents links as created by the LinkBuilder
editor in Experience Manager and transforms them into
Action objects.
FILE: MyHandler.java
public ContentItem process(SampleConfig config)
throws CartridgeHandlerException {
LinkBuilder link = config.getLink();
Action linkAction = null;
try {
linkAction= link.createAction(
navigationStateBuilder, mdexResource));
} catch (ContentException e) {
throw new CartridgeHandlerException(e);
}
config.setAction(linkAction);
return config;
}
| Nested Class Summary | |
|---|---|
static class |
LinkBuilder.LinkType
The types of links that the LinkBuilder supports. |
| Constructor Summary | |
|---|---|
LinkBuilder()
Default constructor. |
|
LinkBuilder(String path)
Constructs a LinkBuilder model with the specified path. |
|
LinkBuilder(String path,
LinkBuilder.LinkType linkType)
Constructs a LinkBuilder model with the specified path and link type. |
|
LinkBuilder(String path,
LinkBuilder.LinkType linkType,
String queryString)
Constructs a LinkBuilder model with the specified path, link type and queryString. |
|
| Method Summary | |
|---|---|
Action |
createAction(NavigationStateBuilder navigationStateBuilder,
ContentSource source,
ActionPathProvider pathProvider)
Returns an action created from the path, link type and query string of this LinkBuilder. |
LinkBuilder.LinkType |
getLinkType()
|
String |
getPath()
|
String |
getQueryString()
|
void |
setLinkType(LinkBuilder.LinkType linkType)
Sets the type of this link. |
void |
setPath(String path)
Sets the path of this Link. |
void |
setQueryString(String query)
Sets the query string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LinkBuilder()
public LinkBuilder(String path)
public LinkBuilder(String path,
LinkBuilder.LinkType linkType)
public LinkBuilder(String path,
LinkBuilder.LinkType linkType,
String queryString)
| Method Detail |
|---|
public String getPath()
public void setPath(String path)
Link.
path - the path of the URLpublic LinkBuilder.LinkType getLinkType()
public void setLinkType(LinkBuilder.LinkType linkType)
linkType - a link typeLinkBuilder.LinkTypepublic String getQueryString()
public void setQueryString(String query)
query - a query string
public Action createAction(NavigationStateBuilder navigationStateBuilder,
ContentSource source,
ActionPathProvider pathProvider)
throws ContentException
navigationStateBuilder - used to create the navigation state
for the actionsource - the content source to use for resolving content URIspathProvider - if specified, will be used to fill in the action
path components for links that have no path configured
ContentException - If the path was not specified and the
dimensions or record IDs are not valid.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||