Commit bbc0cde5 authored by michael.simon's avatar michael.simon
Browse files

Remove direct connection between service and project

parent 4e60d6e0
......@@ -64,9 +64,6 @@ public class ServiceEntity extends AbstractBaseEntity {
@ManyToOne(targetEntity = GroupAdminRoleEntity.class)
private GroupAdminRoleEntity groupAdminRole;
@ManyToOne(targetEntity = ProjectAdminRoleEntity.class)
private ProjectAdminRoleEntity projectAdminRole;
@ManyToOne(targetEntity = ImageEntity.class)
private ImageEntity image;
......@@ -303,14 +300,6 @@ public class ServiceEntity extends AbstractBaseEntity {
this.deregisterText = deregisterText;
}
public ProjectAdminRoleEntity getProjectAdminRole() {
return projectAdminRole;
}
public void setProjectAdminRole(ProjectAdminRoleEntity projectAdminRole) {
this.projectAdminRole = projectAdminRole;
}
public Boolean getSshPubKeyCapable() {
return sshPubKeyCapable;
}
......
......@@ -28,7 +28,6 @@ import edu.kit.scc.webreg.entity.GroupAdminRoleEntity;
import edu.kit.scc.webreg.entity.ImageEntity;
import edu.kit.scc.webreg.entity.ServiceEntity;
import edu.kit.scc.webreg.entity.SshPubKeyApproverRoleEntity;
import edu.kit.scc.webreg.entity.project.ProjectAdminRoleEntity;
import edu.kit.scc.webreg.service.AdminRoleService;
import edu.kit.scc.webreg.service.ApproverRoleService;
import edu.kit.scc.webreg.service.BusinessRulePackageService;
......@@ -37,7 +36,6 @@ import edu.kit.scc.webreg.service.GroupAdminRoleService;
import edu.kit.scc.webreg.service.ImageService;
import edu.kit.scc.webreg.service.ServiceService;
import edu.kit.scc.webreg.service.SshPubKeyApproverRoleService;
import edu.kit.scc.webreg.service.project.ProjectAdminRoleService;
@ManagedBean
@ViewScoped
......@@ -60,9 +58,6 @@ public class EditServiceBean implements Serializable {
@Inject
private GroupAdminRoleService groupAdminRoleService;
@Inject
private ProjectAdminRoleService projectAdminRoleService;
@Inject
private ImageService imageService;
......@@ -80,7 +75,6 @@ public class EditServiceBean implements Serializable {
private List<AdminRoleEntity> adminRoleList;
private List<AdminRoleEntity> hotlineRoleList;
private List<GroupAdminRoleEntity> groupAdminRoleList;
private List<ProjectAdminRoleEntity> projectAdminRoleList;
private List<ImageEntity> imageList;
private List<BusinessRuleEntity> ruleList;
private List<BusinessRulePackageEntity> rulePackageList;
......@@ -91,7 +85,6 @@ public class EditServiceBean implements Serializable {
private AdminRoleEntity selectedAdminRole;
private AdminRoleEntity selectedHotlineRole;
private GroupAdminRoleEntity selectedGroupAdminRole;
private ProjectAdminRoleEntity selectedProjectAdminRole;
private ImageEntity selectedImage;
private BusinessRuleEntity selectedRule;
private BusinessRulePackageEntity selectedRulePackage;
......@@ -113,7 +106,6 @@ public class EditServiceBean implements Serializable {
adminRoleList = adminRoleService.findAll();
hotlineRoleList = adminRoleService.findAll();
groupAdminRoleList = groupAdminRoleService.findAll();
projectAdminRoleList = projectAdminRoleService.findAll();
imageList = imageService.findAll();
ruleList = ruleService.findAll();
rulePackageList = rulePackageService.findAll();
......@@ -124,7 +116,6 @@ public class EditServiceBean implements Serializable {
selectedAdminRole = entity.getAdminRole();
selectedHotlineRole = entity.getHotlineRole();
selectedGroupAdminRole = entity.getGroupAdminRole();
selectedProjectAdminRole = entity.getProjectAdminRole();
selectedImage = entity.getImage();
selectedRule = entity.getAccessRule();
selectedRulePackage = entity.getGroupFilterRulePackage();
......@@ -142,7 +133,6 @@ public class EditServiceBean implements Serializable {
entity.setAdminRole(selectedAdminRole);
entity.setHotlineRole(selectedHotlineRole);
entity.setGroupAdminRole(selectedGroupAdminRole);
entity.setProjectAdminRole(selectedProjectAdminRole);
entity.setImage(selectedImage);
entity.setAccessRule(selectedRule);
entity.setServiceProps(propertyMap);
......@@ -340,22 +330,6 @@ public class EditServiceBean implements Serializable {
public void setSelectedParentService(ServiceEntity selectedParentService) {
this.selectedParentService = selectedParentService;
}
public List<ProjectAdminRoleEntity> getProjectAdminRoleList() {
return projectAdminRoleList;
}
public void setProjectAdminRoleList(List<ProjectAdminRoleEntity> projectAdminRoleList) {
this.projectAdminRoleList = projectAdminRoleList;
}
public ProjectAdminRoleEntity getSelectedProjectAdminRole() {
return selectedProjectAdminRole;
}
public void setSelectedProjectAdminRole(ProjectAdminRoleEntity selectedProjectAdminRole) {
this.selectedProjectAdminRole = selectedProjectAdminRole;
}
public List<SshPubKeyApproverRoleEntity> getSshPubKeyApproverRoleList() {
return sshPubKeyApproverRoleList;
......
......@@ -86,14 +86,6 @@
var="role" itemLabel="#{role.name} (id #{role.id})" itemValue="#{role}"/>
</h:selectOneMenu>
<h:outputText value="#{messages.project_admin_role}:"/>
<h:selectOneMenu value="#{editServiceBean.selectedProjectAdminRole}"
converter="#{projectAdminRoleConverter}">
<f:selectItem itemLabel="Keine Projektrolle" itemValue="#{null}"/>
<f:selectItems value="#{editServiceBean.projectAdminRoleList}"
var="role" itemLabel="#{role.name} (id #{role.id})" itemValue="#{role}"/>
</h:selectOneMenu>
<bw:inputText id="registerBeanField" label="#{messages.register_bean}"
value="#{editServiceBean.entity.registerBean}" required="true" >
</bw:inputText>
......
......@@ -75,12 +75,6 @@
<h:outputText value="#{messages.undefined}"
rendered="#{showServiceBean.entity.groupAdminRole == null}"/>
<h:outputText value="#{messages.project_admin_role}:" />
<h:outputText value="#{showServiceBean.entity.projectAdminRole.name}"
rendered="#{showServiceBean.entity.projectAdminRole != null}"/>
<h:outputText value="#{messages.undefined}"
rendered="#{showServiceBean.entity.projectAdminRole == null}"/>
<h:outputText value="#{messages.register_bean}:" />
<h:outputText value="#{showServiceBean.entity.registerBean}" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment