本文整理了Java中org.kie.workbench.common.stunner.core.diagram.Metadata.getRoot()
方法的一些代码示例,展示了Metadata.getRoot()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Metadata.getRoot()
方法的具体详情如下:
包路径:org.kie.workbench.common.stunner.core.diagram.Metadata
类名称:Metadata
方法名:getRoot
暂无
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-bpmn-backend
private Path getDeployedRoot(final Metadata metadata) {
final Path root = metadata.getRoot();
return deployed
.values()
.stream()
.filter(root::equals)
.findFirst()
.orElse(null);
}
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-bpmn-backend
public org.uberfire.java.nio.file.Path resolveGlobalPath(final Metadata metadata) {
return resolveGlobalPathByRoot(metadata.getRoot());
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-bpmn-backend
@SuppressWarnings("all")
public void deploy(final Metadata metadata) {
final Path root = metadata.getRoot();
final Path deployedPath = getDeployedRoot(metadata);
final Path path = null != deployedPath ? deployedPath : root;
synchronized (path) {
if (null == getDeployedRoot(metadata)) {
deployed.put(root.toURI(), root);
deployServices.forEach(s -> s.deploy(metadata));
}
}
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-bpmn-client
@Inject
public WorkItemDefinitionClientRegistry(final Caller<WorkItemDefinitionLookupService> service,
final SessionManager sessionManager,
final ManagedInstance<WorkItemDefinitionCacheRegistry> registryInstances,
final ErrorPopupPresenter errorPopupPresenter) {
this(service,
sessionManager,
registryInstances::get,
exception -> errorPopupPresenter.showMessage(getExceptionMessage(exception)),
new WorkItemDefinitionRegistries<>(metadata -> metadata.getRoot().toURI(),
new HashMap<>(),
registryInstances::destroy));
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-bpmn-backend
public org.uberfire.java.nio.file.Path resolveResourcesPath(final Metadata metadata) {
return ioService.get(metadata.getRoot().toURI()).resolve(PATH_RESOURCES);
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-bpmn-client
@Override
public void loadDiagramType(Metadata metadata) {
bpmnDiagramService
.call((r) -> setProjectType(metadata, (ProjectType) r))
.getProjectType(metadata.getRoot());
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-backend
@Override
protected Metadata obtainMetadata(DefinitionSetService services,
final org.uberfire.backend.vfs.Path diagramFilePath,
final String defSetId,
final String fileName) {
Metadata metadata = null;
final InputStream metaDataStream = loadMetadataForPath(diagramFilePath);
if (null != metaDataStream) {
try {
metadata = services.getDiagramMarshaller().getMetadataMarshaller().unmarshall(metaDataStream);
if (null == metadata.getRoot() || null == metadata.getRoot().toURI()) {
metadata.setRoot(getRoot());
}
} catch (java.io.IOException e) {
LOG.error("Cannot unmarshall metadata for diagram's path [{}]", diagramFilePath, e);
}
}
return metadata;
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-bpmn-project-backend
@Before
public void init() {
when(metadata.getRoot()).thenReturn(root);
tested = new WorkItemDefinitionProjectInstaller(pomService,
metadataService,
moduleService);
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-bpmn-project-backend
@Before
public void init() {
when(metadata.getRoot()).thenReturn(root);
when(remoteLookupService.execute(any(WorkItemDefinitionRemoteRequest.class)))
.thenReturn(Collections.singleton(WID));
tested = new WorkItemDefinitionRemoteDeployService(remoteLookupService,
backendFileSystemManager,
resources,
projectInstaller,
(WorkItemDefinition wid) -> WID.equals(wid) ? widAsset : null,
(WorkItemDefinition wid) -> WID.equals(wid) ? iconAsset : null);
}
内容来源于网络,如有侵权,请联系作者删除!