Examples of ProjectService


Examples of net.sf.pmr.core.service.ProjectService

    public final static void populate(HttpServletRequest request) {
       
        // get the user service
        UserService userService = CoreObjectFactory.getUserService();
        // get the project repository
        ProjectService projectService = CoreObjectFactory.getProjectService();
       
        // set the number of user in the request
        request.setAttribute("numberOfUser", userService.countAll());
        // set the number of project in the request
        request.setAttribute("numberOfProject", projectService.countAll());
       
    }
View Full Code Here

Examples of org.focusns.service.core.ProjectService

            }
        }
        //
        String projectCode = parameterMap.get(Keys.PARAMETER_PROJECT_CODE);
        if (StringUtils.hasText(projectCode)) {
            ProjectService projectService = beanFactory.getBean(ProjectService.class);
            Project project = projectService.getProject(projectCode);
            Assert.notNull(project);
            //
            parameterMap.put("category", project.getCategory().getCode());
        }
        //
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService

    }

    @Test
    public void testBuilderSimpleKProject() throws Exception {
        IOService ioService = getReference( IOService.class );
        ProjectService projectService = getReference( ProjectService.class );
        final Project project = mock( Project.class );

        URL url = this.getClass().getResource( "/GuvnorM2RepoDependencyExample1" );
        SimpleFileSystemProvider p = new SimpleFileSystemProvider();
        org.uberfire.java.nio.file.Path path = p.getPath( url.toURI() );
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService

    @Test
//    @Ignore("//TODO {manstis}")
    public void testBuilderKProjectHasDependency() throws Exception {
        IOService ioService = getReference( IOService.class );
        ProjectService projectService = getReference( ProjectService.class );
        final Project project = mock( Project.class );

        URL url = this.getClass().getResource( "/GuvnorM2RepoDependencyExample2" );
        SimpleFileSystemProvider p = new SimpleFileSystemProvider();
        org.uberfire.java.nio.file.Path path = p.getPath( url.toURI() );
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService

    @Test
//    @Ignore("//TODO {manstis}")
    public void testBuilderKProjectHasSnapshotDependency() throws Exception {
        IOService ioService = getReference( IOService.class );
        ProjectService projectService = getReference( ProjectService.class );
        final Project project = mock( Project.class );

        URL url = this.getClass().getResource( "/GuvnorM2RepoDependencyExample2Snapshot" );
        SimpleFileSystemProvider p = new SimpleFileSystemProvider();
        org.uberfire.java.nio.file.Path path = p.getPath( url.toURI() );
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService

    @Test
//    @Ignore("//TODO {manstis}")
    public void testBuilderKProjectHasDependencyMetaData() throws Exception {
        IOService ioService = getReference( IOService.class );
        ProjectService projectService = getReference( ProjectService.class );
        final Project project = mock( Project.class );

        URL url = this.getClass().getResource( "/GuvnorM2RepoDependencyExample2" );
        SimpleFileSystemProvider p = new SimpleFileSystemProvider();
        org.uberfire.java.nio.file.Path path = p.getPath( url.toURI() );
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService

    }

    @Test
    public void testKProjectContainsXLS() throws Exception {
        IOService ioService = getReference( IOService.class );
        ProjectService projectService = getReference( ProjectService.class );
        final Project project = mock( Project.class );

        URL url = this.getClass().getResource( "/ExampleWithExcel" );
        SimpleFileSystemProvider p = new SimpleFileSystemProvider();
        org.uberfire.java.nio.file.Path path = p.getPath( url.toURI() );
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService

    @Test
    public void testProjectServiceInstantiation() throws Exception {

        final Bean projectServiceBean = (Bean) beanManager.getBeans( ProjectService.class ).iterator().next();
        final CreationalContext cc = beanManager.createCreationalContext( projectServiceBean );
        final ProjectService projectService = (ProjectService) beanManager.getReference( projectServiceBean,
                                                                                         ProjectService.class,
                                                                                         cc );
        assertNotNull( projectService );
    }
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService

    @Test
    public void testResolvePackageWithNonProjectPath() throws Exception {

        final Bean projectServiceBean = (Bean) beanManager.getBeans( ProjectService.class ).iterator().next();
        final CreationalContext cc = beanManager.createCreationalContext( projectServiceBean );
        final ProjectService projectService = (ProjectService) beanManager.getReference( projectServiceBean,
                                                                                         ProjectService.class,
                                                                                         cc );

        final URL testUrl = this.getClass().getResource( "/" );
        final org.uberfire.java.nio.file.Path testNioPath = fs.getPath( testUrl.toURI() );
        final Path testPath = paths.convert( testNioPath );

        //Test a non-Project Path resolves to null
        final Package result = projectService.resolvePackage( testPath );
        assertNull( result );
    }
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService

    @Test
    public void testResolvePackageWithRootPath() throws Exception {

        final Bean projectServiceBean = (Bean) beanManager.getBeans( ProjectService.class ).iterator().next();
        final CreationalContext cc = beanManager.createCreationalContext( projectServiceBean );
        final ProjectService projectService = (ProjectService) beanManager.getReference( projectServiceBean,
                                                                                         ProjectService.class,
                                                                                         cc );

        final URL rootUrl = this.getClass().getResource( "/ProjectBackendTestProjectStructureValid" );
        final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath( rootUrl.toURI() );
        final Path rootPath = paths.convert( nioRootPath );

        //Test a root resolves to null
        final Package result = projectService.resolvePackage( rootPath );
        assertNull( result );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.