public class DefaultMVCGroupManager extends AbstractMVCGroupManager
MVCGroupManager
interface.Modifier and Type | Class and Description |
---|---|
protected static class |
DefaultMVCGroupManager.ClassHolder |
protected static class |
DefaultMVCGroupManager.FieldInjectionPoint |
protected static class |
DefaultMVCGroupManager.InjectionPoint |
protected static class |
DefaultMVCGroupManager.MethodInjectionPoint |
Modifier and Type | Field and Description |
---|---|
protected ApplicationClassLoader |
applicationClassLoader |
protected static java.lang.String |
CONFIG_KEY_COMPONENT |
protected static java.lang.String |
CONFIG_KEY_EVENTS_DESTRUCTION |
protected static java.lang.String |
CONFIG_KEY_EVENTS_INSTANTIATION |
protected static java.lang.String |
CONFIG_KEY_EVENTS_LIFECYCLE |
protected static java.lang.String |
CONFIG_KEY_EVENTS_LISTENER |
protected static java.lang.String |
ERROR_VALUE_NULL |
protected Instantiator |
instantiator |
protected static java.lang.String |
KEY_PARENT_GROUP |
ERROR_ARGS_NULL, ERROR_CONFIG_NULL, ERROR_CONFIGURATION_NULL, ERROR_GROUP_NULL, ERROR_MVCID_BLANK, ERROR_MVCTYPE_BLANK, ERROR_NAME_BLANK, ERROR_TYPE_NULL
Constructor and Description |
---|
DefaultMVCGroupManager(GriffonApplication application,
ApplicationClassLoader applicationClassLoader,
Instantiator instantiator) |
Modifier and Type | Method and Description |
---|---|
protected void |
adjustMvcArguments(MVCGroup group,
java.util.Map<java.lang.String,java.lang.Object> args) |
protected void |
checkIdIsUnique(java.lang.String mvcId,
MVCGroupConfiguration configuration) |
protected java.util.Map<java.lang.String,java.lang.Object> |
copyAndConfigureArguments(java.util.Map<java.lang.String,java.lang.Object> args,
MVCGroupConfiguration configuration,
java.lang.String mvcId) |
protected MVCGroup |
createMVCGroup(MVCGroupConfiguration configuration,
java.lang.String mvcId,
java.util.Map<java.lang.String,java.lang.Object> args) |
protected void |
destroyArtifactMember(java.lang.String type,
GriffonArtifact member,
boolean fireDestructionEvents) |
protected void |
destroyContextualMemberProperties(java.lang.String type,
GriffonArtifact member) |
protected void |
destroyMembers(MVCGroup group,
boolean fireDestructionEvents) |
void |
destroyMVCGroup(java.lang.String mvcId)
Destroys an MVC group identified by a particular name.
|
protected void |
destroyNonArtifactMember(java.lang.String type,
java.lang.Object member,
boolean fireDestructionEvents) |
protected void |
doAddGroup(MVCGroup group) |
protected void |
doInitialize(java.util.Map<java.lang.String,MVCGroupConfiguration> configurations) |
protected void |
doRemoveGroup(MVCGroup group) |
protected void |
fillReferencedProperties(MVCGroup group,
java.util.Map<java.lang.String,java.lang.Object> args) |
protected void |
initializeArtifactMember(MVCGroup group,
java.lang.String type,
GriffonArtifact member,
java.util.Map<java.lang.String,java.lang.Object> args) |
protected void |
initializeMembers(MVCGroup group,
java.util.Map<java.lang.String,java.lang.Object> args) |
protected void |
initializeNonArtifactMember(MVCGroup group,
java.lang.String type,
java.lang.Object member,
java.util.Map<java.lang.String,java.lang.Object> args) |
protected java.util.Map<java.lang.String,java.lang.Object> |
instantiateMembers(java.util.Map<java.lang.String,DefaultMVCGroupManager.ClassHolder> classMap,
java.util.Map<java.lang.String,java.lang.Object> args) |
protected boolean |
isConfigFlagEnabled(MVCGroupConfiguration configuration,
java.lang.String key) |
protected boolean |
isContextual(java.lang.reflect.AnnotatedElement element) |
protected boolean |
isInjectable(java.lang.reflect.AnnotatedElement element) |
protected boolean |
isMvcMember(java.lang.reflect.AnnotatedElement element) |
protected java.lang.Class<?> |
loadClass(java.lang.String className) |
protected java.lang.Class<? extends java.beans.PropertyEditor> |
resolveEditor(java.lang.reflect.AnnotatedElement element) |
protected java.lang.String |
resolveFormat(java.lang.reflect.AnnotatedElement element) |
protected DefaultMVCGroupManager.InjectionPoint.Kind |
resolveKind(java.lang.reflect.AnnotatedElement element) |
protected java.lang.String |
resolveMvcId(MVCGroupConfiguration configuration,
java.lang.String mvcId) |
protected void |
selectClassesPerMember(java.lang.String memberType,
java.lang.String memberClassName,
java.util.Map<java.lang.String,DefaultMVCGroupManager.ClassHolder> classMap) |
addConfiguration, addGroup, cloneMVCGroupConfiguration, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVC, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, findConfiguration, findController, findGroup, findModel, findView, getApplication, getAt, getConfigurations, getController, getControllers, getGroups, getModel, getModels, getView, getViews, initialize, nameOf, newContext, newMVCGroup, newMVCGroupConfiguration, removeConfiguration, removeConfiguration, removeGroup, typedMvcGroup, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVC, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup
protected static final java.lang.String ERROR_VALUE_NULL
protected static final java.lang.String CONFIG_KEY_COMPONENT
protected static final java.lang.String CONFIG_KEY_EVENTS_LIFECYCLE
protected static final java.lang.String CONFIG_KEY_EVENTS_INSTANTIATION
protected static final java.lang.String CONFIG_KEY_EVENTS_DESTRUCTION
protected static final java.lang.String CONFIG_KEY_EVENTS_LISTENER
protected static final java.lang.String KEY_PARENT_GROUP
protected final ApplicationClassLoader applicationClassLoader
protected final Instantiator instantiator
@Inject public DefaultMVCGroupManager(@Nonnull GriffonApplication application, @Nonnull ApplicationClassLoader applicationClassLoader, @Nonnull Instantiator instantiator)
protected void doInitialize(@Nonnull java.util.Map<java.lang.String,MVCGroupConfiguration> configurations)
doInitialize
in class AbstractMVCGroupManager
@Nonnull protected MVCGroup createMVCGroup(@Nonnull MVCGroupConfiguration configuration, @Nullable java.lang.String mvcId, @Nonnull java.util.Map<java.lang.String,java.lang.Object> args)
createMVCGroup
in class AbstractMVCGroupManager
protected void adjustMvcArguments(@Nonnull MVCGroup group, @Nonnull java.util.Map<java.lang.String,java.lang.Object> args)
@Nonnull protected java.lang.String resolveMvcId(@Nonnull MVCGroupConfiguration configuration, @Nullable java.lang.String mvcId)
protected void selectClassesPerMember(@Nonnull java.lang.String memberType, @Nonnull java.lang.String memberClassName, @Nonnull java.util.Map<java.lang.String,DefaultMVCGroupManager.ClassHolder> classMap)
@Nonnull protected java.util.Map<java.lang.String,java.lang.Object> copyAndConfigureArguments(@Nonnull java.util.Map<java.lang.String,java.lang.Object> args, @Nonnull MVCGroupConfiguration configuration, @Nonnull java.lang.String mvcId)
protected void checkIdIsUnique(@Nonnull java.lang.String mvcId, @Nonnull MVCGroupConfiguration configuration)
@Nonnull protected java.util.Map<java.lang.String,java.lang.Object> instantiateMembers(@Nonnull java.util.Map<java.lang.String,DefaultMVCGroupManager.ClassHolder> classMap, @Nonnull java.util.Map<java.lang.String,java.lang.Object> args)
protected void initializeMembers(@Nonnull MVCGroup group, @Nonnull java.util.Map<java.lang.String,java.lang.Object> args)
protected void initializeArtifactMember(@Nonnull MVCGroup group, @Nonnull java.lang.String type, @Nonnull GriffonArtifact member, @Nonnull java.util.Map<java.lang.String,java.lang.Object> args)
protected void initializeNonArtifactMember(@Nonnull MVCGroup group, @Nonnull java.lang.String type, @Nonnull java.lang.Object member, @Nonnull java.util.Map<java.lang.String,java.lang.Object> args)
protected void fillReferencedProperties(@Nonnull MVCGroup group, @Nonnull java.util.Map<java.lang.String,java.lang.Object> args)
@Nonnull protected DefaultMVCGroupManager.InjectionPoint.Kind resolveKind(@Nonnull java.lang.reflect.AnnotatedElement element)
@Nonnull protected java.lang.String resolveFormat(@Nonnull java.lang.reflect.AnnotatedElement element)
@Nonnull protected java.lang.Class<? extends java.beans.PropertyEditor> resolveEditor(@Nonnull java.lang.reflect.AnnotatedElement element)
protected boolean isContextual(java.lang.reflect.AnnotatedElement element)
protected boolean isInjectable(java.lang.reflect.AnnotatedElement element)
protected boolean isMvcMember(java.lang.reflect.AnnotatedElement element)
protected void doAddGroup(@Nonnull MVCGroup group)
public void destroyMVCGroup(@Nonnull java.lang.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 java.lang.String type, @Nonnull GriffonArtifact member, boolean fireDestructionEvents)
protected void destroyContextualMemberProperties(@Nonnull java.lang.String type, @Nonnull GriffonArtifact member)
protected void destroyNonArtifactMember(@Nonnull java.lang.String type, @Nonnull java.lang.Object member, boolean fireDestructionEvents)
protected void doRemoveGroup(@Nonnull MVCGroup group)
protected boolean isConfigFlagEnabled(@Nonnull MVCGroupConfiguration configuration, @Nonnull java.lang.String key)
@Nullable protected java.lang.Class<?> loadClass(@Nonnull java.lang.String className)