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

split configuration for IDPs and AAs from SP configuration

parent 8a071dc9
/*******************************************************************************
* Copyright (c) 2014 Michael Simon.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Michael Simon - initial
******************************************************************************/
package edu.kit.scc.webreg.service;
import edu.kit.scc.webreg.entity.ServiceSamlSpEntity;
public interface ServiceSamlSpService extends BaseService<ServiceSamlSpEntity, Long> {
}
/*******************************************************************************
* Copyright (c) 2014 Michael Simon.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Michael Simon - initial
******************************************************************************/
package edu.kit.scc.webreg.service.impl;
import javax.ejb.Stateless;
import javax.inject.Inject;
import edu.kit.scc.webreg.dao.BaseDao;
import edu.kit.scc.webreg.dao.ServiceSamlSpDao;
import edu.kit.scc.webreg.entity.ServiceSamlSpEntity;
import edu.kit.scc.webreg.service.ServiceSamlSpService;
@Stateless
public class ServiceSamlSpServiceImpl extends BaseServiceImpl<ServiceSamlSpEntity, Long> implements ServiceSamlSpService {
private static final long serialVersionUID = 1L;
@Inject
private ServiceSamlSpDao dao;
@Override
protected BaseDao<ServiceSamlSpEntity, Long> getDao() {
return dao;
}
}
/*******************************************************************************
* Copyright (c) 2014 Michael Simon.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Michael Simon - initial
******************************************************************************/
package edu.kit.scc.webreg.bean.admin.saml;
import java.io.Serializable;
import java.util.List;
import javax.faces.view.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
import edu.kit.scc.webreg.entity.SamlAAConfigurationEntity;
import edu.kit.scc.webreg.service.SamlAAConfigurationService;
@Named
@ViewScoped
public class ListAaConfigurationBean implements Serializable {
private static final long serialVersionUID = 1L;
private List<SamlAAConfigurationEntity> aaList;
@Inject
private SamlAAConfigurationService aaService;
public List<SamlAAConfigurationEntity> getAaList() {
if (aaList == null) {
aaList = aaService.findAll();
}
return aaList;
}
}
/*******************************************************************************
* Copyright (c) 2014 Michael Simon.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Michael Simon - initial
******************************************************************************/
package edu.kit.scc.webreg.bean.admin.saml;
import java.io.Serializable;
import java.util.List;
import javax.faces.view.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
import edu.kit.scc.webreg.entity.SamlIdpConfigurationEntity;
import edu.kit.scc.webreg.entity.ServiceSamlSpEntity;
import edu.kit.scc.webreg.service.SamlIdpConfigurationService;
import edu.kit.scc.webreg.service.ServiceSamlSpService;
@Named
@ViewScoped
public class ListIdpConfigurationBean implements Serializable {
private static final long serialVersionUID = 1L;
private List<SamlIdpConfigurationEntity> idpList;
private List<ServiceSamlSpEntity> serviceSpList;
@Inject
private SamlIdpConfigurationService idpService;
@Inject
private ServiceSamlSpService serviceSamlSpService;
public List<SamlIdpConfigurationEntity> getIdpList() {
if (idpList == null) {
idpList = idpService.findAll();
}
return idpList;
}
public List<ServiceSamlSpEntity> getServiceSpList() {
if (serviceSpList == null) {
serviceSpList = serviceSamlSpService.findAll();
}
return serviceSpList;
}
}
......@@ -13,54 +13,28 @@ package edu.kit.scc.webreg.bean.admin.saml;
import java.io.Serializable;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.enterprise.context.RequestScoped;
import javax.faces.view.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
import edu.kit.scc.webreg.entity.SamlAAConfigurationEntity;
import edu.kit.scc.webreg.entity.SamlIdpConfigurationEntity;
import edu.kit.scc.webreg.entity.SamlSpConfigurationEntity;
import edu.kit.scc.webreg.service.SamlAAConfigurationService;
import edu.kit.scc.webreg.service.SamlIdpConfigurationService;
import edu.kit.scc.webreg.service.SamlSpConfigurationService;
@Named("listSamlConfigurationBean")
@RequestScoped
@Named
@ViewScoped
public class ListSamlConfigurationBean implements Serializable {
private static final long serialVersionUID = 1L;
private List<SamlSpConfigurationEntity> spList;
private List<SamlAAConfigurationEntity> aaList;
private List<SamlIdpConfigurationEntity> idpList;
@Inject
private SamlSpConfigurationService spService;
@Inject
private SamlAAConfigurationService aaService;
@Inject
private SamlIdpConfigurationService idpService;
@PostConstruct
public void init() {
spList = spService.findAll();
aaList = aaService.findAll();
idpList = idpService.findAll();
}
private SamlSpConfigurationService spService;
public List<SamlSpConfigurationEntity> getSpList() {
if (spList == null) {
spList = spService.findAll();
}
return spList;
}
public List<SamlAAConfigurationEntity> getAaList() {
return aaList;
}
public List<SamlIdpConfigurationEntity> getIdpList() {
return idpList;
}
}
......@@ -477,6 +477,8 @@ last_successful_update = Letztes erfolgreiches Update
last_update = Letztes Update
list_aa_configs = Attribute Authority
list_attribute_sources = Attributquellen
list_audits = Liste der Audits
......@@ -485,6 +487,8 @@ list_business_rule = Regeln
list_federations = F\u00F6derationen
list_idp_configs = Identity Provider
list_job_classes = Liste der Jobklassen
list_oidc_client_configs = OIDC Client configs
......
......@@ -477,6 +477,8 @@ last_successful_update = Last successful update
last_update = Last Update
list_aa_configs = Attribute Authority
list_attribute_sources = List attribute sources
list_audits = List audits
......@@ -485,6 +487,8 @@ list_business_rule = List rules
list_federations = List federations
list_idp_configs = Identity Provider
list_job_classes = List job classes
list_oidc_client_configs = OIDC Client configs
......
......@@ -477,6 +477,8 @@ last_successful_update = Derni\u00E8re mise \u00E0 jour r\u00E9ussie
last_update = Derni\u00E8re mise \u00E0 jour
list_aa_configs = Attribute Authority
list_attribute_sources = Liste des sources d'attributs
list_audits = Liste des audits
......@@ -485,6 +487,8 @@ list_business_rule = Liste des r\u00E8gles commerciales
list_federations = Liste des f\u00E9d\u00E9rations
list_idp_configs = Identity Provider
list_job_classes = Liste des classes d'emploi
list_oidc_client_configs = Configurations du client OIDC
......@@ -495,7 +499,7 @@ list_schedules = Liste des horaires
list_scripts = Scripts
list_sp_configs = Fournisseur de services
list_sp_configs = Service provider
loading = Chargement...
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:bw="http://www.scc.kit.edu/bwfacelets"
xmlns:p="http://primefaces.org/ui">
<head>
<title></title>
</head>
<body>
<ui:composition template="/template/default-admin.xhtml">
<ui:param name="title" value="#{messages.title}"/>
<ui:define name="content">
<h:form id="form">
<p:dataTable id="aaDataTable" var="entity" value="#{listAaConfigurationBean.aaList}">
<p:column>
<f:facet name="header">
<h:outputText value="#{messages.id}" />
</f:facet>
<h:outputText value="#{entity.id}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{messages.entity_id}" />
</f:facet>
<h:link outcome="show-aa-config.xhtml" value="#{entity.entityId}">
<f:param name="id" value="#{entity.id}"/>
</h:link>
</p:column>
</p:dataTable>
<h:link outcome="add-aa-config.xhtml" value="#{messages.add_aa_config}"/><br/>
</h:form>
</ui:define>
</ui:composition>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:bw="http://www.scc.kit.edu/bwfacelets"
xmlns:p="http://primefaces.org/ui">
<head>
<title></title>
</head>
<body>
<ui:composition template="/template/default-admin.xhtml">
<ui:param name="title" value="#{messages.title}"/>
<ui:define name="content">
<h:form id="form">
<p:dataTable id="idpDataTable" var="entity" value="#{listIdpConfigurationBean.idpList}">
<p:column>
<f:facet name="header">
<h:outputText value="#{messages.id}" />
</f:facet>
<h:outputText value="#{entity.id}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{messages.entity_id}" />
</f:facet>
<h:link outcome="show-idp-config.xhtml" value="#{entity.entityId}">
<f:param name="id" value="#{entity.id}"/>
</h:link>
</p:column>
</p:dataTable>
<h:link outcome="add-idp-config.xhtml" value="#{messages.add_idp_config}"/>
<p:dataTable id="spDataTable" var="entity" value="#{listIdpConfigurationBean.serviceSpList}">
<p:column>
<f:facet name="header">
<h:outputText value="#{messages.id}" />
</f:facet>
<h:link outcome="edit-saml-service-sp.xhtml" value="#{entity.id}">
<f:param name="id" value="#{entity.id}"/>
</h:link>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{messages.idp}" />
</f:facet>
<h:outputText value="#{(empty entity.idp.entityId ? 'All IDPs' : entity.idp.entityId)}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{messages.service}" />
</f:facet>
<h:outputText value="#{entity.service.name}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{messages.script}" />
</f:facet>
<h:outputText value="#{entity.script.name}" />
</p:column>
</p:dataTable>
</h:form>
</ui:define>
</ui:composition>
</body>
</html>
......@@ -35,43 +35,7 @@
</p:column>
</p:dataTable>
<p:dataTable id="aaDataTable" var="entity" value="#{listSamlConfigurationBean.aaList}">
<p:column>
<f:facet name="header">
<h:outputText value="#{messages.id}" />
</f:facet>
<h:outputText value="#{entity.id}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{messages.entity_id}" />
</f:facet>
<h:link outcome="show-aa-config.xhtml" value="#{entity.entityId}">
<f:param name="id" value="#{entity.id}"/>
</h:link>
</p:column>
</p:dataTable>
<p:dataTable id="idpDataTable" var="entity" value="#{listSamlConfigurationBean.idpList}">
<p:column>
<f:facet name="header">
<h:outputText value="#{messages.id}" />
</f:facet>
<h:outputText value="#{entity.id}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{messages.entity_id}" />
</f:facet>
<h:link outcome="show-idp-config.xhtml" value="#{entity.entityId}">
<f:param name="id" value="#{entity.id}"/>
</h:link>
</p:column>
</p:dataTable>
<h:link outcome="add-sp-config.xhtml" value="#{messages.add_sp_config}"/><br/>
<h:link outcome="add-aa-config.xhtml" value="#{messages.add_aa_config}"/><br/>
<h:link outcome="add-idp-config.xhtml" value="#{messages.add_idp_config}"/>
</h:form>
......
......@@ -100,6 +100,12 @@
<li><span class="ui-icon ui-icon-gear" style="display:inline-block; vertical-align: bottom;" />
<h:link outcome="#{request.contextPath}/admin/saml/list-sp-configs.xhtml" value="#{messages.list_sp_configs}" />
</li>
<li><span class="ui-icon ui-icon-gear" style="display:inline-block; vertical-align: bottom;" />
<h:link outcome="#{request.contextPath}/admin/saml/list-idp-configs.xhtml" value="#{messages.list_idp_configs}" />
</li>
<li><span class="ui-icon ui-icon-gear" style="display:inline-block; vertical-align: bottom;" />
<h:link outcome="#{request.contextPath}/admin/saml/list-aa-configs.xhtml" value="#{messages.list_aa_configs}" />
</li>
</ul>
</div>
</div>
......
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