org.kie.workbench.common.widgets.client.handlers
Class DefaultNewResourceHandler
java.lang.Object
org.kie.workbench.common.widgets.client.handlers.DefaultNewResourceHandler
- All Implemented Interfaces:
- NewResourceHandler
public abstract class DefaultNewResourceHandler
- extends Object
- implements NewResourceHandler
Handler for the creation of new Items that require a Name and Path
|
Field Summary |
protected org.guvnor.common.services.project.context.ProjectContext |
context
|
protected List<org.kie.commons.data.Pair<String,? extends com.google.gwt.user.client.ui.IsWidget>> |
extensions
|
protected PathLabel |
pathLabel
|
protected org.jboss.errai.common.client.api.Caller<org.guvnor.common.services.project.service.ProjectService> |
projectService
|
|
Method Summary |
void |
acceptPath(org.uberfire.backend.vfs.Path path,
com.google.gwt.core.client.Callback<Boolean,Void> callback)
Indicates if the NewResourceHandler can create a resource to this path |
protected String |
buildFileName(org.uberfire.client.workbench.type.ClientResourceType resourceType,
String baseFileName)
|
List<org.kie.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. |
protected org.jboss.errai.common.client.api.RemoteCallback<org.uberfire.backend.vfs.Path> |
getSuccessCallback(NewResourcePresenter presenter)
|
protected org.jboss.errai.common.client.api.RemoteCallback<org.uberfire.backend.vfs.Path> |
getSuccessCallback(NewResourcePresenter presenter,
com.google.gwt.user.client.Command postSaveCommand)
|
protected void |
notifySuccess()
|
boolean |
validate()
Provide NewResourceHandlers with the ability to validate additional parameters before the creation of the new resource |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
extensions
protected final List<org.kie.commons.data.Pair<String,? extends com.google.gwt.user.client.ui.IsWidget>> extensions
pathLabel
protected final PathLabel pathLabel
context
@Inject
protected org.guvnor.common.services.project.context.ProjectContext context
projectService
@Inject
protected org.jboss.errai.common.client.api.Caller<org.guvnor.common.services.project.service.ProjectService> projectService
DefaultNewResourceHandler
public DefaultNewResourceHandler()
getExtensions
public List<org.kie.commons.data.Pair<String,? extends com.google.gwt.user.client.ui.IsWidget>> getExtensions()
- Description copied from interface:
NewResourceHandler
- Return a List of Widgets that the NewResourceHandler can use to gather additional parameters for the
new resource. The List is of Pairs, where each Pair consists of a String caption and IsWidget editor.
- Specified by:
getExtensions in interface NewResourceHandler
- Returns:
- null if no extension is provided
validate
public boolean validate()
- Description copied from interface:
NewResourceHandler
- Provide NewResourceHandlers with the ability to validate additional parameters before the creation of the new resource
- Specified by:
validate in interface NewResourceHandler
- Returns:
- true if validation is successful
acceptPath
public void acceptPath(org.uberfire.backend.vfs.Path path,
com.google.gwt.core.client.Callback<Boolean,Void> callback)
- Description copied from interface:
NewResourceHandler
- Indicates if the NewResourceHandler can create a resource to this path
- Specified by:
acceptPath in interface NewResourceHandler
buildFileName
protected String buildFileName(org.uberfire.client.workbench.type.ClientResourceType resourceType,
String baseFileName)
notifySuccess
protected void notifySuccess()
getSuccessCallback
protected org.jboss.errai.common.client.api.RemoteCallback<org.uberfire.backend.vfs.Path> getSuccessCallback(NewResourcePresenter presenter)
getSuccessCallback
protected org.jboss.errai.common.client.api.RemoteCallback<org.uberfire.backend.vfs.Path> getSuccessCallback(NewResourcePresenter presenter,
com.google.gwt.user.client.Command postSaveCommand)
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.