|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.link.LinkFactory
public class LinkFactory
Factory processing various input into the Link objects and back.
For parsing html and converting multiple link instances on the fly use LinkUtil
.
Field Summary | |
---|---|
static Pattern |
LINK_PATTERN
Pattern to find a link. |
static Pattern |
UUID_PATTERN
Pattern to find a magnolia formatted uuid link. |
Constructor Summary | |
---|---|
LinkFactory()
|
Method Summary | |
---|---|
static Link |
createLink(Content node)
Creates new link from the content node. |
static Link |
createLink(NodeData nodeData)
Creates new link from the node data. |
static Link |
createLink(String repository,
String uuid)
Creates link to the content denoted by repository and uuid. |
static Link |
createLink(String repository,
String path,
String extension,
String anchor,
String parameters)
Creates link to the content identified by the repository and path. |
static Link |
createLink(String uuid,
String repository,
String fallbackHandle,
String nodeDataName,
String extension,
String anchor,
String parameters)
Creates link based on provided parameters. |
static Link |
parseLink(String link)
Parses provided URI to the link. |
static Link |
parseUUIDLink(String uuidLink)
Parses UUID link pattern string and converts it into a Link object. |
static String |
toPattern(Link link)
Converts provided Link to an UUID link pattern. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Pattern UUID_PATTERN
public static final Pattern LINK_PATTERN
Constructor Detail |
---|
public LinkFactory()
Method Detail |
---|
public static Link createLink(Content node)
node
- Target content for the link.
public static Link createLink(NodeData nodeData) throws LinkException
nodeData
- Target node data for the link.
LinkException
public static Link createLink(String repository, String uuid) throws LinkException
repository
- Parent repository of the content of interest.uuid
- UUID of the content to create link to.
LinkException
public static Link createLink(String repository, String path, String extension, String anchor, String parameters) throws LinkException
repository
- Source repository for the content.path
- Path to the content of interest.extension
- Optional extension to be used in the linkanchor
- Optional link anchor.parameters
- Optional link parameters.
LinkException
public static Link createLink(String uuid, String repository, String fallbackHandle, String nodeDataName, String extension, String anchor, String parameters) throws LinkException
Link
object,
pointing to the non existing uuid so that broken link detection tools can find it.
uuid
- UUID of the contentrepository
- Content repository name.fallbackHandle
- Optional fallback content handle.nodeDataName
- Content node data name for binary data.extension
- Optional link extension.anchor
- Optional link anchor.parameters
- Optional link parameters.
LinkException
public static Link parseUUIDLink(String uuidLink) throws LinkException
uuidLink
- String containing reference to content as a UUID link pattern.
LinkException
public static Link parseLink(String link) throws LinkException
link
- URI representing path to piece of content
LinkException
public static String toPattern(Link link)
link
- Link to convert.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |