public class DefaultMVCGroupManager extends AbstractMVCGroupManager
MVCGroupManager
interface.Modifier and Type | Class and Description |
---|---|
protected static class |
DefaultMVCGroupManager.ClassHolder |
ERROR_ARGS_NULL, ERROR_CONFIG_NULL, ERROR_CONFIGURATION_NULL, ERROR_GROUP_NULL, ERROR_MVCID_BLANK, ERROR_MVCTYPE_BLANK
Constructor and Description |
---|
DefaultMVCGroupManager(GriffonApplication application,
ApplicationClassLoader applicationClassLoader) |
Modifier and Type | Method and Description |
---|---|
protected void |
adjustMvcArguments(MVCGroup group,
Map<String,Object> args) |
protected MVCGroup |
buildMVCGroup(MVCGroupConfiguration configuration,
String mvcId,
Map<String,Object> args) |
protected void |
checkIdIsUnique(String mvcId,
MVCGroupConfiguration configuration) |
protected Map<String,Object> |
copyAndConfigureArguments(Map<String,Object> args,
MVCGroupConfiguration configuration,
String mvcId) |
protected void |
destroyArtifactMember(String type,
GriffonArtifact member,
boolean fireDestructionEvents) |
protected void |
destroyMembers(MVCGroup group,
boolean fireDestructionEvents) |
void |
destroyMVCGroup(String mvcId)
Destroys an MVC group identified by a particular name.
|
protected void |
destroyNonArtifactMember(String type,
Object member,
boolean fireDestructionEvents) |
protected void |
doAddGroup(MVCGroup group) |
protected void |
doInitialize(Map<String,MVCGroupConfiguration> configurations) |
protected void |
doRemoveGroup(MVCGroup group) |
protected void |
fillNonArtifactMemberProperties(String type,
Object member,
Map<String,Object> args) |
protected void |
fillReferencedProperties(MVCGroup group,
Map<String,Object> args) |
protected void |
initializeArtifactMember(MVCGroup group,
String type,
GriffonArtifact member,
Map<String,Object> args) |
protected void |
initializeMembers(MVCGroup group,
Map<String,Object> args) |
protected void |
initializeNonArtifactMember(MVCGroup group,
String type,
Object member,
Map<String,Object> args) |
protected Map<String,Object> |
instantiateMembers(Map<String,DefaultMVCGroupManager.ClassHolder> classMap,
Map<String,Object> args) |
protected boolean |
isConfigFlagEnabled(MVCGroupConfiguration configuration,
String key) |
protected Class<?> |
loadClass(String className) |
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.
|
protected String |
resolveMvcId(MVCGroupConfiguration configuration,
String mvcId) |
protected void |
selectClassesPerMember(String memberType,
String memberClassName,
Map<String,DefaultMVCGroupManager.ClassHolder> classMap) |
addConfiguration, addGroup, buildMVCGroup, buildMVCGroup, buildMVCGroup, buildMVCGroup, buildMVCGroup, buildMVCGroup, cloneMVCGroupConfiguration, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, findConfiguration, findGroup, getApplication, getAt, getConfigurations, getControllers, getGroups, getModels, getViews, initialize, removeConfiguration, removeConfiguration, removeGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup
@Inject public DefaultMVCGroupManager(@Nonnull GriffonApplication application, @Nonnull ApplicationClassLoader applicationClassLoader)
@Nonnull public MVCGroupConfiguration newMVCGroupConfiguration(@Nonnull String mvcType, @Nonnull Map<String,String> members, @Nonnull Map<String,Object> config)
MVCGroupManager
mvcType
- the name of the MVC groupmembers
- members of the groupconfig
- additional configuration required by the group@Nonnull public MVCGroup newMVCGroup(@Nonnull MVCGroupConfiguration configuration, @Nullable String mvcId, @Nonnull Map<String,Object> members)
MVCGroupManager
configuration
- the configuration of the groupmvcId
- the id to use for the groupmembers
- the instance members of the groupprotected void doInitialize(@Nonnull Map<String,MVCGroupConfiguration> configurations)
doInitialize
in class AbstractMVCGroupManager
@Nonnull protected MVCGroup buildMVCGroup(@Nonnull MVCGroupConfiguration configuration, @Nullable String mvcId, @Nonnull Map<String,Object> args)
buildMVCGroup
in class AbstractMVCGroupManager
protected void adjustMvcArguments(@Nonnull MVCGroup group, @Nonnull Map<String,Object> args)
@Nonnull protected String resolveMvcId(@Nonnull MVCGroupConfiguration configuration, @Nullable String mvcId)
protected void selectClassesPerMember(@Nonnull String memberType, @Nonnull String memberClassName, @Nonnull Map<String,DefaultMVCGroupManager.ClassHolder> classMap)
@Nonnull protected Map<String,Object> copyAndConfigureArguments(@Nonnull Map<String,Object> args, @Nonnull MVCGroupConfiguration configuration, @Nonnull String mvcId)
protected void checkIdIsUnique(@Nonnull String mvcId, @Nonnull MVCGroupConfiguration configuration)
@Nonnull protected Map<String,Object> instantiateMembers(@Nonnull Map<String,DefaultMVCGroupManager.ClassHolder> classMap, @Nonnull Map<String,Object> args)
protected void initializeMembers(@Nonnull MVCGroup group, @Nonnull Map<String,Object> args)
protected void initializeArtifactMember(@Nonnull MVCGroup group, @Nonnull String type, @Nonnull GriffonArtifact member, @Nonnull Map<String,Object> args)
protected void initializeNonArtifactMember(@Nonnull MVCGroup group, @Nonnull String type, @Nonnull Object member, @Nonnull Map<String,Object> args)
protected void fillReferencedProperties(@Nonnull MVCGroup group, @Nonnull Map<String,Object> args)
protected void fillNonArtifactMemberProperties(@Nonnull String type, @Nonnull Object member, @Nonnull Map<String,Object> args)
public void destroyMVCGroup(@Nonnull String mvcId)
MVCHandler
ATTENTION: make sure to call the super implementation if you override this method otherwise group references will not be kept up to date.
mvcId
- the name of the group to destroy and dispose.protected void destroyMembers(@Nonnull MVCGroup group, boolean fireDestructionEvents)
protected void destroyArtifactMember(@Nonnull String type, @Nonnull GriffonArtifact member, boolean fireDestructionEvents)
protected void destroyNonArtifactMember(@Nonnull String type, @Nonnull Object member, boolean fireDestructionEvents)
protected boolean isConfigFlagEnabled(@Nonnull MVCGroupConfiguration configuration, @Nonnull String key)