@FacetConstraint(value={JavaSourceFacet.class,ResourcesFacet.class}) public class RegisterAsServiceCommand extends AbstractProjectCommand
| Constructor and Description |
|---|
RegisterAsServiceCommand() |
| Modifier and Type | Method and Description |
|---|---|
Result |
execute(UIExecutionContext context)
Called when the
UICommand should be executed. |
UICommandMetadata |
getMetadata(UIContext context) |
protected ProjectFactory |
getProjectFactory()
Returns a reference to the
ProjectFactory. |
void |
initializeUI(UIBuilder builder)
Called before rendering the UI.
|
protected boolean |
isProjectRequired()
Implementations should return
true if a Project is required in order for this command to
execute. |
containsProject, filterValueChoicesFromStack, getSelectedProject, getSelectedProject, isEnabledvalidatepublic UICommandMetadata getMetadata(UIContext context)
getMetadata in interface UICommandgetMetadata in class AbstractUICommandcontext - the UIContext provided by the UI implementation, never nullpublic void initializeUI(UIBuilder builder) throws Exception
UICommandInputComponent objects to be displayed in the provided
UIBuilderbuilder - The builder on which the UI should be built upon. Never nullException - if anything wrong happenspublic Result execute(UIExecutionContext context) throws Exception
UICommandUICommand should be executed.
This method should NEVER execute if UICommand.isEnabled(UIContext) returns false and
UICommand.validate(UIValidationContext) contains validation errorsprotected boolean isProjectRequired()
AbstractProjectCommandtrue if a Project is required in order for this command to
execute. If false, this command will run without a Project selected in the current
UIContext. Returning true also enables the use of StackConstraints on the
implementation Class declaration.isProjectRequired in class AbstractProjectCommandprotected ProjectFactory getProjectFactory()
AbstractProjectCommandProjectFactory.getProjectFactory in class AbstractProjectCommandCopyright © 2016 JBoss by Red Hat. All rights reserved.