1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.syncope.client.console.clientapps;
20
21 import java.util.List;
22 import org.apache.syncope.client.console.rest.ClientAppRestClient;
23 import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
24 import org.apache.syncope.common.lib.to.SAML2SPClientAppTO;
25 import org.apache.syncope.common.lib.types.AMEntitlement;
26 import org.apache.syncope.common.lib.types.ClientAppType;
27 import org.apache.wicket.PageReference;
28 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
29 import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
30 import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
31 import org.apache.wicket.model.StringResourceModel;
32
33 public class SAML2SPDirectoryPanel extends ClientAppDirectoryPanel<SAML2SPClientAppTO> {
34
35 private static final long serialVersionUID = 7724172966123776889L;
36
37 public SAML2SPDirectoryPanel(final String id, final ClientAppRestClient restClient, final PageReference pageRef) {
38 super(id, restClient, ClientAppType.SAML2SP, pageRef);
39
40 SAML2SPClientAppTO defaultItem = new SAML2SPClientAppTO();
41
42 addNewItemPanelBuilder(new ClientAppModalPanelBuilder<>(
43 ClientAppType.SAML2SP,
44 defaultItem,
45 modal,
46 policyRestClient,
47 clientAppRestClient,
48 realmRestClient,
49 pageRef),
50 true);
51 MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, AMEntitlement.CLIENTAPP_CREATE);
52
53 initResultTable();
54 }
55
56 @Override
57 protected void addCustomColumnFields(final List<IColumn<SAML2SPClientAppTO, String>> columns) {
58 columns.add(new PropertyColumn<>(new StringResourceModel("entityId", this), "entityId", "entityId"));
59 columns.add(new BooleanPropertyColumn<>(
60 new StringResourceModel("signAssertions", this), "signAssertions", "signAssertions"));
61 columns.add(new BooleanPropertyColumn<>(
62 new StringResourceModel("signResponses", this), "signResponses", "signResponses"));
63 columns.add(new BooleanPropertyColumn<>(
64 new StringResourceModel("encryptionOptional", this), "encryptionOptional", "encryptionOptional"));
65 columns.add(new BooleanPropertyColumn<>(
66 new StringResourceModel("encryptAssertions", this), "encryptAssertions", "encryptAssertions"));
67 columns.add(new PropertyColumn<>(
68 new StringResourceModel("requiredNameIdFormat", this), "requiredNameIdFormat", "requiredNameIdFormat"));
69 }
70 }