if ( ( kdcServerBean == null ) || kdcServerBean.isDisabled() )
{
return null;
}
KdcServer kdcServer = new KdcServer();
kdcServer.setDirectoryService( directoryService );
kdcServer.setEnabled( true );
kdcServer.setDirectoryService( directoryService );
// The ID
kdcServer.setServiceId( kdcServerBean.getServerId() );
// AllowableClockSkew
kdcServer.setAllowableClockSkew( kdcServerBean.getKrbAllowableClockSkew() );
// BodyChecksumVerified
kdcServer.setBodyChecksumVerified( kdcServerBean.isKrbBodyChecksumVerified() );
// CatalogBased
//kdcServer.setCatelogBased( kdcServerBean.is );
// EmptyAddressesAllowed
kdcServer.setEmptyAddressesAllowed( kdcServerBean.isKrbEmptyAddressesAllowed() );
// EncryptionType
EncryptionType[] encryptionTypes = createEncryptionTypes( kdcServerBean.getKrbEncryptionTypes() );
kdcServer.setEncryptionTypes( encryptionTypes );
// ForwardableAllowed
kdcServer.setForwardableAllowed( kdcServerBean.isKrbForwardableAllowed() );
// KdcPrincipal
kdcServer.setKdcPrincipal( kdcServerBean.getKrbKdcPrincipal().toString() );
// MaximumRenewableLifetime
kdcServer.setMaximumRenewableLifetime( kdcServerBean.getKrbMaximumRenewableLifetime() );
// MaximumTicketLifetime
kdcServer.setMaximumTicketLifetime( kdcServerBean.getKrbMaximumTicketLifetime() );
// PaEncTimestampRequired
kdcServer.setPaEncTimestampRequired( kdcServerBean.isKrbPaEncTimestampRequired() );
// PostdatedAllowed
kdcServer.setPostdatedAllowed( kdcServerBean.isKrbPostdatedAllowed() );
// PrimaryRealm
kdcServer.setPrimaryRealm( kdcServerBean.getKrbPrimaryRealm() );
// ProxiableAllowed
kdcServer.setProxiableAllowed( kdcServerBean.isKrbProxiableAllowed() );
// RenewableAllowed
kdcServer.setRenewableAllowed( kdcServerBean.isKrbRenewableAllowed() );
// searchBaseDn
kdcServer.setSearchBaseDn( kdcServerBean.getSearchBaseDn().getName() );
// The transports
Transport[] transports = createTransports( kdcServerBean.getTransports() );
kdcServer.setTransports( transports );
return kdcServer;
}