mirror of https://github.com/apache/archiva.git
[MRM-1718] ldap configuration editable with the ui.
start javascript model. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1414925 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
eef016b311
commit
7f89633fbc
|
@ -0,0 +1,173 @@
|
|||
package org.apache.archiva.admin.model.beans;
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Olivier Lamy
|
||||
* @since 1.4-M4
|
||||
*/
|
||||
@XmlRootElement ( name = "archivaLdapConfiguration" )
|
||||
public class ArchivaLdapConfiguration
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* The LDAP host.
|
||||
*/
|
||||
private String hostName;
|
||||
|
||||
/**
|
||||
* The LDAP port.
|
||||
*/
|
||||
private String port;
|
||||
|
||||
/**
|
||||
* ssl LDAP connection.
|
||||
*/
|
||||
private boolean ssl = false;
|
||||
|
||||
/**
|
||||
* The LDAP base dn.
|
||||
*/
|
||||
private String baseDn;
|
||||
|
||||
/**
|
||||
* contextFactory to use.
|
||||
*/
|
||||
private String contextFactory;
|
||||
|
||||
/**
|
||||
* The LDAP bind dn.
|
||||
*/
|
||||
private String bindDn;
|
||||
|
||||
/**
|
||||
* The LDAP password.
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* The LDAP authenticationMethod.
|
||||
*/
|
||||
private String authenticationMethod;
|
||||
|
||||
/**
|
||||
* Field extraProperties.
|
||||
*/
|
||||
private Map<String, String> extraProperties = new HashMap<String, String>();
|
||||
|
||||
public ArchivaLdapConfiguration()
|
||||
{
|
||||
// no op
|
||||
}
|
||||
|
||||
public String getHostName()
|
||||
{
|
||||
return hostName;
|
||||
}
|
||||
|
||||
public void setHostName( String hostName )
|
||||
{
|
||||
this.hostName = hostName;
|
||||
}
|
||||
|
||||
public String getPort()
|
||||
{
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPort( String port )
|
||||
{
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
public boolean isSsl()
|
||||
{
|
||||
return ssl;
|
||||
}
|
||||
|
||||
public void setSsl( boolean ssl )
|
||||
{
|
||||
this.ssl = ssl;
|
||||
}
|
||||
|
||||
public String getBaseDn()
|
||||
{
|
||||
return baseDn;
|
||||
}
|
||||
|
||||
public void setBaseDn( String baseDn )
|
||||
{
|
||||
this.baseDn = baseDn;
|
||||
}
|
||||
|
||||
public String getContextFactory()
|
||||
{
|
||||
return contextFactory;
|
||||
}
|
||||
|
||||
public void setContextFactory( String contextFactory )
|
||||
{
|
||||
this.contextFactory = contextFactory;
|
||||
}
|
||||
|
||||
public String getBindDn()
|
||||
{
|
||||
return bindDn;
|
||||
}
|
||||
|
||||
public void setBindDn( String bindDn )
|
||||
{
|
||||
this.bindDn = bindDn;
|
||||
}
|
||||
|
||||
public String getPassword()
|
||||
{
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword( String password )
|
||||
{
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getAuthenticationMethod()
|
||||
{
|
||||
return authenticationMethod;
|
||||
}
|
||||
|
||||
public void setAuthenticationMethod( String authenticationMethod )
|
||||
{
|
||||
this.authenticationMethod = authenticationMethod;
|
||||
}
|
||||
|
||||
public Map<String, String> getExtraProperties()
|
||||
{
|
||||
return extraProperties;
|
||||
}
|
||||
|
||||
public void setExtraProperties( Map<String, String> extraProperties )
|
||||
{
|
||||
this.extraProperties = extraProperties;
|
||||
}
|
||||
}
|
|
@ -25,12 +25,14 @@ import java.io.Serializable;
|
|||
* @author Olivier Lamy
|
||||
* @since 1.4-M4
|
||||
*/
|
||||
@XmlRootElement ( name = "archivaRuntimeConfiguration" )
|
||||
@XmlRootElement (name = "archivaRuntimeConfiguration")
|
||||
public class ArchivaRuntimeConfiguration
|
||||
implements Serializable
|
||||
{
|
||||
private String userManagerImpl = "jdo";
|
||||
|
||||
private ArchivaLdapConfiguration archivaLdapConfiguration;
|
||||
|
||||
public ArchivaRuntimeConfiguration()
|
||||
{
|
||||
// no op
|
||||
|
@ -45,4 +47,14 @@ public class ArchivaRuntimeConfiguration
|
|||
{
|
||||
this.userManagerImpl = userManagerImpl;
|
||||
}
|
||||
|
||||
public ArchivaLdapConfiguration getArchivaLdapConfiguration()
|
||||
{
|
||||
return archivaLdapConfiguration;
|
||||
}
|
||||
|
||||
public void setArchivaLdapConfiguration( ArchivaLdapConfiguration archivaLdapConfiguration )
|
||||
{
|
||||
this.archivaLdapConfiguration = archivaLdapConfiguration;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1151,8 +1151,39 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
|
|||
}
|
||||
|
||||
|
||||
ArchivaRuntimeConfiguration=function(userManagerImpl){
|
||||
ArchivaRuntimeConfiguration=function(userManagerImpl,archivaLdapConfiguration){
|
||||
this.userManagerImpl=ko.observable(userManagerImpl);
|
||||
this.archivaLdapConfiguration=ko.observable(archivaLdapConfiguration);
|
||||
}
|
||||
|
||||
ArchivaLdapConfiguration=function(hostName,port,ssl,baseDn,contextFactory,bindDn,password,authenticationMethod,
|
||||
extraProperties){
|
||||
//private String hostName;
|
||||
this.hostName=ko.observable(hostName);
|
||||
|
||||
//private String port;
|
||||
this.port=ko.observable(port);
|
||||
|
||||
//private boolean ssl = false;
|
||||
this.ssl=ko.observable(ssl);
|
||||
|
||||
//private String baseDn;
|
||||
this.baseDn=ko.observable(baseDn);
|
||||
|
||||
//private String contextFactory;
|
||||
this.contextFactory=ko.observable(contextFactory);
|
||||
|
||||
//private String bindDn;
|
||||
this.bindDn=ko.observable(bindDn);
|
||||
|
||||
//private String password;
|
||||
this.password=ko.observable(password);
|
||||
|
||||
//private String authenticationMethod;
|
||||
this.authenticationMethod=ko.observable(authenticationMethod);
|
||||
|
||||
//private Map<String, String> extraProperties = new HashMap<String, String>();
|
||||
this.extraProperties=ko.observableArray(extraProperties);
|
||||
}
|
||||
|
||||
ArchivaRuntimeConfigurationViewModel=function(archivaRuntimeConfiguration,userManagerImplementationInformations){
|
||||
|
|
Loading…
Reference in New Issue