@Test public void testIsOldPlayground() { service.md5 = "1234asd"; service.playgroundSpaceName = ".playground-" + service.md5; OrganizationalUnit ou1 = mock(OrganizationalUnit.class); when(ou1.getName()).thenReturn(".playground-1234"); assertTrue(service.isOldPlayground(ou1)); }
protected boolean isOldPlayground(OrganizationalUnit ou) { return ou.getName().startsWith(PREFIX) && !ou.getName().endsWith(md5); }
ExamplesServiceImpl extends BaseProjectImportService implements ExamplesService { protected boolean isOldPlayground(OrganizationalUnit ou) { return ou.getName().startsWith(PREFIX) && !ou.getName().endsWith(md5); } }
ExamplesServiceImpl extends BaseProjectImportService implements ExamplesService { protected boolean isOldPlayground(OrganizationalUnit ou) { return ou.getName().startsWith(PREFIX) && !ou.getName().endsWith(md5); } @Inject  ExamplesServiceImpl(final @Named("ioStrategy") IOService ioService,
                               final RepositoryFactory repositoryFactory,
                               final KieModuleService moduleService,
                               final OrganizationalUnitService ouService,
                               final WorkspaceProjectService projectService,
                               final MetadataService metadataService,
                               final Event<NewProjectEvent> newProjectEvent,
                               final ProjectScreenService projectScreenService,
                               final ImportProjectValidators validators,
                               final SpaceConfigStorageRegistry spaceConfigStorageRegistry,
                               final @Named("systemFS") FileSystem systemFS,
                               final PathUtil pathUtil,
                               final RepositoryService repoService); }
ExamplesServiceImpl extends BaseProjectImportService implements ExamplesService { protected boolean isOldPlayground(OrganizationalUnit ou) { return ou.getName().startsWith(PREFIX) && !ou.getName().endsWith(md5); } @Inject  ExamplesServiceImpl(final @Named("ioStrategy") IOService ioService,
                               final RepositoryFactory repositoryFactory,
                               final KieModuleService moduleService,
                               final OrganizationalUnitService ouService,
                               final WorkspaceProjectService projectService,
                               final MetadataService metadataService,
                               final Event<NewProjectEvent> newProjectEvent,
                               final ProjectScreenService projectScreenService,
                               final ImportProjectValidators validators,
                               final SpaceConfigStorageRegistry spaceConfigStorageRegistry,
                               final @Named("systemFS") FileSystem systemFS,
                               final PathUtil pathUtil,
                               final RepositoryService repoService); @PostConstruct void initPlaygroundRepository(); @Override ExamplesMetaData getMetaData(); @Override ExampleRepository getPlaygroundRepository(); @Override WorkspaceProjectContextChangeEvent setupExamples(final ExampleOrganizationalUnit exampleTargetOU,
                                                            final List<ImportProject> importProjects); @Override Set<ImportProject> getExampleProjects(OrganizationalUnit targetOu); @Override int priority(); @Override void dispose(); }
ExamplesServiceImpl extends BaseProjectImportService implements ExamplesService { protected boolean isOldPlayground(OrganizationalUnit ou) { return ou.getName().startsWith(PREFIX) && !ou.getName().endsWith(md5); } @Inject  ExamplesServiceImpl(final @Named("ioStrategy") IOService ioService,
                               final RepositoryFactory repositoryFactory,
                               final KieModuleService moduleService,
                               final OrganizationalUnitService ouService,
                               final WorkspaceProjectService projectService,
                               final MetadataService metadataService,
                               final Event<NewProjectEvent> newProjectEvent,
                               final ProjectScreenService projectScreenService,
                               final ImportProjectValidators validators,
                               final SpaceConfigStorageRegistry spaceConfigStorageRegistry,
                               final @Named("systemFS") FileSystem systemFS,
                               final PathUtil pathUtil,
                               final RepositoryService repoService); @PostConstruct void initPlaygroundRepository(); @Override ExamplesMetaData getMetaData(); @Override ExampleRepository getPlaygroundRepository(); @Override WorkspaceProjectContextChangeEvent setupExamples(final ExampleOrganizationalUnit exampleTargetOU,
                                                            final List<ImportProject> importProjects); @Override Set<ImportProject> getExampleProjects(OrganizationalUnit targetOu); @Override int priority(); @Override void dispose();  }