public abstract class DefaultNewResourceHandler extends Object implements NewResourceHandler
| Modifier and Type | Field and Description |
|---|---|
protected org.guvnor.common.services.project.context.ProjectContext |
context |
protected List<org.uberfire.commons.data.Pair<String,? extends com.google.gwt.user.client.ui.IsWidget>> |
extensions |
protected javax.enterprise.event.Event<NewResourceSuccessEvent> |
newResourceSuccessEvent |
protected javax.enterprise.event.Event<org.uberfire.workbench.events.NotificationEvent> |
notificationEvent |
protected org.uberfire.client.mvp.PlaceManager |
placeManager |
protected org.jboss.errai.common.client.api.Caller<KieProjectService> |
projectService |
protected org.jboss.errai.common.client.api.Caller<ValidationService> |
validationService |
| Constructor and Description |
|---|
DefaultNewResourceHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptContext(com.google.gwt.core.client.Callback<Boolean,Void> callback)
Indicates if the NewResourceHandler can create a resource to this path
|
protected String |
buildFileName(String baseFileName,
org.uberfire.workbench.type.ResourceTypeDefinition resourceType) |
boolean |
canCreate()
Asks if the resource handler can be created or not.
|
org.uberfire.mvp.Command |
getCommand(NewResourcePresenter newResourcePresenter)
A command to execute instead of defaulting to the NewResourceView.
|
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.
|
org.guvnor.common.services.project.context.ProjectContext |
getProjectContext()
Returns the actual ProjectContext
|
protected org.jboss.errai.common.client.api.RemoteCallback<org.uberfire.backend.vfs.Path> |
getSuccessCallback(NewResourcePresenter presenter) |
protected void |
notifySuccess() |
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, getDescription, getIcon, getResourceType, order, supportsDefaultPackageprotected final List<org.uberfire.commons.data.Pair<String,? extends com.google.gwt.user.client.ui.IsWidget>> extensions
@Inject protected org.guvnor.common.services.project.context.ProjectContext context
@Inject protected org.jboss.errai.common.client.api.Caller<KieProjectService> projectService
@Inject protected org.jboss.errai.common.client.api.Caller<ValidationService> validationService
@Inject protected org.uberfire.client.mvp.PlaceManager placeManager
@Inject protected javax.enterprise.event.Event<org.uberfire.workbench.events.NotificationEvent> notificationEvent
@Inject protected javax.enterprise.event.Event<NewResourceSuccessEvent> newResourceSuccessEvent
public List<org.uberfire.commons.data.Pair<String,? extends com.google.gwt.user.client.ui.IsWidget>> getExtensions()
NewResourceHandlergetExtensions in interface NewResourceHandlerpublic void validate(String baseFileName, org.uberfire.ext.editor.commons.client.validation.ValidatorWithReasonCallback callback)
NewResourceHandlervalidate in interface NewResourceHandlerbaseFileName - The base file name for the new item (excluding extension)callback - Callback depending on validation resultpublic org.guvnor.common.services.project.context.ProjectContext getProjectContext()
NewResourceHandlergetProjectContext in interface NewResourceHandlerpublic void acceptContext(com.google.gwt.core.client.Callback<Boolean,Void> callback)
NewResourceHandleracceptContext in interface NewResourceHandlerpublic org.uberfire.mvp.Command getCommand(NewResourcePresenter newResourcePresenter)
NewResourceHandlergetCommand in interface NewResourceHandlerprotected String buildFileName(String baseFileName, org.uberfire.workbench.type.ResourceTypeDefinition resourceType)
protected void notifySuccess()
protected org.jboss.errai.common.client.api.RemoteCallback<org.uberfire.backend.vfs.Path> getSuccessCallback(NewResourcePresenter presenter)
public boolean canCreate()
NewResourceHandlercanCreate in interface NewResourceHandlerCopyright © 2001–2018 JBoss by Red Hat. All rights reserved.