@Test(expected = IllegalArgumentException.class) public void testSetupExamples_NullModule() { service.setupExamples(mock(ExampleOrganizationalUnit.class), null); }
@Override public WorkspaceProjectContextChangeEvent setupExamples(final ExampleOrganizationalUnit exampleTargetOU, final List<ImportProject> importProjects) { PortablePreconditions.checkNotNull("exampleTargetOU", exampleTargetOU); PortablePreconditions.checkNotNull("exampleProjects", importProjects); PortablePreconditions.checkCondition("Must have at least one ExampleProject", importProjects.size() > 0); final String targetOUName = exampleTargetOU.getName(); final OrganizationalUnit targetOU = getOrganizationalUnit(targetOUName); return this.importProjects(targetOU, importProjects); }
ExamplesServiceImpl extends BaseProjectImportService implements ExamplesService { @Override public WorkspaceProjectContextChangeEvent setupExamples(final ExampleOrganizationalUnit exampleTargetOU, final List<ImportProject> importProjects) { PortablePreconditions.checkNotNull("exampleTargetOU", exampleTargetOU); PortablePreconditions.checkNotNull("exampleProjects", importProjects); PortablePreconditions.checkCondition("Must have at least one ExampleProject", importProjects.size() > 0); final String targetOUName = exampleTargetOU.getName(); final OrganizationalUnit targetOU = getOrganizationalUnit(targetOUName); return this.importProjects(targetOU, importProjects); } }
ExamplesServiceImpl extends BaseProjectImportService implements ExamplesService { @Override public WorkspaceProjectContextChangeEvent setupExamples(final ExampleOrganizationalUnit exampleTargetOU, final List<ImportProject> importProjects) { PortablePreconditions.checkNotNull("exampleTargetOU", exampleTargetOU); PortablePreconditions.checkNotNull("exampleProjects", importProjects); PortablePreconditions.checkCondition("Must have at least one ExampleProject", importProjects.size() > 0); final String targetOUName = exampleTargetOU.getName(); final OrganizationalUnit targetOU = getOrganizationalUnit(targetOUName); return this.importProjects(targetOU, importProjects); } @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 { @Override public WorkspaceProjectContextChangeEvent setupExamples(final ExampleOrganizationalUnit exampleTargetOU, final List<ImportProject> importProjects) { PortablePreconditions.checkNotNull("exampleTargetOU", exampleTargetOU); PortablePreconditions.checkNotNull("exampleProjects", importProjects); PortablePreconditions.checkCondition("Must have at least one ExampleProject", importProjects.size() > 0); final String targetOUName = exampleTargetOU.getName(); final OrganizationalUnit targetOU = getOrganizationalUnit(targetOUName); return this.importProjects(targetOU, importProjects); } @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 { @Override public WorkspaceProjectContextChangeEvent setupExamples(final ExampleOrganizationalUnit exampleTargetOU, final List<ImportProject> importProjects) { PortablePreconditions.checkNotNull("exampleTargetOU", exampleTargetOU); PortablePreconditions.checkNotNull("exampleProjects", importProjects); PortablePreconditions.checkCondition("Must have at least one ExampleProject", importProjects.size() > 0); final String targetOUName = exampleTargetOU.getName(); final OrganizationalUnit targetOU = getOrganizationalUnit(targetOUName); return this.importProjects(targetOU, importProjects); } @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();  }