@ApplicationScoped public class KogitoResourceContentService extends Object
ResourceContentService
Constructor and Description |
---|
KogitoResourceContentService(org.appformer.kogito.bridge.client.resource.ResourceContentService resourceContentService,
org.uberfire.client.promise.Promises promises) |
Modifier and Type | Method and Description |
---|---|
void |
getAllItems(org.jboss.errai.common.client.api.RemoteCallback<List<String>> callback,
org.jboss.errai.common.client.api.ErrorCallback<Object> errorCallback)
Get the
List<String> from the project/workspace where the editor is running
and returns it inside the given callback |
void |
getFilteredItems(String pattern,
org.jboss.errai.common.client.api.RemoteCallback<List<String>> callback,
org.jboss.errai.common.client.api.ErrorCallback<Object> errorCallback)
Get filtered
List<String> from the project/workspace where the editor is running
and returns it inside the given callback |
void |
loadFile(String fileUri,
org.jboss.errai.common.client.api.RemoteCallback<String> callback,
org.jboss.errai.common.client.api.ErrorCallback<Object> errorCallback)
Load the file at given uri and returns its content inside the given callback
|
@Inject public KogitoResourceContentService(org.appformer.kogito.bridge.client.resource.ResourceContentService resourceContentService, org.uberfire.client.promise.Promises promises)
public void loadFile(String fileUri, org.jboss.errai.common.client.api.RemoteCallback<String> callback, org.jboss.errai.common.client.api.ErrorCallback<Object> errorCallback)
fileUri
- the resource uri relative to the workspace/projectcallback
- The RemoteCallback
to be invoked on successerrorCallback
- The ErrorCallback
to be invoked on failureResourceContentService.get(String)
public void getAllItems(org.jboss.errai.common.client.api.RemoteCallback<List<String>> callback, org.jboss.errai.common.client.api.ErrorCallback<Object> errorCallback)
List<String>
from the project/workspace where the editor is running
and returns it inside the given callbackcallback
- The RemoteCallback
to be invoked on successerrorCallback
- The ErrorCallback
to be invoked on failureResourceContentService.list(String)
public void getFilteredItems(String pattern, org.jboss.errai.common.client.api.RemoteCallback<List<String>> callback, org.jboss.errai.common.client.api.ErrorCallback<Object> errorCallback)
List<String>
from the project/workspace where the editor is running
and returns it inside the given callbackpattern
- A GLOB pattern to filter files. To list all files use "*"callback
- The RemoteCallback
to be invoked on successerrorCallback
- The ErrorCallback
to be invoked on failureResourceContentService.list(String)
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.