Class DefaultResourceIdentifierMatcher
java.lang.Object
com.atlassian.confluence.content.render.xhtml.model.resource.identifiers.DefaultResourceIdentifierMatcher
- All Implemented Interfaces:
ResourceIdentifierMatcher
Match a ContentEntityObject against the supplied ResourceIdentifier. Note that the
ResourceIdentifier may be partially populated, following the rules of the respective
ResourceIdentifierResolver implementations.
This implementation only supports the CEO and RI's that are legitimate render context CEOs. Any other CEO to RI matches will return false. This implementation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches(ContentEntityObject ceo, ResourceIdentifier ri) protected booleanmatches(BlogPost blog, ResourceIdentifier ri) protected booleanmatches(Comment comment, ResourceIdentifier ri) Remembering that this implementation is intended for use in rendering then a Comment is said to match the ResourceIdentifier if the parent of the Comment matches the ResourceIdentifier.protected booleanmatches(Draft draft, ResourceIdentifier ri) protected booleanmatches(Page page, ResourceIdentifier ri)
-
Constructor Details
-
DefaultResourceIdentifierMatcher
public DefaultResourceIdentifierMatcher()
-
-
Method Details
-
matches
- Specified by:
matchesin interfaceResourceIdentifierMatcher- Parameters:
ceo- the entity to compareri- the resource identifier to compare- Returns:
- true if the supplied ResourceIdentifier matches.
-
matches
-
matches
-
matches
-
matches
Remembering that this implementation is intended for use in rendering then a Comment is said to match the ResourceIdentifier if the parent of the Comment matches the ResourceIdentifier. This is because -- We do set a Comment as the render CEO but we don't support linking to them (yet) - no ResourceIdentifier.
- We don't add attachments to comments, we add them to the parent.
- Parameters:
comment-ri-- Returns:
- true if the parent of the comment matches the ResourceIdentifier
-