com.atlassian.renderer.embedded
Class EmbeddedResource

java.lang.Object
  extended by com.atlassian.renderer.embedded.EmbeddedResource
Direct Known Subclasses:
EmbeddedImage, EmbeddedObject

public class EmbeddedResource
extends Object

Link to an embedded mime resource.


Field Summary
protected  String filename
          The filename of this resource.
protected  String originalText
          The original (unparsed) embedded link text.
protected  String page
          The confluence page to which the resource is attached.
protected  EmbeddedResourceParser parser
          Embedded resource parser, available for accessing the original embedded text.
protected  Properties properties
          The resource properties
protected  String space
          The confluence space to which the resource is attached.
protected  String type
          The mime type of this resource.
protected  String url
          The unparsed reference to the embedded resource.
 
Constructor Summary
EmbeddedResource(EmbeddedResourceParser parser)
          Create a new EmbeddedResource.
EmbeddedResource(String originalText)
          Create a new Embedded resource using embedded resource text.
 
Method Summary
 String getFilename()
           
 String getOriginalLinkText()
          Retrieve the original embedded resource text.
 String getPage()
          The name of the page this resource is attached to.
 Properties getProperties()
           
 String getSpace()
          The name of the space this resource is attached to.
 String getType()
          Retrieve the resource mime type, or null if the type is unknown.
 String getUrl()
           
 boolean isExternal()
          Returns true if the resource is external to confluence.
 boolean isInternal()
          Returns true if this resource is internal to confluence.
static boolean matchesType(EmbeddedResourceParser parser)
          Returns whether this class will handle the given file or not
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parser

protected final EmbeddedResourceParser parser
Embedded resource parser, available for accessing the original embedded text.


filename

protected final String filename
The filename of this resource.


type

protected final String type
The mime type of this resource.


page

protected final String page
The confluence page to which the resource is attached. This applies for relative/internal resources only.


space

protected final String space
The confluence space to which the resource is attached. This applied for relative/internal resources only.


url

protected final String url
The unparsed reference to the embedded resource. ie: if external, this is a URL, if internal it is space:page^filename.ext


originalText

protected final String originalText
The original (unparsed) embedded link text.


properties

protected Properties properties
The resource properties

Constructor Detail

EmbeddedResource

public EmbeddedResource(EmbeddedResourceParser parser)
Create a new EmbeddedResource.

Parameters:
parser -

EmbeddedResource

public EmbeddedResource(String originalText)
Create a new Embedded resource using embedded resource text.

Parameters:
originalText -
Method Detail

matchesType

public static boolean matchesType(EmbeddedResourceParser parser)
                           throws IllegalArgumentException
Returns whether this class will handle the given file or not

Parameters:
parser - The parser for the file
Returns:
True is there is a match, false otherwise
Throws:
IllegalArgumentException

isExternal

public boolean isExternal()
Returns true if the resource is external to confluence.

Returns:

isInternal

public boolean isInternal()
Returns true if this resource is internal to confluence.

Returns:

getUrl

public String getUrl()

getFilename

public String getFilename()

getType

public String getType()
Retrieve the resource mime type, or null if the type is unknown.

Returns:

getOriginalLinkText

public String getOriginalLinkText()
Retrieve the original embedded resource text. This represents the text as entered in the wiki markup.

Returns:

getSpace

public String getSpace()
The name of the space this resource is attached to. The space name is only relevant for internal resources.

Returns:
See Also:
isInternal()

getPage

public String getPage()
The name of the page this resource is attached to. The page name is only relevant for internal resources.

Returns:
See Also:
isInternal()

toString

public String toString()
Overrides:
toString in class Object

getProperties

public Properties getProperties()


Atlassian Wiki Renderer is developed by Atlassian Software Systems.