public interface NewResourceHandler
| Modifier and Type | Method and Description |
|---|---|
void |
acceptContext(org.guvnor.common.services.project.context.ProjectContext context,
com.google.gwt.core.client.Callback<Boolean,Void> callback)
Indicates if the NewResourceHandler can create a resource to this path
|
boolean |
canCreate()
Asks if the resource handler can be created or not.
|
void |
create(org.guvnor.common.services.project.model.Package pkg,
String baseFileName,
NewResourcePresenter presenter)
An entry-point for the creation of the new resource
|
org.uberfire.mvp.Command |
getCommand(NewResourcePresenter newResourcePresenter)
A command to execute instead of defaulting to the NewResourceView.
|
String |
getDescription()
A description of the new resource type
|
List<org.uberfire.commons.data.Pair<String,? extends com.google.gwt.user.client.ui.IsWidget>> |
getExtensions()
Return a List of Widgets that the NewResourceHandler can use to gather additional parameters for the
new resource.
|
com.google.gwt.user.client.ui.IsWidget |
getIcon()
An icon representing the new resource type
|
org.uberfire.workbench.type.ResourceTypeDefinition |
getResourceType()
Get the ResourceType represented by the Handler
|
void |
validate(String baseFileName,
org.uberfire.ext.editor.commons.client.validation.ValidatorWithReasonCallback callback)
Provide NewResourceHandlers with the ability to validate additional parameters before the creation of the new resource
|
String getDescription()
com.google.gwt.user.client.ui.IsWidget getIcon()
org.uberfire.workbench.type.ResourceTypeDefinition getResourceType()
boolean canCreate()
void create(org.guvnor.common.services.project.model.Package pkg,
String baseFileName,
NewResourcePresenter presenter)
pkg - the Package context where new resource should be createdbaseFileName - the base name of the new resourcepresenter - underlying presenterList<org.uberfire.commons.data.Pair<String,? extends com.google.gwt.user.client.ui.IsWidget>> getExtensions()
void validate(String baseFileName, org.uberfire.ext.editor.commons.client.validation.ValidatorWithReasonCallback callback)
baseFileName - The base file name for the new item (excluding extension)callback - Callback depending on validation resultvoid acceptContext(org.guvnor.common.services.project.context.ProjectContext context,
com.google.gwt.core.client.Callback<Boolean,Void> callback)
org.uberfire.mvp.Command getCommand(NewResourcePresenter newResourcePresenter)
newResourcePresenter - Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.