com.atlassian.confluence.renderer.v2.macros
Class BaseHttpRetrievalMacro

java.lang.Object
  extended by com.atlassian.renderer.v2.macro.BaseMacro
      extended by com.atlassian.confluence.renderer.v2.macros.BaseHttpRetrievalMacro
All Implemented Interfaces:
com.atlassian.renderer.v2.macro.Macro

public abstract class BaseHttpRetrievalMacro
extends com.atlassian.renderer.v2.macro.BaseMacro


Field Summary
 
Fields inherited from interface com.atlassian.renderer.v2.macro.Macro
RAW_PARAMS_KEY
 
Constructor Summary
BaseHttpRetrievalMacro()
           
 
Method Summary
protected  java.lang.String cleanupUrl(java.lang.String url)
           
 java.lang.String execute(java.util.Map parameters, java.lang.String body, com.atlassian.renderer.RenderContext renderContext)
           
 java.lang.String failed(java.lang.String url, HttpResponse response)
           
 com.atlassian.renderer.v2.RenderMode getBodyRenderMode()
           
protected  ConfluenceUser getRemoteUser()
           
 boolean hasBody()
           
 java.lang.String notFound(java.lang.String url)
           
 java.lang.String notPermitted(java.lang.String url)
           
 void setHttpRetrievalService(HttpRetrievalService httpRetrievalService)
           
 void setUserAccessor(UserAccessor userAccessor)
           
abstract  java.lang.String successfulResponse(java.util.Map parameters, com.atlassian.renderer.RenderContext renderContext, java.lang.String url, HttpResponse response)
           
 
Methods inherited from class com.atlassian.renderer.v2.macro.BaseMacro
getTokenType, getWysiwygBodyType, isInline, suppressMacroRenderingDuringWysiwyg, suppressSurroundingTagDuringWysiwygRendering
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseHttpRetrievalMacro

public BaseHttpRetrievalMacro()
Method Detail

hasBody

public boolean hasBody()

getBodyRenderMode

public com.atlassian.renderer.v2.RenderMode getBodyRenderMode()

execute

public java.lang.String execute(java.util.Map parameters,
                                java.lang.String body,
                                com.atlassian.renderer.RenderContext renderContext)
                         throws com.atlassian.renderer.v2.macro.MacroException
Throws:
com.atlassian.renderer.v2.macro.MacroException

successfulResponse

public abstract java.lang.String successfulResponse(java.util.Map parameters,
                                                    com.atlassian.renderer.RenderContext renderContext,
                                                    java.lang.String url,
                                                    HttpResponse response)
                                             throws com.atlassian.renderer.v2.macro.MacroException
Throws:
com.atlassian.renderer.v2.macro.MacroException

notFound

public java.lang.String notFound(java.lang.String url)

notPermitted

public java.lang.String notPermitted(java.lang.String url)

failed

public java.lang.String failed(java.lang.String url,
                               HttpResponse response)

cleanupUrl

protected java.lang.String cleanupUrl(java.lang.String url)

setHttpRetrievalService

public void setHttpRetrievalService(HttpRetrievalService httpRetrievalService)

getRemoteUser

protected ConfluenceUser getRemoteUser()

setUserAccessor

public void setUserAccessor(UserAccessor userAccessor)


Copyright © 2003-2014 Atlassian. All Rights Reserved.