Class Project

All Implemented Interfaces:
Serializable, IBaseEntity, ICollectionManaged, ICoreEntity, IEntity, IRightManaged, ISortableEntity

@Entity public class Project extends ComplexEntity implements IRightManaged, ICollectionManaged
See Also:
  • Constructor Details

    • Project

      public Project()
      default constructor
    • Project

      public Project(Project source)
      copy constructor
  • Method Details

    • getProjectCategory

      public Project.ProjectCategory getProjectCategory()
    • setProjectCategory

      public void setProjectCategory(Project.ProjectCategory projectCategory)
    • getProjectTasks

      public List<ProjectTask> getProjectTasks()
    • setProjectTasks

      public void setProjectTasks(List<ProjectTask> projectTasks)
    • getProjectPrincipals

      public List<ProjectPrincipal> getProjectPrincipals()
    • setProjectPrincipals

      public void setProjectPrincipals(List<ProjectPrincipal> projectPrincipals)
    • addProjectPrincipal

      public void addProjectPrincipal(ProjectPrincipal projectPrincipal)
    • getProjectResources

      public List<ProjectResource> getProjectResources()
    • setProjectResources

      public void setProjectResources(List<ProjectResource> projectResources)
    • addProjectResource

      public void addProjectResource(ProjectResource projectResource)
    • getDateStart

      public Calendar getDateStart()
    • setDateStart

      public void setDateStart(Calendar startDate)
    • getDatePlannedEnd

      public Calendar getDatePlannedEnd()
    • setDatePlannedEnd

      public void setDatePlannedEnd(Calendar plannedEndDate)
    • getDateRealEnd

      public Calendar getDateRealEnd()
    • setDateRealEnd

      public void setDateRealEnd(Calendar realEndDate)
    • getPeriodInDays

      public int getPeriodInDays()
    • setPeriodInDays

      public void setPeriodInDays(int periodInDays)
    • getStateGroupType

      public StateGroupType getStateGroupType()
    • setStateGroupType

      public void setStateGroupType(StateGroupType type)
    • getType

      public ComplexTypeEntity getType()
      for ComplexEntity contract. returns always null. projects have no configured type.
      Specified by:
      getType in interface ICollectionManaged
      Specified by:
      getType in class ComplexEntity
    • isRootPerType

      public boolean isRootPerType()
      for ICollectionManaged contract. returns always false as Project is not type dependent.
      Specified by:
      isRootPerType in interface ICollectionManaged
    • getFirstLevelProjectTasks

      public List<ProjectTask> getFirstLevelProjectTasks()
    • getProjectOwner

      public User getProjectOwner()
    • isEditAllowed

      public boolean isEditAllowed(User user)
      TODO: check permissions outside based on regular MC object permissions
    • getProjectPrincipal

      public ProjectPrincipal getProjectPrincipal(Principal principal)
    • getProjectPrincipals

      public List<ProjectPrincipal> getProjectPrincipals(ProjectPrincipal.ProjectPrincipalRole principalRole)
      if principalRole == null return all project principals
    • getProjectUser

      public ProjectPrincipal getProjectUser(User user)
      Returns:
      Principal or null.
    • getProjectGroup

      public ProjectPrincipal getProjectGroup(UserGroup group)
    • getProjectResources

      public List<ProjectResource> getProjectResources(String resourceEntityClass)
      return all projectResources with given resourceEntityClass
      Parameters:
      resourceEntityClass - may be null
      Returns:
      all projectResources of resourceEntityClass, or all projectResources if resourceEntityClass is null
    • getProjectResources

      public List<ProjectResource> getProjectResources(String resourceEntityClass, boolean isActive)
      return all projectResources with given resourceEntityClass and active flag
      Parameters:
      resourceEntityClass - may be null
      isActive -
      Returns:
      all projectResources of resourceEntityClass and active flag, or all projectResources if resourceEntityClass is null
    • getAllowedRightTypes

      public RightType[] getAllowedRightTypes()
      Description copied from interface: IRightManaged
      give the maximum list of RightTypes that apply for this class.
      Specified by:
      getAllowedRightTypes in interface IRightManaged
      Returns:
      array of enum RightType
    • getHasObjectRights

      public boolean getHasObjectRights()
      Description copied from class: ComplexEntity
      type of ComplexEntity must be attached if exists
      Specified by:
      getHasObjectRights in interface IRightManaged
      Overrides:
      getHasObjectRights in class ComplexEntity
      Returns:
      true if object rights are configured for this ComplexEntity