org.xwiki.model.internal.reference
Class DefaultStringAttachmentReferenceResolver

java.lang.Object
  extended by org.xwiki.model.internal.reference.DefaultStringAttachmentReferenceResolver
All Implemented Interfaces:
AttachmentReferenceResolver<java.lang.String>

@Component
public class DefaultStringAttachmentReferenceResolver
extends java.lang.Object
implements AttachmentReferenceResolver<java.lang.String>

Specialized version of EntityReferenceResolver which can be considered a helper component to resolve AttachmentReference objects from their string representation. This implementation uses fixed default values when parts of the Reference are missing in the string representation. Default values are retrieved from the ModelConfiguration class.

Since:
2.2M1
Version:
$Id$

Constructor Summary
DefaultStringAttachmentReferenceResolver()
           
 
Method Summary
 AttachmentReference resolve(java.lang.String attachmentReferenceRepresentation, java.lang.Object... parameters)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultStringAttachmentReferenceResolver

public DefaultStringAttachmentReferenceResolver()
Method Detail

resolve

public AttachmentReference resolve(java.lang.String attachmentReferenceRepresentation,
                                   java.lang.Object... parameters)

Specified by:
resolve in interface AttachmentReferenceResolver<java.lang.String>
Parameters:
attachmentReferenceRepresentation - the representation of an attachment reference (eg as a String)
parameters - optional parameters. Their meaning depends on the resolver implementation
Returns:
the valid resolved attachment reference as an Object
See Also:
AttachmentReferenceResolver.resolve(T, java.lang.Object...)


Copyright © 2004-2011 XWiki. All Rights Reserved.