/*
 * $Id: VKCLdapServer.java,v 1.7 2004/11/23 14:55:52 jonyp Exp $
 *
 * Copyright (c) Siemens AG 2008 
 *           (c) Universität Paderborn 2008 
 * Licensed under EUPL 1.1. 
 *
 * $Log: VKCLdapServer.java,v $
 * Revision 1.7  2004/11/23 14:55:52  jonyp
 * isAlive ==> getIsAlive
 *
 * Revision 1.6  2004/11/23 14:41:22  jonyp
 * + isAlive
 *
 * Revision 1.5  2004/10/25 09:58:55  jonyp
 * added creator/changer methods
 *
 * Revision 1.4  2004/10/22 15:25:57  jonyp
 * *** empty log message ***
 *
 * Revision 1.3  2004/10/21 13:24:07  vchris
 * Update für neue LDAP Funktionalitäten
 *
 * Revision 1.2  2004/10/14 15:08:35  jonyp
 * added description field
 *
 * Revision 1.1  2004/10/07 14:40:46  jonyp
 * first strike
 *
 */
package vkc.ldap.db.entities;

import java.sql.Timestamp;

/**
 * Diese Klasse einen Eintrag in der LDAP-Group-Tabelle
 *
 */
public final class VKCLdapServer  {    
    
    private Integer ldapServerId;
	private String  ldapServerURL;
	private String  description;
	private String  baseDN;
	private String  authMethod;
	private String  usersBaseRDN;
	private String  groupsBaseRDN;
	private String  mapping_loginattr; 
	private String  mapping_email;                 
	private String  mapping_userid; 
	private String  mapping_fullname;
	private String  mapping_language;
	private Integer creatorId;
	private Timestamp created;
	private Integer lastChangerId;
	private Timestamp lastChanged;
	private boolean isAlive = false;
	
	private boolean enabled;

    /**
     * Creates a new VKCLdapServer object.
     */
    public VKCLdapServer() {
    }

    public String getAuthMethod() {
        return authMethod;
    }

    public void setAuthMethod(String authMethod) {
        this.authMethod = authMethod;
    }

    public String getBaseDN() {
        return baseDN;
    }

    public void setBaseDN(String baseDN) {
        this.baseDN = baseDN;
    }

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public Integer getLdapServerId() {
        return ldapServerId;
    }

    public void setLdapServerId(Integer ldapServerId) {
        this.ldapServerId = ldapServerId;
    }

    public String getLdapServerURL() {
        return ldapServerURL;
    }

    public void setLdapServerURL(String ldapServerURL) {
        this.ldapServerURL = ldapServerURL;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
    
    public String getDisplayName() {
        return description + " (" + ldapServerURL + ")";
    }
    
    public String getGroupsBaseRDN() {
        return groupsBaseRDN;
    }

    public void setGroupsBaseRDN(String groupsBaseRDN) {
        this.groupsBaseRDN = groupsBaseRDN;
    }

    public String getMapping_email() {
        return mapping_email;
    }

    public void setMapping_email(String mapping_email) {
        this.mapping_email = mapping_email;
    }

    public String getMapping_loginattr() {
        return mapping_loginattr;
    }

    public void setMapping_loginattr(String mapping_loginattr) {
        this.mapping_loginattr = mapping_loginattr;
    }

    public String getMapping_fullname() {
        return mapping_fullname;
    }

    public void setMapping_fullname(String mapping_fullname) {
        this.mapping_fullname = mapping_fullname;
    }

    public String getMapping_userid() {
        return mapping_userid;
    }

    public void setMapping_userid(String mapping_userid) {
        this.mapping_userid = mapping_userid;
    }

    public String getUsersBaseRDN() {
        return usersBaseRDN;
    }

    public void setUsersBaseRDN(String usersBaseRDN) {
        this.usersBaseRDN = usersBaseRDN;
    }    
   
    public String getMapping_language() {
        return mapping_language;
    }

    public void setMapping_language(String mapping_language) {
        this.mapping_language = mapping_language;
    }

    public Timestamp getCreated() {
        return created;
    }

    public void setCreated(Timestamp created) {
        this.created = created;
    }

    public Integer getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(Integer creatorId) {
        this.creatorId = creatorId;
    }

    public Timestamp getLastChanged() {
        return lastChanged;
    }

    public void setLastChanged(Timestamp lastChanged) {
        this.lastChanged = lastChanged;
    }

    public Integer getLastChangerId() {
        return lastChangerId;
    }

    public void setLastChangerId(Integer lastChangerId) {
        this.lastChangerId = lastChangerId;
    }
    
    public boolean getIsAlive() {
        // preliminary !!!
        this.isAlive = true;
        return this.isAlive;
    }
}