All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
pl.edu.icm.unity.home.console.HomeServiceEditor Maven / Gradle / Ivy
/*
* Copyright (c) 2019 Bixbit - Krzysztof Benedyczak. All rights reserved.
* See LICENCE.txt file for licensing information.
*/
package pl.edu.icm.unity.home.console;
import java.util.List;
import java.util.Set;
import pl.edu.icm.unity.MessageSource;
import pl.edu.icm.unity.engine.api.authn.AuthenticatorSupportService;
import pl.edu.icm.unity.engine.api.config.UnityServerConfiguration;
import pl.edu.icm.unity.engine.api.files.FileStorageService;
import pl.edu.icm.unity.engine.api.files.URIAccessService;
import pl.edu.icm.unity.home.UserHomeEndpointFactory;
import pl.edu.icm.unity.types.authn.AuthenticationFlowDefinition;
import pl.edu.icm.unity.types.authn.AuthenticatorInfo;
import pl.edu.icm.unity.types.basic.Group;
import pl.edu.icm.unity.webui.common.FormValidationException;
import pl.edu.icm.unity.webui.common.file.ImageAccessService;
import pl.edu.icm.unity.webui.console.services.DefaultServiceDefinition;
import pl.edu.icm.unity.webui.console.services.ServiceDefinition;
import pl.edu.icm.unity.webui.console.services.ServiceEditor;
import pl.edu.icm.unity.webui.console.services.ServiceEditorComponent;
import pl.edu.icm.unity.webui.console.services.tabs.WebServiceAuthenticationTab;
class HomeServiceEditor implements ServiceEditor
{
private MessageSource msg;
private List allRealms;
private List flows;
private List authenticators;
private HomeServiceEditorComponent editor;
private String extraTab;
private List allAttributes;
private List allGroups;
private List upManServices;
private List enquiryForms;
private List registrationForms;
private URIAccessService uriAccessService;
private FileStorageService fileStorageService;
private UnityServerConfiguration serverConfig;
private AuthenticatorSupportService authenticatorSupportService;
private List usedEndpointsPaths;
private Set serverContextPaths;
private ImageAccessService imageAccessService;
HomeServiceEditor(MessageSource msg, URIAccessService uriAccessService,
ImageAccessService imageAccessService,
FileStorageService fileStorageService, UnityServerConfiguration serverConfig,
List allRealms, List flows,
List authenticators, String extraTab, List allAttributes,
List allGroups, List upManServices, List enquiryForms,
List registrationForms, List usedPaths, Set serverContextPaths,
AuthenticatorSupportService authenticatorSupportService)
{
this.msg = msg;
this.imageAccessService = imageAccessService;
this.allRealms = allRealms;
this.authenticators = authenticators;
this.flows = flows;
this.extraTab = extraTab;
this.allAttributes = allAttributes;
this.allGroups = allGroups;
this.upManServices = upManServices;
this.enquiryForms = enquiryForms;
this.registrationForms = registrationForms;
this.uriAccessService = uriAccessService;
this.fileStorageService = fileStorageService;
this.serverConfig = serverConfig;
this.authenticatorSupportService = authenticatorSupportService;
this.usedEndpointsPaths = usedPaths;
this.serverContextPaths = serverContextPaths;
}
@Override
public ServiceEditorComponent getEditor(ServiceDefinition endpoint)
{
HomeServiceEditorGeneralTab homeServiceEditorGeneralTab = new HomeServiceEditorGeneralTab(msg,
UserHomeEndpointFactory.TYPE, usedEndpointsPaths, serverContextPaths, extraTab, allAttributes, allGroups,
upManServices, enquiryForms, registrationForms);
WebServiceAuthenticationTab authenticationTab = new WebServiceAuthenticationTab(msg, uriAccessService,
serverConfig, authenticatorSupportService, flows, authenticators, allRealms,
registrationForms, UserHomeEndpointFactory.TYPE.getSupportedBinding());
editor = new HomeServiceEditorComponent(msg, homeServiceEditorGeneralTab, authenticationTab,
imageAccessService, fileStorageService, serverConfig, (DefaultServiceDefinition) endpoint,
extraTab, allGroups);
return editor;
}
@Override
public ServiceDefinition getEndpointDefiniton() throws FormValidationException
{
return editor.getServiceDefiniton();
}
}