Guvnor - Project API 6.0.1.Final

org.guvnor.common.services.project.service
Interface ProjectService

All Superinterfaces:
SupportsRead<ProjectImports>, SupportsUpdate<ProjectImports>

public interface ProjectService
extends SupportsRead<ProjectImports>, SupportsUpdate<ProjectImports>


Method Summary
 void addRole(Project project, String role)
          Add a role to a project; limiting access to users with the role
 void copy(org.uberfire.backend.vfs.Path pathToPomXML, String newName, String comment)
           
 void delete(org.uberfire.backend.vfs.Path pathToPomXML, String comment)
           
 boolean isKModule(org.uberfire.backend.vfs.Path resource)
          Return true if the file is the Project's kmodule.xml file
 boolean isPom(org.uberfire.backend.vfs.Path resource)
          Return true if the file is the Project's pom.xml file
 WorkingSetSettings loadWorkingSetConfig(org.uberfire.backend.vfs.Path project)
           
 Package newPackage(Package pkg, String packageName)
          Creates a new package as a child of the provide package.
 Project newProject(org.uberfire.backend.repositories.Repository repository, String name, POM pom, String baseURL)
          Creates a new project to the given path.
 void removeRole(Project project, String role)
          Remove a role from a project
 org.uberfire.backend.vfs.Path rename(org.uberfire.backend.vfs.Path pathToPomXML, String newName, String comment)
           
 Package resolveDefaultPackage(Project project)
           
 Package resolvePackage(org.uberfire.backend.vfs.Path resource)
          Given a Resource path resolve it to the containing Package Path.
 Set<Package> resolvePackages(Package pkg)
           
 Set<Package> resolvePackages(Project project)
          Given a Project resolves the calculation of all the packages for this project.
 Package resolveParentPackage(Package pkg)
           
 Project resolveProject(org.uberfire.backend.vfs.Path resource)
          Given a Resource path resolve it to the containing Project Path.
 
Methods inherited from interface org.guvnor.common.services.shared.file.SupportsRead
load
 
Methods inherited from interface org.guvnor.common.services.shared.file.SupportsUpdate
save
 

Method Detail

loadWorkingSetConfig

WorkingSetSettings loadWorkingSetConfig(org.uberfire.backend.vfs.Path project)

resolveProject

Project resolveProject(org.uberfire.backend.vfs.Path resource)
Given a Resource path resolve it to the containing Project Path. A Project path is the folder containing pom.xml

Parameters:
resource -
Returns:
Path to the folder containing the Project's pom.xml file or null if the resource was not in a Project

resolvePackage

Package resolvePackage(org.uberfire.backend.vfs.Path resource)
Given a Resource path resolve it to the containing Package Path. A Package path is the folder containing the resource. The folder must be within a valid Project structure and at least reference /src/main/java, /src/main/resources, src/test/java or src/test/resources (or deeper).

Parameters:
resource -
Returns:
Path to the folder containing the resource file or null if the resource is not in a Package.

resolvePackages

Set<Package> resolvePackages(Project project)
Given a Project resolves the calculation of all the packages for this project.

Parameters:
project -
Returns:
Collection containing all the packages for the project.

resolvePackages

Set<Package> resolvePackages(Package pkg)

resolveDefaultPackage

Package resolveDefaultPackage(Project project)

resolveParentPackage

Package resolveParentPackage(Package pkg)

isPom

boolean isPom(org.uberfire.backend.vfs.Path resource)
Return true if the file is the Project's pom.xml file

Parameters:
resource -
Returns:

isKModule

boolean isKModule(org.uberfire.backend.vfs.Path resource)
Return true if the file is the Project's kmodule.xml file

Parameters:
resource -
Returns:

newProject

Project newProject(org.uberfire.backend.repositories.Repository repository,
                   String name,
                   POM pom,
                   String baseURL)
Creates a new project to the given path.

Parameters:
repository -
name -
pom -
baseURL - the base URL where the Guvnor is hosted in web container
Returns:

newPackage

Package newPackage(Package pkg,
                   String packageName)
Creates a new package as a child of the provide package.

Parameters:
pkg -
packageName -
Returns:

addRole

void addRole(Project project,
             String role)
Add a role to a project; limiting access to users with the role

Parameters:
project - The Project
role - The required role

removeRole

void removeRole(Project project,
                String role)
Remove a role from a project

Parameters:
project - The Project
role - The role

rename

org.uberfire.backend.vfs.Path rename(org.uberfire.backend.vfs.Path pathToPomXML,
                                     String newName,
                                     String comment)

delete

void delete(org.uberfire.backend.vfs.Path pathToPomXML,
            String comment)

copy

void copy(org.uberfire.backend.vfs.Path pathToPomXML,
          String newName,
          String comment)

Guvnor - Project API 6.0.1.Final

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.