org.xwiki.rendering.internal.parser.reference
Class InterWikiResourceReferenceTypeParser

java.lang.Object
  extended by org.xwiki.rendering.internal.parser.reference.AbstractURIResourceReferenceTypeParser
      extended by org.xwiki.rendering.internal.parser.reference.InterWikiResourceReferenceTypeParser
All Implemented Interfaces:
ResourceReferenceTypeParser

@Component
@Named(value="interwiki")
@Singleton
public class InterWikiResourceReferenceTypeParser
extends AbstractURIResourceReferenceTypeParser

Parses a resource reference to a document in another wiki (interwiki).

Since:
2.5RC1
Version:
$Id$

Field Summary
static java.lang.String INTERWIKI_ALIAS_SEPARATOR
          Separator between the interwiki alias and the interwiki path (eg "alias" in interwiki:alias:path).
 
Constructor Summary
InterWikiResourceReferenceTypeParser()
           
 
Method Summary
 ResourceType getType()
          
 ResourceReference parse(java.lang.String reference)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTERWIKI_ALIAS_SEPARATOR

public static final java.lang.String INTERWIKI_ALIAS_SEPARATOR
Separator between the interwiki alias and the interwiki path (eg "alias" in interwiki:alias:path).

See Also:
Constant Field Values
Constructor Detail

InterWikiResourceReferenceTypeParser

public InterWikiResourceReferenceTypeParser()
Method Detail

getType

public ResourceType getType()

Returns:
the resource type (document, url, attachment, etc).
See Also:
ResourceReferenceTypeParser.getType()

parse

public ResourceReference parse(java.lang.String reference)

Specified by:
parse in interface ResourceReferenceTypeParser
Overrides:
parse in class AbstractURIResourceReferenceTypeParser
Parameters:
reference - the raw resource reference to parse
Returns:
the parsed resource information if the passed reference can be parsed by this type parser or null if the passed reference isn't valid
See Also:
AbstractURIResourceReferenceTypeParser.parse(String)


Copyright © 2004-2011 XWiki. All Rights Reserved.