@Test(expected = NullPointerException.class) public void createProjectFromXMLNullArg1() { getInst().createProjectFromXML(null, input); }
public TopLevelItem createProjectFromXML(final String projectName, final InputStream xml) { checkProjectName(projectName); checkNotNull(xml, InputStream.class); this.securityService.checkPermission(Item.CREATE); if (projectExists(projectName)) { throw new SystemIntegrityViolationException(String.format("Project %s already exists.", projectName)); } try { return getHudson().createProjectFromXML(projectName, xml); } catch (IOException ex) { throw new ServiceRuntimeException(String.format("Project creation failed for %s", projectName), ex); } }
ProjectServiceImpl extends ServiceSupport implements ProjectService { public TopLevelItem createProjectFromXML(final String projectName, final InputStream xml) { checkProjectName(projectName); checkNotNull(xml, InputStream.class); this.securityService.checkPermission(Item.CREATE); if (projectExists(projectName)) { throw new SystemIntegrityViolationException(String.format("Project %s already exists.", projectName)); } try { return getHudson().createProjectFromXML(projectName, xml); } catch (IOException ex) { throw new ServiceRuntimeException(String.format("Project creation failed for %s", projectName), ex); } } }
ProjectServiceImpl extends ServiceSupport implements ProjectService { public TopLevelItem createProjectFromXML(final String projectName, final InputStream xml) { checkProjectName(projectName); checkNotNull(xml, InputStream.class); this.securityService.checkPermission(Item.CREATE); if (projectExists(projectName)) { throw new SystemIntegrityViolationException(String.format("Project %s already exists.", projectName)); } try { return getHudson().createProjectFromXML(projectName, xml); } catch (IOException ex) { throw new ServiceRuntimeException(String.format("Project creation failed for %s", projectName), ex); } } @Inject  ProjectServiceImpl(final SecurityService securityService); }
ProjectServiceImpl extends ServiceSupport implements ProjectService { public TopLevelItem createProjectFromXML(final String projectName, final InputStream xml) { checkProjectName(projectName); checkNotNull(xml, InputStream.class); this.securityService.checkPermission(Item.CREATE); if (projectExists(projectName)) { throw new SystemIntegrityViolationException(String.format("Project %s already exists.", projectName)); } try { return getHudson().createProjectFromXML(projectName, xml); } catch (IOException ex) { throw new ServiceRuntimeException(String.format("Project creation failed for %s", projectName), ex); } } @Inject  ProjectServiceImpl(final SecurityService securityService); AbstractProject<?, ?> getProject(final UUID id); AbstractProject<?, ?> getProject(final String projectName); AbstractProject<?, ?> getProjectByFullName(final String projectName); AbstractProject<?, ?> findProject(final UUID id); AbstractProject<?, ?> findProject(final String projectName); AbstractProject<?, ?> findProjectByFullName(final String projectName); @SuppressWarnings("rawtypes") List<AbstractProject> getAllProjects(); T copyProject(final T src, final String targetProjectName); TopLevelItem createProjectFromXML(final String projectName, final InputStream xml); boolean projectExists(final String projectName); Collection<String> getProjectNames(); }
ProjectServiceImpl extends ServiceSupport implements ProjectService { public TopLevelItem createProjectFromXML(final String projectName, final InputStream xml) { checkProjectName(projectName); checkNotNull(xml, InputStream.class); this.securityService.checkPermission(Item.CREATE); if (projectExists(projectName)) { throw new SystemIntegrityViolationException(String.format("Project %s already exists.", projectName)); } try { return getHudson().createProjectFromXML(projectName, xml); } catch (IOException ex) { throw new ServiceRuntimeException(String.format("Project creation failed for %s", projectName), ex); } } @Inject  ProjectServiceImpl(final SecurityService securityService); AbstractProject<?, ?> getProject(final UUID id); AbstractProject<?, ?> getProject(final String projectName); AbstractProject<?, ?> getProjectByFullName(final String projectName); AbstractProject<?, ?> findProject(final UUID id); AbstractProject<?, ?> findProject(final String projectName); AbstractProject<?, ?> findProjectByFullName(final String projectName); @SuppressWarnings("rawtypes") List<AbstractProject> getAllProjects(); T copyProject(final T src, final String targetProjectName); TopLevelItem createProjectFromXML(final String projectName, final InputStream xml); boolean projectExists(final String projectName); Collection<String> getProjectNames();  }