/** * Returns the ID of the project that contains this entity. This method won't return <code>null</code> * but the ID could be {@linkplain ID#NONE undefined}. */ @JsonIgnore default ID getProjectId() { return getProject().getId(); }
public EventBuilder withRef(ProjectEntity entity) { this.ref = entity.getProjectEntityType(); return withProject(entity.getProject()).with(entity); }
/** * One can edit the SVN configuration of a branch only if he can configurure a project and if the project * is itself configured with SVN. */ @Override public boolean canEdit(ProjectEntity entity, SecurityService securityService) { return securityService.isProjectFunctionGranted(entity.projectId(), ProjectConfig.class) && propertyService.hasProperty( entity.getProject(), SVNProjectConfigurationPropertyType.class); }