@Retention(value=RUNTIME) @Target(value=METHOD) @GenerateServiceFromMethod(implementation="org.glassfish.config.support.GenericDeleteCommand", advertisedContracts="org.glassfish.api.admin.AdminCommand") public @interface Delete
List<X> getXs();
or
void setX(X x);
X is the type of instance that will be deleted, the name of the
method is actually immaterial. So for example, the following
@Delete
public List<Foo> getAllMyFoos();
@Delete
public void setMySuperFoo(Foo foo);
@Delete
public List<Foo> getFoos();
@Delete
public List<Foo> getFoo();
will all be valid annotated methods.
The instance to be removed from the parent must be resolved by the
resolver attribute. The resolver can use injection or the command
invocation parameters (using the Param
annotation) to get enough information to look up or retrieve the
instance to be deleted.
Usually, most instances can be looked up by using the instance type
and its key (provided by the --name or --target parameters for instance).
See Create for initialization information| Modifier and Type | Required Element and Description |
|---|---|
I18n |
i18n
Returns the i18n key that will be used to look up a localized string in the annotated
type module.
|
String |
value
Name of the command that will be used to register this generic command implementation under.
|
| Modifier and Type | Optional Element and Description |
|---|---|
ExecuteOn |
cluster
Returns the desired behaviors in a clustered environment.
|
Class<? extends DeletionDecorator> |
decorator
Returns a decorator type that should be looked up and called when a
configuration element of the annotated type is deleted.
|
Class<? extends CrudResolver> |
resolver
Returns the instance of the configured object that should be deleted.
|
@GeneratedServiceName public abstract String value
public abstract I18n i18n
public abstract Class<? extends CrudResolver> resolver
public abstract Class<? extends DeletionDecorator> decorator
Copyright © 2019. All rights reserved.