public abstract class GenericCrudCommand extends Object implements CommandModelProvider, org.glassfish.hk2.api.PostConstruct, AdminCommandSecurity.Preauthorization
| Modifier and Type | Field and Description |
|---|---|
protected String |
commandName |
protected Level |
level |
protected static LocalStringManagerImpl |
localStrings |
protected static Logger |
logger |
protected Class |
parentType |
protected Method |
targetMethod |
protected Class |
targetType |
| Constructor and Description |
|---|
GenericCrudCommand() |
| Modifier and Type | Method and Description |
|---|---|
static Properties |
convertStringToProperties(String propsString,
char sep)
Convert a String with the following format to Properties:
name1=value1:name2=value2:name3=value3:...
|
static String |
elementName(org.jvnet.hk2.config.DomDocument document,
Class<?> parent,
Class<?> child)
Returns the element name used by the parent to store instances of the child
|
protected <T extends Annotation> |
getAnnotation(Method target,
Class<T> type) |
abstract Class |
getDecoratorClass()
Decorator class if particular command
|
org.jvnet.hk2.config.InjectionResolver<Param> |
getInjectionResolver() |
protected Class<?> |
loadClass(String type) |
void |
postConstruct() |
boolean |
preAuthorization(AdminCommandContext adminCommandContext) |
void |
setInjectionResolver(org.jvnet.hk2.config.InjectionResolver<Param> injector)
we need to have access to the injector instance that has all the parameters context
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetModelprotected static final Logger logger
protected static final LocalStringManagerImpl localStrings
protected String commandName
protected Class parentType
protected Class targetType
protected Method targetMethod
protected final Level level
public boolean preAuthorization(AdminCommandContext adminCommandContext)
preAuthorization in interface AdminCommandSecurity.Preauthorizationpublic void postConstruct()
postConstruct in interface org.glassfish.hk2.api.PostConstructprotected <T extends Annotation> T getAnnotation(Method target, Class<T> type)
public void setInjectionResolver(org.jvnet.hk2.config.InjectionResolver<Param> injector)
injector - the original command injectorpublic org.jvnet.hk2.config.InjectionResolver<Param> getInjectionResolver()
protected Class<?> loadClass(String type) throws ClassNotFoundException
ClassNotFoundExceptionpublic static Properties convertStringToProperties(String propsString, char sep)
propsString - the String to convertsep - the separator characterpublic static String elementName(org.jvnet.hk2.config.DomDocument document, Class<?> parent, Class<?> child) throws ClassNotFoundException
document - the dom document this configuration element lives in.parent - type of the parentchild - type of the childClassNotFoundException - when subclasses cannot be loadedpublic abstract Class getDecoratorClass()
Copyright © 2017. All rights reserved.