public class DefaultResourceIdentifierContextUtility extends Object implements ResourceIdentifierContextUtility
Constructor and Description |
---|
DefaultResourceIdentifierContextUtility(ResourceIdentifierFactory riFactory,
ResourceIdentifierMatcher matcher) |
Modifier and Type | Method and Description |
---|---|
ResourceIdentifier |
convertToAbsolute(ResourceIdentifier ri,
ContentEntityObject ceo)
Create and return a fully populated version of the supplied ResourceIdentifier with
any missing attributes derived from the supplied context ContentEntityObject.
|
ResourceIdentifier |
convertToRelative(ResourceIdentifier ri,
ContentEntityObject ceo)
Make the provided ResourceIdentifier as relative as possible to the provided ContentEntityObject.
|
ResourceIdentifier |
createAbsoluteResourceIdentifier(ContentEntityObject ceo)
Create a fully populated (absolute) ResourceIdentifier from the supplied ContentEntityObject.
|
ResourceIdentifier |
innerConvertToRelative(ResourceIdentifier ri,
ContentEntityObject ceo) |
public DefaultResourceIdentifierContextUtility(ResourceIdentifierFactory riFactory, ResourceIdentifierMatcher matcher)
public ResourceIdentifier createAbsoluteResourceIdentifier(ContentEntityObject ceo)
ResourceIdentifierContextUtility
ResourceIdentifierFactory
in that it is intended for use in the
context of a conversion and therefore understandings relevant details such as that when
converting a Comment
the relevant ResourceIdentifier is that of the Comment's owner.createAbsoluteResourceIdentifier
in interface ResourceIdentifierContextUtility
ceo
- The ContentEntityObject to get a conversion suitable ResourceIdentifier for.public ResourceIdentifier convertToAbsolute(ResourceIdentifier ri, ContentEntityObject ceo)
ResourceIdentifierContextUtility
convertToAbsolute
in interface ResourceIdentifierContextUtility
ri
- the ResourceIdentifier to be expanded. If it is null then a new resource identifier
will be returned based on the type of the supplied ContentEntityObject.ceo
- the ContentEntityObject to be used as context. If this is null then the ResourceIdentifier
will be returned unchanged.public ResourceIdentifier convertToRelative(ResourceIdentifier ri, ContentEntityObject ceo)
ResourceIdentifierContextUtility
convertToRelative
in interface ResourceIdentifierContextUtility
ri
- The ResourceIdentifier to make relativeceo
- the ContentEntityObject to be used as context. If this is null then the ResourceIdentifier
will be returned unchanged.public ResourceIdentifier innerConvertToRelative(ResourceIdentifier ri, ContentEntityObject ceo)
Copyright © 2003–2015 Atlassian. All rights reserved.