com.atlassian.confluence.content.render.xhtml.model.resource.identifiers
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 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultResourceIdentifierMatcher
public DefaultResourceIdentifierMatcher()
matches
public boolean matches(ContentEntityObject ceo,
ResourceIdentifier ri)
- Specified by:
matches
in interface ResourceIdentifierMatcher
- 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
Copyright © 2003-2012 Atlassian. All Rights Reserved.