Class WorkspaceProject
- java.lang.Object
-
- org.guvnor.common.services.project.model.WorkspaceProject
-
- All Implemented Interfaces:
org.uberfire.commons.data.Cacheable
@Portable public class WorkspaceProject extends Object implements org.uberfire.commons.data.Cacheable
-
-
Constructor Summary
Constructors Constructor Description WorkspaceProject()WorkspaceProject(org.guvnor.structure.organizationalunit.OrganizationalUnit organizationalUnit, org.guvnor.structure.repositories.Repository repository, org.guvnor.structure.repositories.Branch branch, Module mainModule)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)org.guvnor.structure.repositories.BranchgetBranch()Branch is where the Project is located.StringgetEncodedIdentifier()ModulegetMainModule()StringgetName()Name resolution sources in priority order: root pom.xml module name, root pom.xml artifactId and if everything else fails we use the repository alias.org.guvnor.structure.organizationalunit.OrganizationalUnitgetOrganizationalUnit()org.guvnor.structure.repositories.RepositorygetRepository()This is here for convenience.org.uberfire.backend.vfs.PathgetRootPath()Short cut for the WorkspaceProject root.org.uberfire.spaces.SpacegetSpace()inthashCode()voidmarkAsCached()booleanrequiresRefresh()
-
-
-
Constructor Detail
-
WorkspaceProject
public WorkspaceProject()
-
WorkspaceProject
public WorkspaceProject(org.guvnor.structure.organizationalunit.OrganizationalUnit organizationalUnit, org.guvnor.structure.repositories.Repository repository, org.guvnor.structure.repositories.Branch branch, Module mainModule)
-
-
Method Detail
-
getOrganizationalUnit
public org.guvnor.structure.organizationalunit.OrganizationalUnit getOrganizationalUnit()
-
getRepository
public org.guvnor.structure.repositories.Repository getRepository()
This is here for convenience. In case you quickly need the repository information. Please do not use the repository root path unless you are sure you need it. The Branch root is the Project root.- Returns:
- Repository where the project is.
-
getBranch
public org.guvnor.structure.repositories.Branch getBranch()
Branch is where the Project is located. To change the branch, please recreate and reload the Project. You get way less bugs in UI code this way.- Returns:
- Currently active branch.
-
getMainModule
public Module getMainModule()
- Returns:
- The Module that exists in the Project root.
-
getEncodedIdentifier
public String getEncodedIdentifier()
-
requiresRefresh
public boolean requiresRefresh()
- Specified by:
requiresRefreshin interfaceorg.uberfire.commons.data.Cacheable
-
getName
public String getName()
Name resolution sources in priority order: root pom.xml module name, root pom.xml artifactId and if everything else fails we use the repository alias.- Returns:
- Resolved name of the Project.
-
markAsCached
public void markAsCached()
- Specified by:
markAsCachedin interfaceorg.uberfire.commons.data.Cacheable
-
getRootPath
public org.uberfire.backend.vfs.Path getRootPath()
Short cut for the WorkspaceProject root.- Returns:
- The root path of the active branch.
-
getSpace
public org.uberfire.spaces.Space getSpace()
-
-