|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.gadgets.dashboard.internal.impl.GadgetFactoryImpl
public class GadgetFactoryImpl
An implementation of GadgetFactory that delegates to a GadgetStateFactory and a GadgetSpecFactory and returns GadgetImpl instances.
| Constructor Summary | |
|---|---|
GadgetFactoryImpl(GadgetStateFactory stateFactory,
GadgetSpecFactory specFactory,
com.atlassian.sal.api.message.I18nResolver i18n)
Creates a new GadgetFactoryImpl that delegates to the specified factory. |
|
| Method Summary | |
|---|---|
Gadget |
createGadget(GadgetState state,
GadgetRequestContext gadgetRequestContext)
Constructs a Gadget instance from the specified GadgetState. |
Gadget |
createGadget(String gadgetSpecUrl,
GadgetRequestContext gadgetRequestContext)
Creates a new gadget from the spec at the specified URL. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GadgetFactoryImpl(GadgetStateFactory stateFactory,
GadgetSpecFactory specFactory,
com.atlassian.sal.api.message.I18nResolver i18n)
GadgetFactoryImpl that delegates to the specified factory.
stateFactory - the factory to use to create new gadget state objectsspecFactory - the factory to use to retrieve gadget specs| Method Detail |
|---|
public Gadget createGadget(String gadgetSpecUrl,
GadgetRequestContext gadgetRequestContext)
throws GadgetParsingException,
GadgetSpecUriNotAllowedException
createGadget in interface GadgetFactorygadgetSpecUrl - the URL of the gadget spec filegadgetRequestContext - context for this request
Gadget created from the specified spec URL
GadgetParsingException - if there is an error parsing the gadget spec at the specified URL
GadgetSpecUriNotAllowedException - if the specified gadget spec URL is not a valid URI
public Gadget createGadget(GadgetState state,
GadgetRequestContext gadgetRequestContext)
throws GadgetParsingException
Gadget instance from the specified GadgetState. This is used to reconstruct
existing gadget instances.
createGadget in interface GadgetFactorystate - the persistent gadget state to reconstruct fromgadgetRequestContext - context for this request
Gadget reconstructed from the specified state
GadgetParsingException - if there is an error parsing the gadget spec at the URL specified by state.getGadgetSpecUri()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||