本文整理了Java中org.guvnor.structure.repositories.Repository.getUri
方法的一些代码示例,展示了Repository.getUri
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.getUri
方法的具体详情如下:
包路径:org.guvnor.structure.repositories.Repository
类名称:Repository
方法名:getUri
暂无
代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-explorer-backend
private void indexRepository(final Repository repository,
final String key) {
if (!repositoryKeys.containsKey(repository.getUri())) {
repositoryKeys.put(repository.getUri(),
new HashSet<String>());
}
repositoryKeys.get(repository.getUri()).add(key);
}
代码示例来源:origin: org.jbpm/jbpm-wb-integration-backend
public void onProjectDeleted(@Observes RepositoryRemovedEvent deletedEvent) {
String target = ServiceTaskUtils.extractTargetInfo(deletedEvent.getRepository().getUri());
logger.debug("{} has been removed, removing any references to it on service tasks", target);
services.stream()
.filter(service -> service.getInstalledOn().contains(target))
.forEach(service -> {
service.uninstall(target);
logger.debug("Service {} uninstalled from deleted target {}", service.getName(), target);
});
}
代码示例来源:origin: kiegroup/jbpm-wb
public void onProjectDeleted(@Observes RepositoryRemovedEvent deletedEvent) {
String target = ServiceTaskUtils.extractTargetInfo(deletedEvent.getRepository().getUri());
logger.debug("{} has been removed, removing any references to it on service tasks", target);
services.stream()
.filter(service -> service.getInstalledOn().contains(target))
.forEach(service -> {
service.uninstall(target);
logger.debug("Service {} uninstalled from deleted target {}", service.getName(), target);
});
}
代码示例来源:origin: org.guvnor/guvnor-structure-backend
protected void updateLastModified() {
final Path lastModifiedPath = ioService.get(systemRepository.getUri()).resolve(LAST_MODIFIED_MARKER_FILE);
final CommentedOption commentedOption = new CommentedOption("system",
"system repo updated");
ioService.write(lastModifiedPath,
new Date().toString().getBytes(),
commentedOption);
// update the last value to avoid to be retriggered byt the monitor
localLastModifiedValue.set(getLastModified());
}
代码示例来源:origin: kiegroup/appformer
protected void updateLastModified() {
final Path lastModifiedPath = ioService.get(systemRepository.getUri()).resolve(LAST_MODIFIED_MARKER_FILE);
final CommentedOption commentedOption = new CommentedOption("system",
"system repo updated");
ioService.write(lastModifiedPath,
new Date().toString().getBytes(),
commentedOption);
// update the last value to avoid to be re-triggered by the monitor
localLastModifiedValue.set(getLastModified());
}
代码示例来源:origin: org.kie/kie-config-cli
@Override
public String execute(CliContext context) {
StringBuffer result = new StringBuffer();
WeldContainer container = context.getContainer();
RepositoryService repositoryService = container.instance().select(RepositoryService.class).get();
Collection<Repository> repositories = repositoryService.getRepositories();
result.append("Currently available repositories: \n");
for (Repository config : repositories) {
result.append("\tRepository " + config.getAlias() + "\n");
result.append("\t scheme: " + config.getScheme() + "\n");
result.append("\t uri: " + config.getUri() + "\n");
result.append("\t environment: " + printEnvironment(config.getEnvironment()) + "\n");
result.append("\t groups: " + config.getGroups() + "\n");
}
return result.toString();
}
代码示例来源:origin: kiegroup/appformer
@Override
public void startBatch() {
ioService.startBatch(ioService.get(systemRepository.getUri()).getFileSystem());
}
代码示例来源:origin: org.guvnor/guvnor-structure-backend
@Override
public void startBatch() {
ioService.startBatch(ioService.get(systemRepository.getUri()).getFileSystem());
}
代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-workbench-backend
private void mockRepository() {
doReturn(repository).when(repositoryService).createRepository(any(OrganizationalUnit.class),
anyString(),
anyString(),
any(RepositoryEnvironmentConfigurations.class));
doReturn(repository).when(repositoryService).getRepositoryFromSpace(any(Space.class), eq("existentRepository"));
doReturn("git://amend-repo-test").when(repository).getUri();
}
代码示例来源:origin: org.kie.workbench/kie-wb-common-cli-forms-migration
private boolean systemMigrationWasExecuted() {
final IOService systemIoService = migrationServicesCDIWrapper.getSystemIoService();
final Repository systemRepository = migrationServicesCDIWrapper.getSystemRepository();
if (!systemIoService.exists(systemIoService.get(systemRepository.getUri()).resolve("spaces"))) {
system.err().println(String.format("The SYSTEM CONFIGURATION DIRECTORY STRUCTURE MIGRATION must be ran before this one."));
return false;
}
return true;
}
}
代码示例来源:origin: kiegroup/appformer
private long getLastModified() {
final Path lastModifiedPath = ioService.get(systemRepository.getUri()).resolve(ConfigurationServiceImpl.LAST_MODIFIED_MARKER_FILE);
return ioService.getLastModifiedTime(lastModifiedPath).toMillis();
}
}
代码示例来源:origin: org.guvnor/guvnor-structure-backend
private long getLastModified() {
final Path lastModifiedPath = ioService.get(systemRepository.getUri()).resolve(ConfigurationServiceImpl.LAST_MODIFIED_MARKER_FILE);
return ioService.getLastModifiedTime(lastModifiedPath).toMillis();
}
}
代码示例来源:origin: kiegroup/appformer
protected long getLastModified() {
final Path lastModifiedPath = ioService.get(systemRepository.getUri()).resolve(LAST_MODIFIED_MARKER_FILE);
return ioService.getLastModifiedTime(lastModifiedPath).toMillis();
}
代码示例来源:origin: org.guvnor/guvnor-structure-backend
protected long getLastModified() {
final Path lastModifiedPath = ioService.get(systemRepository.getUri()).resolve(LAST_MODIFIED_MARKER_FILE);
return ioService.getLastModifiedTime(lastModifiedPath).toMillis();
}
代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-workbench-backend
private void mockIoService() {
final String artifact = "existentModule";
final String uri = repository.getUri() + fileSystem.getSeparator() + artifact;
final Path path = PathFactory.newPath(artifact,
uri);
doReturn(fileSystem).when(ioService).getFileSystem(any(URI.class));
doReturn(Paths.convert(path)).when(ioService).get(eq(uri));
doReturn(true).when(ioService).exists(eq(Paths.convert(path)));
}
}
代码示例来源:origin: kiegroup/appformer
private Path resolveConfigGroupPath(final ConfigGroup configGroup) {
final ConfigType type = configGroup.getType();
final String namespace = configGroup.getNamespace();
if (type.hasNamespace() && (namespace == null || namespace.isEmpty())) {
throw new RuntimeException("The ConfigType " + type.toString() + " requires a namespace.");
} else if (!type.hasNamespace() && namespace != null && !namespace.isEmpty()) {
throw new RuntimeException("The ConfigType " + type.toString() + " does not support namespaces.");
}
final String filename = configGroup.getName().replaceAll(INVALID_FILENAME_CHARS,
"_");
Path path = ioService.get(systemRepository.getUri()).resolve(type.getDir());
if (type.hasNamespace()) {
path = path.resolve(namespace);
}
return path.resolve(filename + type.getExt());
}
代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-social-home-page-backend
@Override
public SocialActivitiesEvent toSocial( Object object ) {
NewRepositoryEvent event = (NewRepositoryEvent) object;
SocialUser socialUser = null;
try {
socialUser = socialUserRepositoryAPI.findSocialUser( loggedUser.getIdentifier() );
} catch(ContextNotActiveException e) {
//clean repository
socialUser = new SocialUser( "system" );
}
String additionalInfo = "Created";
return new SocialActivitiesEvent( socialUser, ExtendedTypes.NEW_REPOSITORY_EVENT, new Date() ).withAdicionalInfo( additionalInfo ).withLink( event.getNewRepository().getAlias(), event.getNewRepository().getUri() ).withDescription( "" );
}
代码示例来源:origin: org.kie.workbench/kie-wb-common-cli-project-migration
@Override
public boolean updateConfiguration(final ConfigGroup configGroup) {
if (ConfigType.SPACE.equals(configGroup.getType())) {
configGroup.setType(ConfigType.ORGANIZATIONAL_UNIT);
}
String filename = configGroup.getName().replaceAll(INVALID_FILENAME_CHARS,
"_");
final Path filePath = ioService.get(systemRepository.getUri()).resolve(filename + configGroup.getType().getExt());
final CommentedOption commentedOption = new CommentedOption(getIdentityName(),
"Updated config " + filePath.getFileName());
saveConfiguration(configGroup,
filePath,
commentedOption);
configGroupsByTypeWithoutNamespace.remove(configGroup.getType());
return true;
}
代码示例来源:origin: org.uberfire/uberfire-structure-backend
@Before
public void setup() throws IOException {
fileSystemTestingUtils.setup();
when(systemRepository.getUri()).thenReturn("git://amend-repo-test");
marshaller = new ConfigGroupMarshaller();
configurationFactory = new ConfigurationFactoryImpl(new DefaultPasswordServiceImpl());
ioService = mockIoService();
configurationService = new ConfigurationServiceImpl(systemRepository,
marshaller,
identity,
ioService,
repoChangedEvent,
spaceChangedEvent,
changedEvent,
fileSystemTestingUtils.getFileSystem());
}
代码示例来源:origin: org.kie.workbench/kie-wb-common-cli-project-migration
@Before
public void setup() throws IOException {
fileSystemTestingUtils.setup();
when(systemRepository.getUri()).thenReturn("git://amend-repo-test");
marshaller = new ConfigGroupMarshaller();
configurationFactory = new MigrationConfigurationFactoryImpl(new DefaultPasswordServiceImpl());
ioService = mockIoService();
configurationService = new MigrationConfigurationServiceImpl(systemRepository,
marshaller,
identity,
ioService,
repoChangedEvent,
spaceChangedEvent,
changedEvent,
fileSystemTestingUtils.getFileSystem());
}
内容来源于网络,如有侵权,请联系作者删除!