Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
reg-app
Regapp
Commits
df1986d5
Commit
df1986d5
authored
Feb 02, 2015
by
michael.simon
Browse files
Changes on admin interface
parent
fb9e754a
Changes
6
Hide whitespace changes
Inline
Side-by-side
bwreg-service/src/main/java/edu/kit/scc/webreg/service/SamlAAMetadataService.java
0 → 100644
View file @
df1986d5
/*******************************************************************************
* 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
java.util.List
;
import
edu.kit.scc.webreg.entity.FederationEntity
;
import
edu.kit.scc.webreg.entity.SamlAAMetadataEntity
;
import
edu.kit.scc.webreg.entity.SamlMetadataEntityStatus
;
public
interface
SamlAAMetadataService
extends
BaseService
<
SamlAAMetadataEntity
,
Long
>
{
List
<
SamlAAMetadataEntity
>
findAllByFederation
(
FederationEntity
federation
);
List
<
SamlAAMetadataEntity
>
findAllByFederationOrderByOrgname
(
FederationEntity
federation
);
SamlAAMetadataEntity
findByEntityId
(
String
entityId
);
SamlAAMetadataEntity
findByScope
(
String
scope
);
SamlAAMetadataEntity
findByIdWithAll
(
Long
id
);
List
<
SamlAAMetadataEntity
>
findAllByStatusOrderedByOrgname
(
SamlMetadataEntityStatus
status
);
}
bwreg-service/src/main/java/edu/kit/scc/webreg/service/SamlSpMetadataService.java
0 → 100644
View file @
df1986d5
/*******************************************************************************
* 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
java.util.List
;
import
edu.kit.scc.webreg.entity.FederationEntity
;
import
edu.kit.scc.webreg.entity.SamlMetadataEntityStatus
;
import
edu.kit.scc.webreg.entity.SamlSpMetadataEntity
;
public
interface
SamlSpMetadataService
extends
BaseService
<
SamlSpMetadataEntity
,
Long
>
{
List
<
SamlSpMetadataEntity
>
findAllByFederation
(
FederationEntity
federation
);
List
<
SamlSpMetadataEntity
>
findAllByFederationOrderByOrgname
(
FederationEntity
federation
);
SamlSpMetadataEntity
findByEntityId
(
String
entityId
);
SamlSpMetadataEntity
findByScope
(
String
scope
);
SamlSpMetadataEntity
findByIdWithAll
(
Long
id
);
List
<
SamlSpMetadataEntity
>
findAllByStatusOrderedByOrgname
(
SamlMetadataEntityStatus
status
);
}
bwreg-service/src/main/java/edu/kit/scc/webreg/service/impl/SamlAAMetadataServiceImpl.java
0 → 100644
View file @
df1986d5
/*******************************************************************************
* 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
java.util.List
;
import
javax.ejb.Stateless
;
import
javax.inject.Inject
;
import
edu.kit.scc.webreg.dao.BaseDao
;
import
edu.kit.scc.webreg.dao.SamlAAMetadataDao
;
import
edu.kit.scc.webreg.entity.FederationEntity
;
import
edu.kit.scc.webreg.entity.SamlAAMetadataEntity
;
import
edu.kit.scc.webreg.entity.SamlMetadataEntityStatus
;
import
edu.kit.scc.webreg.service.SamlAAMetadataService
;
@Stateless
public
class
SamlAAMetadataServiceImpl
extends
BaseServiceImpl
<
SamlAAMetadataEntity
,
Long
>
implements
SamlAAMetadataService
{
private
static
final
long
serialVersionUID
=
1L
;
@Inject
private
SamlAAMetadataDao
dao
;
@Override
public
List
<
SamlAAMetadataEntity
>
findAllByFederation
(
FederationEntity
federation
)
{
return
dao
.
findAllByFederation
(
federation
);
}
@Override
public
List
<
SamlAAMetadataEntity
>
findAllByStatusOrderedByOrgname
(
SamlMetadataEntityStatus
status
)
{
return
dao
.
findAllByStatusOrderedByOrgname
(
status
);
}
@Override
public
SamlAAMetadataEntity
findByIdWithAll
(
Long
id
)
{
SamlAAMetadataEntity
aa
=
dao
.
findByIdWithAll
(
id
);
if
(
aa
!=
null
)
aa
.
getEntityDescriptor
();
return
aa
;
}
@Override
public
SamlAAMetadataEntity
findByEntityId
(
String
entityId
)
{
return
dao
.
findByEntityId
(
entityId
);
}
@Override
public
List
<
SamlAAMetadataEntity
>
findAllByFederationOrderByOrgname
(
FederationEntity
federation
)
{
return
dao
.
findAllByFederationOrderByOrgname
(
federation
);
}
@Override
public
SamlAAMetadataEntity
findByScope
(
String
scope
)
{
return
dao
.
findByScope
(
scope
);
}
@Override
protected
BaseDao
<
SamlAAMetadataEntity
,
Long
>
getDao
()
{
return
dao
;
}
}
bwreg-service/src/main/java/edu/kit/scc/webreg/service/impl/SamlSpMetadataServiceImpl.java
0 → 100644
View file @
df1986d5
/*******************************************************************************
* 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
java.util.List
;
import
javax.ejb.Stateless
;
import
javax.inject.Inject
;
import
edu.kit.scc.webreg.dao.BaseDao
;
import
edu.kit.scc.webreg.dao.SamlSpMetadataDao
;
import
edu.kit.scc.webreg.entity.FederationEntity
;
import
edu.kit.scc.webreg.entity.SamlMetadataEntityStatus
;
import
edu.kit.scc.webreg.entity.SamlSpMetadataEntity
;
import
edu.kit.scc.webreg.service.SamlSpMetadataService
;
@Stateless
public
class
SamlSpMetadataServiceImpl
extends
BaseServiceImpl
<
SamlSpMetadataEntity
,
Long
>
implements
SamlSpMetadataService
{
private
static
final
long
serialVersionUID
=
1L
;
@Inject
private
SamlSpMetadataDao
dao
;
@Override
public
List
<
SamlSpMetadataEntity
>
findAllByFederation
(
FederationEntity
federation
)
{
return
dao
.
findAllByFederation
(
federation
);
}
@Override
public
List
<
SamlSpMetadataEntity
>
findAllByStatusOrderedByOrgname
(
SamlMetadataEntityStatus
status
)
{
return
dao
.
findAllByStatusOrderedByOrgname
(
status
);
}
@Override
public
SamlSpMetadataEntity
findByIdWithAll
(
Long
id
)
{
SamlSpMetadataEntity
sp
=
dao
.
findByIdWithAll
(
id
);
if
(
sp
!=
null
)
sp
.
getEntityDescriptor
();
return
sp
;
}
@Override
public
SamlSpMetadataEntity
findByEntityId
(
String
entityId
)
{
return
dao
.
findByEntityId
(
entityId
);
}
@Override
public
List
<
SamlSpMetadataEntity
>
findAllByFederationOrderByOrgname
(
FederationEntity
federation
)
{
return
dao
.
findAllByFederationOrderByOrgname
(
federation
);
}
@Override
public
SamlSpMetadataEntity
findByScope
(
String
scope
)
{
return
dao
.
findByScope
(
scope
);
}
@Override
protected
BaseDao
<
SamlSpMetadataEntity
,
Long
>
getDao
()
{
return
dao
;
}
}
bwreg-webapp/src/main/java/edu/kit/scc/webreg/bean/admin/saml/ShowFederationBean.java
View file @
df1986d5
...
...
@@ -18,13 +18,14 @@ import javax.faces.bean.ViewScoped;
import
javax.faces.event.ComponentSystemEvent
;
import
javax.inject.Inject
;
import
org.slf4j.Logger
;
import
edu.kit.scc.webreg.entity.FederationEntity
;
import
edu.kit.scc.webreg.entity.SamlAAMetadataEntity
;
import
edu.kit.scc.webreg.entity.SamlIdpMetadataEntity
;
import
edu.kit.scc.webreg.entity.SamlSpMetadataEntity
;
import
edu.kit.scc.webreg.service.FederationService
;
import
edu.kit.scc.webreg.service.SamlAAMetadataService
;
import
edu.kit.scc.webreg.service.SamlIdpMetadataService
;
import
edu.kit.scc.webreg.service.
s
aml
.
Metadata
Helper
;
import
edu.kit.scc.webreg.service.
S
aml
Sp
Metadata
Service
;
@ManagedBean
@ViewScoped
...
...
@@ -32,29 +33,33 @@ public class ShowFederationBean implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
@Inject
private
Logger
logger
;
@Inject
private
FederationService
service
;
@Inject
private
SamlIdpMetadataService
idpService
;
@Inject
private
SamlSpMetadataService
spService
;
@Inject
private
SamlAAMetadataService
aaService
;
private
FederationEntity
entity
;
private
List
<
SamlIdpMetadataEntity
>
idpList
;
private
List
<
SamlSpMetadataEntity
>
spList
;
private
List
<
SamlAAMetadataEntity
>
aaList
;
private
Long
id
;
@Inject
private
MetadataHelper
metadataHelper
;
public
void
preRenderView
(
ComponentSystemEvent
ev
)
{
if
(
entity
==
null
)
{
entity
=
service
.
findWithIdpEntities
(
id
);
}
idpList
=
idpService
.
findAllByFederation
(
entity
);
spList
=
spService
.
findAllByFederation
(
entity
);
aaList
=
aaService
.
findAllByFederation
(
entity
);
}
public
void
poll
()
{
...
...
@@ -84,4 +89,12 @@ public class ShowFederationBean implements Serializable {
public
void
setIdpList
(
List
<
SamlIdpMetadataEntity
>
idpList
)
{
this
.
idpList
=
idpList
;
}
public
List
<
SamlSpMetadataEntity
>
getSpList
()
{
return
spList
;
}
public
List
<
SamlAAMetadataEntity
>
getAaList
()
{
return
aaList
;
}
}
bwreg-webapp/src/main/webapp/admin/saml/show-federation.xhtml
View file @
df1986d5
...
...
@@ -60,7 +60,7 @@
</div>
<div
id=
"panelInline"
>
<div
id=
"panelInline"
style=
"margin-top: 8px;"
>
<p:panel
header=
"#{messages.idp_entities}"
>
<p:dataTable
id=
"idpTable"
var=
"idp"
value=
"#{showFederationBean.idpList}"
>
<p:column>
...
...
@@ -87,6 +87,60 @@
</p:panel>
</div>
<div
id=
"panelInline"
style=
"margin-top: 8px;"
>
<p:panel
header=
"#{messages.sp_entities}"
>
<p:dataTable
id=
"spTable"
var=
"idp"
value=
"#{showFederationBean.spList}"
>
<p:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{messages.id}"
/>
</f:facet>
<h:outputText
value=
"#{idp.id}"
/>
</p:column>
<p:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{messages.entity_id}"
/>
</f:facet>
<h:link
outcome=
"show-idp.xhtml"
value=
"#{idp.entityId}"
>
<f:param
name=
"id"
value=
"#{idp.id}"
/>
</h:link>
</p:column>
<p:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{messages.org_name}"
/>
</f:facet>
<h:outputText
value=
"#{idp.orgName}"
/>
</p:column>
</p:dataTable>
</p:panel>
</div>
<div
id=
"panelInline"
style=
"margin-top: 8px;"
>
<p:panel
header=
"#{messages.aa_entities}"
>
<p:dataTable
id=
"aaTable"
var=
"idp"
value=
"#{showFederationBean.aaList}"
>
<p:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{messages.id}"
/>
</f:facet>
<h:outputText
value=
"#{idp.id}"
/>
</p:column>
<p:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{messages.entity_id}"
/>
</f:facet>
<h:link
outcome=
"show-idp.xhtml"
value=
"#{idp.entityId}"
>
<f:param
name=
"id"
value=
"#{idp.id}"
/>
</h:link>
</p:column>
<p:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{messages.org_name}"
/>
</f:facet>
<h:outputText
value=
"#{idp.orgName}"
/>
</p:column>
</p:dataTable>
</p:panel>
</div>
</h:form>
</ui:define>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment