public interface MVCGroupManager extends MVCHandler
Modifier and Type | Method and Description |
---|---|
void |
addConfiguration(MVCGroupConfiguration configuration) |
MVCGroupConfiguration |
cloneMVCGroupConfiguration(String mvcType,
Map<String,Object> config)
Clones an existing MVCGroupConfiguration, optionally overriding additional config values.
|
MVCGroupConfiguration |
findConfiguration(String mvcType) |
<C extends GriffonController> |
findController(String name,
Class<C> type)
Finds a named controller.
|
MVCGroup |
findGroup(String mvcId) |
<M extends GriffonModel> |
findModel(String name,
Class<M> type)
Finds a named model.
|
<V extends GriffonView> |
findView(String name,
Class<V> type)
Finds a named view.
|
GriffonApplication |
getApplication() |
MVCGroup |
getAt(String mvcId) |
Map<String,MVCGroupConfiguration> |
getConfigurations() |
<C extends GriffonController> |
getController(String name,
Class<C> type)
Finds a named controller.
|
Map<String,? extends GriffonController> |
getControllers()
Returns all currently available controller instances, keyed by group name.
|
Map<String,MVCGroup> |
getGroups() |
<M extends GriffonModel> |
getModel(String name,
Class<M> type)
Finds a named model.
|
Map<String,? extends GriffonModel> |
getModels()
Returns all currently available model instances, keyed by group name.
|
<V extends GriffonView> |
getView(String name,
Class<V> type)
Finds a named view.
|
Map<String,? extends GriffonView> |
getViews()
Returns all currently available view instances, keyed by group name.
|
void |
initialize(Map<String,MVCGroupConfiguration> configurations)
Initializes this manager with the group configurations provided by the application and addons.
|
MVCGroup |
newMVCGroup(MVCGroupConfiguration configuration,
String mvcId,
Map<String,Object> members)
Creates a new MVCGroup instance.
|
MVCGroupConfiguration |
newMVCGroupConfiguration(String mvcType,
Map<String,String> members,
Map<String,Object> config)
Creates an MVCConfiguration instance with the given arguments.
|
void |
removeConfiguration(MVCGroupConfiguration configuration) |
void |
removeConfiguration(String name) |
createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, destroyMVCGroup, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup
@Nonnull MVCGroupConfiguration newMVCGroupConfiguration(@Nonnull String mvcType, @Nonnull Map<String,String> members, @Nonnull Map<String,Object> config)
mvcType
- the name of the MVC groupmembers
- members of the groupconfig
- additional configuration required by the group@Nonnull MVCGroupConfiguration cloneMVCGroupConfiguration(@Nonnull String mvcType, @Nonnull Map<String,Object> config)
mvcType
- the name of the configuration to cloneconfig
- additional config parameters to be set on the configuration@Nonnull MVCGroup newMVCGroup(@Nonnull MVCGroupConfiguration configuration, @Nullable String mvcId, @Nonnull Map<String,Object> members)
configuration
- the configuration of the groupmvcId
- the id to use for the groupmembers
- the instance members of the groupvoid initialize(@Nonnull Map<String,MVCGroupConfiguration> configurations)
configurations
- available group configurationsvoid addConfiguration(@Nonnull MVCGroupConfiguration configuration)
void removeConfiguration(@Nonnull MVCGroupConfiguration configuration)
@Nonnull Map<String,MVCGroupConfiguration> getConfigurations()
@Nonnull MVCGroupConfiguration findConfiguration(@Nonnull String mvcType)
@Nonnull Map<String,? extends GriffonModel> getModels()
@Nonnull Map<String,? extends GriffonView> getViews()
@Nonnull Map<String,? extends GriffonController> getControllers()
GriffonApplication getApplication()
@Nonnull <C extends GriffonController> C getController(@Nonnull String name, @Nonnull Class<C> type) throws ArtifactNotFoundException
name
- the name of the group that holds the controllertype
- the type of the controllerArtifactNotFoundException
- if the named controller could not be found@Nonnull <M extends GriffonModel> M getModel(@Nonnull String name, @Nonnull Class<M> type) throws ArtifactNotFoundException
name
- the name of the group that holds the modeltype
- the type of the modelArtifactNotFoundException
- if the named model could not be found@Nonnull <V extends GriffonView> V getView(@Nonnull String name, @Nonnull Class<V> type) throws ArtifactNotFoundException
name
- the name of the group that holds the viewtype
- the type of the viewArtifactNotFoundException
- if the named view could not be found@Nullable <C extends GriffonController> C findController(@Nonnull String name, @Nonnull Class<C> type)
name
- the name of the group that holds the controllertype
- the type of the controller@Nullable <M extends GriffonModel> M findModel(@Nonnull String name, @Nonnull Class<M> type)
name
- the name of the group that holds the modeltype
- the type of the model