com.atlassian.confluence.content.render.xhtml.model.resource.identifiers
Class DefaultResourceIdentifierMatcher

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.model.resource.identifiers.DefaultResourceIdentifierMatcher
All Implemented Interfaces:
ResourceIdentifierMatcher

public class DefaultResourceIdentifierMatcher
extends java.lang.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


Constructor Summary
DefaultResourceIdentifierMatcher()
           
 
Method Summary
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.
 boolean matches(ContentEntityObject ceo, ResourceIdentifier ri)
           
protected  boolean matches(Draft draft, ResourceIdentifier ri)
           
protected  boolean matches(Page page, ResourceIdentifier ri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultResourceIdentifierMatcher

public DefaultResourceIdentifierMatcher()
Method Detail

matches

public boolean matches(ContentEntityObject ceo,
                       ResourceIdentifier ri)
Specified by:
matches in interface ResourceIdentifierMatcher
Parameters:
ceo - the entity to compare
ri - 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 -
  1. We do set a Comment as the render CEO but we don't support linking to them (yet) - no ResourceIdentifier.
  2. 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-2014 Atlassian. All Rights Reserved.