Package org.glassfish.config.support
Class GenericCrudCommand
java.lang.Object
org.glassfish.config.support.GenericCrudCommand
- All Implemented Interfaces:
org.glassfish.api.admin.AdminCommandSecurity.Preauthorization,org.glassfish.api.admin.CommandModelProvider,org.glassfish.hk2.api.PostConstruct
- Direct Known Subclasses:
GenericCreateCommand,GenericDeleteCommand,GenericListCommand
public abstract class GenericCrudCommand
extends Object
implements org.glassfish.api.admin.CommandModelProvider, org.glassfish.hk2.api.PostConstruct, org.glassfish.api.admin.AdminCommandSecurity.Preauthorization
services pertinent to generic CRUD command implementations
- Author:
- Jerome Dochez
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertiesconvertStringToProperties(String propsString, char sep) Convert a String with the following format to Properties: name1=value1:name2=value2:name3=value3:...static StringelementName(org.jvnet.hk2.config.DomDocument document, Class<?> parent, Class<?> child) Returns the element name used by the parent to store instances of the childprotected <T extends Annotation>
TgetAnnotation(Method target, Class<T> type) abstract ClassDecorator class if particular commandorg.jvnet.hk2.config.InjectionResolver<org.glassfish.api.Param>protected Class<?>voidbooleanpreAuthorization(org.glassfish.api.admin.AdminCommandContext adminCommandContext) voidsetInjectionResolver(org.jvnet.hk2.config.InjectionResolver<org.glassfish.api.Param> injector) we need to have access to the injector instance that has all the parameters contextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.glassfish.api.admin.CommandModelProvider
getModel
-
Field Details
-
logger
-
localStrings
protected static final com.sun.enterprise.util.LocalStringManagerImpl localStrings -
commandName
-
parentType
-
targetType
-
targetMethod
-
level
-
-
Constructor Details
-
GenericCrudCommand
public GenericCrudCommand()
-
-
Method Details
-
preAuthorization
public boolean preAuthorization(org.glassfish.api.admin.AdminCommandContext adminCommandContext) - Specified by:
preAuthorizationin interfaceorg.glassfish.api.admin.AdminCommandSecurity.Preauthorization
-
postConstruct
public void postConstruct()- Specified by:
postConstructin interfaceorg.glassfish.hk2.api.PostConstruct
-
getAnnotation
-
setInjectionResolver
public void setInjectionResolver(org.jvnet.hk2.config.InjectionResolver<org.glassfish.api.Param> injector) we need to have access to the injector instance that has all the parameters context- Parameters:
injector- the original command injector
-
getInjectionResolver
public org.jvnet.hk2.config.InjectionResolver<org.glassfish.api.Param> getInjectionResolver() -
loadClass
- Throws:
ClassNotFoundException
-
convertStringToProperties
Convert a String with the following format to Properties: name1=value1:name2=value2:name3=value3:... The Properties object contains elements: {name1=value1, name2=value2, name3=value3, ...}- Parameters:
propsString- the String to convertsep- the separator character- Returns:
- Properties containing the elements in String
-
elementName
public static String elementName(org.jvnet.hk2.config.DomDocument document, Class<?> parent, Class<?> child) throws ClassNotFoundException Returns the element name used by the parent to store instances of the child- Parameters:
document- the dom document this configuration element lives in.parent- type of the parentchild- type of the child- Returns:
- the element name holding child's instances in the parent
- Throws:
ClassNotFoundException- when subclasses cannot be loaded
-
getDecoratorClass
Decorator class if particular command
-