Package org.glassfish.config.support
Class GenericCreateCommand
- java.lang.Object
-
- org.glassfish.config.support.GenericCrudCommand
-
- org.glassfish.config.support.GenericCreateCommand
-
- All Implemented Interfaces:
AdminCommand,AdminCommandSecurity.AccessCheckProvider,AdminCommandSecurity.Preauthorization,CommandModelProvider,org.glassfish.hk2.api.PostConstruct
@PerLookup public class GenericCreateCommand extends GenericCrudCommand implements AdminCommand, AdminCommandSecurity.AccessCheckProvider
Generic create command implementation. This command can create POJO configuration objects from an asadmin command invocation parameters. So far, such POJO must be ConfigBeanProxy subclasses and be annotated with theParamannotation to property function.- Author:
- Jerome Dochez
-
-
Field Summary
-
Fields inherited from class org.glassfish.config.support.GenericCrudCommand
commandName, level, LOCAL_STRINGS, LOGGER, parentType, targetMethod, targetType
-
-
Constructor Summary
Constructors Constructor Description GenericCreateCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(AdminCommandContext context)Executes the command with the command parameters passed as Properties where the keys are the parameter names and the values are the parameter valuesCollection<? extends AccessRequired.AccessCheck>getAccessChecks()Returns theAccessChecks the command has computed at runtime which should be included in the authorization, added to checks that secure admin infers from the command's CRUD or RestEndpoint characteristics orAccessRequiredannotations.ClassgetDecoratorClass()Decorator class if particular commandCommandModelgetModel()voidpostConstruct()booleanpreAuthorization(AdminCommandContext adminCommandContext)-
Methods inherited from class org.glassfish.config.support.GenericCrudCommand
convertStringToProperties, elementName, getAnnotation, getInjectionResolver, loadClass, setInjectionResolver
-
-
-
-
Method Detail
-
postConstruct
public void postConstruct()
- Specified by:
postConstructin interfaceorg.glassfish.hk2.api.PostConstruct- Overrides:
postConstructin classGenericCrudCommand
-
getAccessChecks
public Collection<? extends AccessRequired.AccessCheck> getAccessChecks()
Description copied from interface:AdminCommandSecurity.AccessCheckProviderReturns theAccessChecks the command has computed at runtime which should be included in the authorization, added to checks that secure admin infers from the command's CRUD or RestEndpoint characteristics orAccessRequiredannotations.- Specified by:
getAccessChecksin interfaceAdminCommandSecurity.AccessCheckProvider- Returns:
- the
AccessChecks
-
preAuthorization
public boolean preAuthorization(AdminCommandContext adminCommandContext)
- Specified by:
preAuthorizationin interfaceAdminCommandSecurity.Preauthorization- Overrides:
preAuthorizationin classGenericCrudCommand
-
execute
public void execute(AdminCommandContext context)
Description copied from interface:AdminCommandExecutes the command with the command parameters passed as Properties where the keys are the parameter names and the values are the parameter values- Specified by:
executein interfaceAdminCommand- Parameters:
context- information
-
getModel
public CommandModel getModel()
- Specified by:
getModelin interfaceCommandModelProvider
-
getDecoratorClass
public Class getDecoratorClass()
Description copied from class:GenericCrudCommandDecorator class if particular command- Specified by:
getDecoratorClassin classGenericCrudCommand- Returns:
-
-