@FacetConstraint(value={JavaSourceFacet.class,ResourcesFacet.class}) public class JavaEqualsHashcodeCommand extends AbstractProjectCommand
Constructor and Description |
---|
JavaEqualsHashcodeCommand() |
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, getSelectedProject, getSelectedProject, isEnabled
validate
public UICommandMetadata getMetadata(UIContext context)
getMetadata
in interface UICommand
getMetadata
in class AbstractUICommand
context
- the UIContext
provided by the UI implementation, never nullpublic void initializeUI(UIBuilder builder) throws Exception
UICommand
InputComponent
objects to be displayed in the provided
UIBuilder
builder
- The builder on which the UI should be built upon. Never nullException
- if anything wrong happenspublic Result execute(UIExecutionContext context) throws Exception
UICommand
UICommand
should be executed.
This method should NEVER execute if UICommand.isEnabled(UIContext)
returns false and
UICommand.validate(UIValidationContext)
contains validation errorsprotected boolean isProjectRequired()
AbstractProjectCommand
true
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 FacetConstraints
on the
implementation Class
declaration.isProjectRequired
in class AbstractProjectCommand
protected ProjectFactory getProjectFactory()
AbstractProjectCommand
ProjectFactory
.getProjectFactory
in class AbstractProjectCommand
Copyright © 2015 JBoss by Red Hat. All rights reserved.