|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.gadgets.embedded.internal.GadgetViewFactoryImpl
public class GadgetViewFactoryImpl
Default implementation of GadgetViewFactory. Uses
RenderedGadgetUriBuilder to render gadget views.
| Constructor Summary | |
|---|---|
GadgetViewFactoryImpl(GadgetSpecFactory specFactory,
RenderedGadgetUriBuilder renderedUriBuilder)
|
|
| Method Summary | |
|---|---|
boolean |
canRenderInViewType(GadgetState state,
ViewType viewType,
GadgetRequestContext gadgetRequestContext)
Returns true if the gadget represented by state can be rendered with the given ViewType for
the locale specified in the GadgetRequestContext. |
ViewComponent |
createGadgetView(GadgetState state,
ModuleId moduleId,
View view,
GadgetRequestContext gadgetRequestContext)
Returns a ViewComponent that will render the GadgetState, customizing the view based on the
Locale specified in the GadgetRequestContext and the desired ViewType. |
ViewComponent |
createGadgetView(GadgetState state,
View view,
GadgetRequestContext gadgetRequestContext)
Deprecated. as of 2.0, use GadgetViewFactory.createGadgetView(com.atlassian.gadgets.GadgetState,com.atlassian.gadgets.view.ModuleId,com.atlassian.gadgets.view.View,com.atlassian.gadgets.GadgetRequestContext) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GadgetViewFactoryImpl(GadgetSpecFactory specFactory,
RenderedGadgetUriBuilder renderedUriBuilder)
| Method Detail |
|---|
@Deprecated
public ViewComponent createGadgetView(GadgetState state,
View view,
GadgetRequestContext gadgetRequestContext)
throws GadgetParsingException,
GadgetRenderingException
GadgetViewFactory.createGadgetView(com.atlassian.gadgets.GadgetState,com.atlassian.gadgets.view.ModuleId,com.atlassian.gadgets.view.View,com.atlassian.gadgets.GadgetRequestContext)
Returns a ViewComponent that will render the GadgetState, customizing the view based
on the Locale specified in the GadgetRequestContext and the desired ViewType.
This can be used by host applications to place gadgets anywhere they choose.
createGadgetView in interface GadgetViewFactorystate - state of the gadget to be rendered by the ViewComponentview - desired View to use when rendering the gadgetgadgetRequestContext - context info for this request
to make changes to the gadget state; false if the gadget is read-only for the current viewer
ViewComponent that will render the GadgetState
GadgetParsingException - thrown if there is a problem parsing the gadget spec
GadgetRenderingException - thrown if the gadget does not define a <Content> section for the
view
public ViewComponent createGadgetView(GadgetState state,
ModuleId moduleId,
View view,
GadgetRequestContext gadgetRequestContext)
throws GadgetParsingException,
GadgetRenderingException
GadgetViewFactoryViewComponent that will render the GadgetState, customizing the view based on the
Locale specified in the GadgetRequestContext and the desired ViewType.
This can be used by host applications to place gadgets anywhere they choose.
createGadgetView in interface GadgetViewFactorystate - state of the gadget to be rendered by the ViewComponentmoduleId - the moduleId to use in the gadget view. Should be unique for the HTML page that the
gadget will be rendered inview - desired View to use when rendering the gadgetgadgetRequestContext - context info for this request to make changes to the gadget state; false if
the gadget is read-only for the current viewer
ViewComponent that will render the GadgetState
GadgetParsingException - thrown if there is a problem parsing the gadget spec
GadgetRenderingException - thrown if the gadget does not define a <Content> section for the view
public boolean canRenderInViewType(GadgetState state,
ViewType viewType,
GadgetRequestContext gadgetRequestContext)
GadgetViewFactorytrue if the gadget represented by state can be rendered with the given ViewType for
the locale specified in the GadgetRequestContext.
canRenderInViewType in interface GadgetViewFactorystate - state of the gadget to check if we can renderviewType - view type to check the gadget can be rendered ingadgetRequestContext - the context of this request
true if the gadget can be rendered with the view in the locale, false
otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||