|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LinkResolver
Resolve a link from a document to another document using it's
All of these parameters are optional and default to the attributes of the document which contains the link.
Syntax (square brackets denote optional parts):
lenya-document:<uuid>[,lang=...][,area=...][,rev=...][,pub=...]
The fallback mode determines the behaviour if the target language is omitted
and the target document doesn't exist in the language of the source document.
The default fallback mode is MODE_DEFAULT_LANGUAGE
.
Field Summary | |
---|---|
static int |
MODE_DEFAULT_LANGUAGE
Try to fall back to the default language. |
static int |
MODE_FAIL
Fail if the target document doesn't exist in the source language. |
static java.lang.String |
ROLE
The Avalon role. |
static java.lang.String |
SCHEME
The link URI scheme. |
Method Summary | |
---|---|
int |
getFallbackMode()
|
LinkTarget |
resolve(org.apache.lenya.cms.publication.DocumentFactory factory,
java.lang.String linkUri)
Resolve a link. |
LinkTarget |
resolve(org.apache.lenya.cms.publication.Document currentDocument,
java.lang.String linkUri)
Resolve a link. |
void |
setFallbackMode(int mode)
Sets the fallback mode. |
Field Detail |
---|
static final java.lang.String ROLE
static final java.lang.String SCHEME
static final int MODE_FAIL
static final int MODE_DEFAULT_LANGUAGE
Method Detail |
---|
void setFallbackMode(int mode)
mode
- one of MODE_FAIL
and MODE_DEFAULT_LANGUAGE
.int getFallbackMode()
LinkTarget resolve(org.apache.lenya.cms.publication.Document currentDocument, java.lang.String linkUri) throws java.net.MalformedURLException
currentDocument
- The document which contains the link.linkUri
- The link URI.
java.net.MalformedURLException
- if the URI is invalid.LinkTarget resolve(org.apache.lenya.cms.publication.DocumentFactory factory, java.lang.String linkUri) throws java.net.MalformedURLException
factory
- The document factory to use.linkUri
- The link URI.
java.net.MalformedURLException
- if the URI is invalid.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |