本文整理了Java中org.guvnor.common.services.project.model.Package.getPackageMainResourcesPath()
方法的一些代码示例,展示了Package.getPackageMainResourcesPath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Package.getPackageMainResourcesPath()
方法的具体详情如下:
包路径:org.guvnor.common.services.project.model.Package
类名称:Package
方法名:getPackageMainResourcesPath
暂无
代码示例来源:origin: org.guvnor/guvnor-project-backend
@Override
public Path resolveDefaultPath(Package pkg) {
return pkg.getPackageMainResourcesPath();
}
}
代码示例来源:origin: org.uberfire/uberfire-project-backend
@Override
public Path resolveDefaultPath(Package pkg) {
return pkg.getPackageMainResourcesPath();
}
}
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend
@Override
public boolean accept(final Path path) {
final Package pkg = moduleService.resolvePackage(path);
if (pkg == null) {
return false;
}
return pkg.getPackageMainSrcPath().equals(path) ||
pkg.getPackageMainResourcesPath().equals(path) ||
pkg.getPackageTestSrcPath().equals(path) ||
pkg.getPackageTestResourcesPath().equals(path);
}
代码示例来源:origin: kiegroup/drools-wb
void onNewDocument() {
moduleService.call((org.guvnor.common.services.project.model.Package pkg) -> {
helper.createNewGuidedDecisionTable(pkg.getPackageMainResourcesPath(),
"",
GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY,
GuidedDecisionTable52.HitPolicy.NONE,
view,
(path) -> onOpenDocumentsInEditor(Collections.singletonList(path)));
}).resolvePackage(editorPath);
}
代码示例来源:origin: org.drools/drools-wb-guided-dtable-editor-client
void onNewDocument() {
moduleService.call((org.guvnor.common.services.project.model.Package pkg) -> {
helper.createNewGuidedDecisionTable(pkg.getPackageMainResourcesPath(),
"",
GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY,
GuidedDecisionTable52.HitPolicy.NONE,
view,
(path) -> onOpenDocumentsInEditor(Collections.singletonList(path)));
}).resolvePackage(editorPath);
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-project-client
@Override
public void create(final Package pkg,
final String name,
final NewResourcePresenter presenter) {
indicatorView.showBusyIndicator("Loading...");
final Path path = pkg.getPackageMainResourcesPath();
final Class<?> type = getDefinitionSetType();
final String setId = getId(type);
final String moduleName = context.getActiveModule().isPresent() ? context.getActiveModule().get().getModuleName() : "";
createDiagram(pkg, name, presenter, path, setId, moduleName, Optional.empty());
}
代码示例来源:origin: kiegroup/appformer
@Before
public void setUp() {
resolver = new DefaultModuleResourcePathResolver();
when(pkg.getPackageMainResourcesPath()).thenReturn(packageMainResourcesPath);
}
代码示例来源:origin: org.uberfire/uberfire-project-backend
@Before
public void setUp() {
resolver = new DefaultModuleResourcePathResolver();
when(pkg.getPackageMainResourcesPath()).thenReturn(packageMainResourcesPath);
}
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-datamodel-backend
private void loadGlobalsForPackage(final PackageDataModelOracleBuilder dmoBuilder,
final Package pkg) {
final org.uberfire.java.nio.file.Path nioPackagePath = Paths.convert(pkg.getPackageMainResourcesPath());
final Collection<org.uberfire.java.nio.file.Path> globalFiles = fileDiscoveryService.discoverFiles(nioPackagePath,
FILTER_GLOBALS);
for (final org.uberfire.java.nio.file.Path path : globalFiles) {
final String definition = ioService.readAllString(path);
dmoBuilder.addGlobals(definition);
}
}
}
代码示例来源:origin: org.guvnor/guvnor-project-backend
@Before
public void setUp() {
resolver = new DefaultProjectResourcePathResolver();
when(pkg.getPackageMainResourcesPath()).thenReturn(packageMainResourcesPath);
}
代码示例来源:origin: org.uberfire/uberfire-project-backend
@Test
public void testResolveByDefaultPath() {
assertEquals(packageMainResourcesPath,
resolver.resolveDefaultPath(pkg));
verify(pkg,
times(1)).getPackageMainResourcesPath();
}
}
代码示例来源:origin: kiegroup/appformer
@Test
public void testResolveByDefaultPath() {
assertEquals(packageMainResourcesPath,
resolver.resolveDefaultPath(pkg));
verify(pkg,
times(1)).getPackageMainResourcesPath();
}
}
代码示例来源:origin: org.guvnor/guvnor-project-backend
@Test
public void testResolveByDefaultPath() {
assertEquals(packageMainResourcesPath,
resolver.resolveDefaultPath(pkg));
verify(pkg,
times(1)).getPackageMainResourcesPath();
}
}
代码示例来源:origin: kiegroup/drools-wb
@Override
@Before
public void setup() {
this.dtGraphServiceCaller = new CallerMock<>(dtGraphService);
this.moduleServiceCaller = new CallerMock<>(moduleService);
this.graphSaveAndRenameServiceCaller = new CallerMock<>(graphSaveAndRenameService);
when(view.asWidget()).thenReturn(mock(Widget.class));
when(moduleService.resolvePackage(any(Path.class))).thenReturn(activePackage);
when(activePackage.getPackageMainResourcesPath()).thenReturn(activePackageResourcesPath);
when(alertsButtonMenuItemBuilder.build()).thenReturn(alertsButtonMenuItem);
super.setup();
}
代码示例来源:origin: kiegroup/jbpm-wb
public void configurePackage(@Observes NewPackageEvent pkg) {
if (isCaseProject(Paths.convert(pkg.getPackage().getModuleRootPath()))) {
String resourcesPathStr = Paths.convert(pkg.getPackage().getPackageMainResourcesPath()).toUri().toString();
String separator = Paths.convert(pkg.getPackage().getModuleRootPath()).getFileSystem().getSeparator();
Path resourcesPath = ioService.get(URI.create(resourcesPathStr + separator + WORK_DEFINITION_FILE));
addWorkDefinitions(resourcesPath);
}
}
代码示例来源:origin: org.jbpm/jbpm-wb-integration-backend
public void configurePackage(@Observes NewPackageEvent pkg) {
if (isCaseProject(Paths.convert(pkg.getPackage().getModuleRootPath()))) {
String resourcesPathStr = Paths.convert(pkg.getPackage().getPackageMainResourcesPath()).toUri().toString();
String separator = Paths.convert(pkg.getPackage().getModuleRootPath()).getFileSystem().getSeparator();
Path resourcesPath = ioService.get(URI.create(resourcesPathStr + separator + WORK_DEFINITION_FILE));
addWorkDefinitions(resourcesPath);
}
}
代码示例来源:origin: kiegroup/drools-wb
@Override
public void create( final Package pkg,
final String baseFileName,
final NewResourcePresenter presenter ) {
busyIndicatorView.showBusyIndicator( CommonConstants.INSTANCE.Saving() );
dslTextService.call( getSuccessCallback( presenter ),
new HasBusyIndicatorDefaultErrorCallback( busyIndicatorView ) ).create( pkg.getPackageMainResourcesPath(),
buildFileName( baseFileName,
resourceType ),
"",
"" );
}
代码示例来源:origin: org.drools/drools-wb-enum-editor-client
@Override
public void create( final Package pkg,
final String baseFileName,
final NewResourcePresenter presenter ) {
busyIndicatorView.showBusyIndicator( CommonConstants.INSTANCE.Saving() );
enumService.call( getSuccessCallback( presenter ),
new HasBusyIndicatorDefaultErrorCallback( busyIndicatorView ) ).create( pkg.getPackageMainResourcesPath(),
buildFileName( baseFileName,
resourceType ),
"",
"" );
}
代码示例来源:origin: org.drools/drools-wb-guided-dtable-editor-client
@Override
public void create( final Package pkg,
final String baseFileName,
final NewResourcePresenter presenter ) {
busyIndicatorView.showBusyIndicator( CommonConstants.INSTANCE.Saving() );
graphService.call( getSuccessCallback( presenter ),
new HasBusyIndicatorDefaultErrorCallback( busyIndicatorView ) ).create( pkg.getPackageMainResourcesPath(),
buildFileName( baseFileName,
resourceType ),
new GuidedDecisionTableEditorGraphModel(),
"" );
}
代码示例来源:origin: org.kie.workbench.forms/kie-wb-common-forms-editor-client
@Override
public void create(final org.guvnor.common.services.project.model.Package pkg,
final String baseFileName,
final NewResourcePresenter presenter) {
busyIndicatorView.showBusyIndicator(translationService.getTranslation(FormEditorConstants.NewFormDefinitionlHandlerSelectFormUse));
modelerService.call(getSuccessCallback(presenter), getErrorCallback()).createForm(pkg.getPackageMainResourcesPath(),
buildFileName(baseFileName, resourceType),
formModelsPresenter.getFormModel());
}
内容来源于网络,如有侵权,请联系作者删除!