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

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

public class DefaultResourceIdentifierFactory
extends Object
implements ResourceIdentifierFactory

Generates resource identifiers that contain some of the actual state of the resource. That is, this does not generate database ID based resource identifiers, but rather identifiers like PageResourceIdentifier.

For id based identifiers, simply construct an instance of IdAndTypeResourceIdentifier.

The ConversionContext is used to determine whether or not a relative or absolute attachment container should be returned.


Constructor Summary
DefaultResourceIdentifierFactory()
           
 
Method Summary
 ResourceIdentifier getResourceIdentifier(Object resource, ConversionContext context)
          Creates a resource identifier for the specified resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultResourceIdentifierFactory

public DefaultResourceIdentifierFactory()
Method Detail

getResourceIdentifier

public ResourceIdentifier getResourceIdentifier(Object resource,
                                                ConversionContext context)
                                         throws ResourceIdentifierCreationException
Description copied from interface: ResourceIdentifierFactory
Creates a resource identifier for the specified resource.

Specified by:
getResourceIdentifier in interface ResourceIdentifierFactory
Parameters:
resource - the resource
context - The context to generate the resource identifier in
Returns:
the resource identifier (cannot be null)
Throws:
ResourceIdentifierCreationException - if there is an error creating the resource identifier


Copyright © 2003–2015 Atlassian. All rights reserved.