Class WorkspaceProject

  • All Implemented Interfaces:
    org.uberfire.commons.data.Cacheable

    @Portable
    public class WorkspaceProject
    extends Object
    implements org.uberfire.commons.data.Cacheable
    • 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:
        requiresRefresh in interface org.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:
        markAsCached in interface org.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()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object