public class CrossreferenceManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CROSSREFERENCE_LINK_PATTERN
pattern for links
|
| Constructor and Description |
|---|
CrossreferenceManager() |
| Modifier and Type | Method and Description |
|---|---|
Crossreference |
createCrossreference(String qualifier,
Item source,
Item target,
String linkId)
Creates a crossreference from the source Item to the target Item
|
Crossreference |
createCrossreference(String qualifier,
Item source,
Item target,
String attribute,
Language language,
String linkId)
Creates a crossreference from the source Item to the target Item
|
Crossreference |
getCrossreference(Item source,
Item target)
Returns the (first found) crossreference from the source Item to the target Item
|
Crossreference |
getCrossreference(String qualifier,
Item source,
Item target,
String attribute,
Language language)
Returns the (first found) crossreference from the source Item to the target Item
|
Crossreference |
getCrossreferenceById(CatalogVersion catver,
String linkId)
Returns crossreference with the given catalogversion and id.
|
Collection<Crossreference> |
getCrossreferences(Item source)
Returns all crossreferences from the source Item to any target Item
|
Collection<Crossreference> |
getCrossreferences(Item source,
Language language)
Returns all crossreferences from the source Item to any target Item
|
Collection<Crossreference> |
getCrossreferences(Item source,
String attribute)
Returns all crossreferences from the source Item to any target Item
|
Collection<Crossreference> |
getCrossreferences(Item source,
String attribute,
Language language)
Returns all crossreferences from the source Item to any target Item
|
Collection<Crossreference> |
getCrossreferences(String qualifier,
Item source)
Returns all crossreferences from the source Item to any target Item
|
Collection<Crossreference> |
getCrossreferences(String qualifier,
Item source,
Item target,
String attribute,
Language language)
Returns all crossreferences from the source Item to the target Item
|
Collection<Crossreference> |
getCrossreferences(String qualifier,
Item source,
String attribute,
Language language)
Returns all crossreferences from the source Item to any target Item
|
Collection<Crossreference> |
getCrossreferencesByTarget(Item target)
Returns all crossreferences from any source Item to the specified target Item
|
Collection<Crossreference> |
getCrossreferencesByTarget(String qualifier,
Item target)
Returns all crossreferences from any source Item to the specified target Item
|
Collection<Crossreference> |
getCrossreferencesForRemoving(Item item)
This method returns all Crossreferences where either the target of the Crossreference is the given item or the
source of the Crossreference.
|
static CrossreferenceManager |
getInstance() |
void |
setOrRemoveCrossreferences(SessionContext ctx,
Item source,
String attribute,
Language language,
String html)
Checks the given html text for new or removed crossreferences and updates the Crossreference object accordingly.
|
public static final String CROSSREFERENCE_LINK_PATTERN
public static CrossreferenceManager getInstance()
public Crossreference createCrossreference(String qualifier, Item source, Item target, String linkId)
qualifier - A qualifier for this crossreference (might be null)source - The source Itemtarget - The target ItemlinkId - Unique ID of the reference itempublic Crossreference createCrossreference(String qualifier, Item source, Item target, String attribute, Language language, String linkId)
qualifier - A qualifier for this crossreference (might be null)source - The source Itemtarget - The target Itemattribute - The (String)attribute's qualifier where the crossreference is contained in the source Itemlanguage - The language for which the crossreference is contained in the source Item's attributelinkId - Unique ID of the reference itempublic Crossreference getCrossreference(Item source, Item target) throws JaloInvalidParameterException
source - The source Itemtarget - The target ItemJaloInvalidParameterException - If parameters are not (correctly) specifiedpublic Crossreference getCrossreference(String qualifier, Item source, Item target, String attribute, Language language) throws JaloInvalidParameterException
qualifier - The qualifier of the crossreferencesource - The source Itemtarget - The target Itemattribute - The (String)attribute's qualifier where the crossreference is contained in the source Itemlanguage - The language for which the crossreference is contained in the source Item's attributeJaloInvalidParameterException - If parameters are not (correctly) specifiedpublic Collection<Crossreference> getCrossreferences(Item source)
source - The source ItemJaloInvalidParameterException - If parameters are not (correctly) specifiedpublic Collection<Crossreference> getCrossreferencesByTarget(Item target)
target - The target ItemJaloInvalidParameterException - If parameters are not (correctly) specifiedpublic Collection<Crossreference> getCrossreferences(String qualifier, Item source)
qualifier - The qualifier of the crossreferencessource - The source ItemJaloInvalidParameterException - If parameters are not (correctly) specifiedpublic Collection<Crossreference> getCrossreferencesByTarget(String qualifier, Item target)
qualifier - The qualifier of the crossreferencestarget - The target ItemJaloInvalidParameterException - If parameters are not (correctly) specifiedpublic Collection<Crossreference> getCrossreferences(Item source, Language language)
source - The source Itemlanguage - The language for which the crossreferences are contained in the source Item's attributeJaloInvalidParameterException - If parameters are not (correctly) specifiedpublic Collection<Crossreference> getCrossreferences(Item source, String attribute)
source - The source Itemattribute - The (String)attribute's qualifier where the crossreferences are contained in the source ItemJaloInvalidParameterException - If parameters are not (correctly) specifiedpublic Collection<Crossreference> getCrossreferences(Item source, String attribute, Language language)
source - The source Itemattribute - The (String)attribute's qualifier where the crossreferences are contained in the source Itemlanguage - The language for which the crossreferences are contained in the source Item's attributeJaloInvalidParameterException - If parameters are not (correctly) specifiedpublic Collection<Crossreference> getCrossreferences(String qualifier, Item source, String attribute, Language language)
qualifier - The qualifier of the crossreferencessource - The source Itemattribute - The (String)attribute's qualifier where the crossreferences are contained in the source Itemlanguage - The language for which the crossreferences are contained in the source Item's attributeJaloInvalidParameterException - If parameters are not (correctly) specifiedpublic Collection<Crossreference> getCrossreferences(String qualifier, Item source, Item target, String attribute, Language language) throws JaloInvalidParameterException
qualifier - The qualifier of the crossreferencessource - The source Itemtarget - The target Itemattribute - The (String)attribute's qualifier where the crossreferences are contained in the source Itemlanguage - The language for which the crossreferences are contained in the source Item's attributeJaloInvalidParameterException - If parameters are not (correctly) specifiedpublic Crossreference getCrossreferenceById(CatalogVersion catver, String linkId)
catver - catalog version (optional)linkId - unique id of the crossreferencepublic void setOrRemoveCrossreferences(SessionContext ctx, Item source, String attribute, Language language, String html)
ctx - session contexthtml - The html text to be modified.source - attribute - language - public Collection<Crossreference> getCrossreferencesForRemoving(Item item)
item - Copyright © 2017 SAP SE. All Rights Reserved.