Class DefaultResourceIdentifierMatcher
- java.lang.Object
-
- com.atlassian.confluence.content.render.xhtml.model.resource.identifiers.DefaultResourceIdentifierMatcher
-
- All Implemented Interfaces:
ResourceIdentifierMatcher
public class DefaultResourceIdentifierMatcher extends Object implements ResourceIdentifierMatcher
Match a ContentEntityObject against the supplied ResourceIdentifier. Note that the ResourceIdentifier may be partially populated, following the rules of the respectiveResourceIdentifierResolver
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 Constructor Description DefaultResourceIdentifierMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(ContentEntityObject ceo, ResourceIdentifier ri)
protected boolean
matches(BlogPost blog, ResourceIdentifier ri)
protected boolean
matches(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 boolean
matches(Draft draft, ResourceIdentifier ri)
protected boolean
matches(Page page, ResourceIdentifier ri)
-
-
-
Method Detail
-
matches
public boolean matches(ContentEntityObject ceo, ResourceIdentifier ri)
- Specified by:
matches
in interfaceResourceIdentifierMatcher
- Parameters:
ceo
- the entity to compareri
- the resource identifier to compare- Returns:
- true if the supplied ResourceIdentifier matches.
-
matches
protected boolean matches(Page page, ResourceIdentifier ri)
-
matches
protected boolean matches(BlogPost blog, ResourceIdentifier ri)
-
matches
protected boolean matches(Draft draft, ResourceIdentifier ri)
-
matches
protected boolean matches(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. 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
-
-