create pac-domain
This commit is contained in:
parent
9dcd7d8468
commit
c010faacc1
@ -11,10 +11,12 @@ import javax.persistence.Query;
|
|||||||
import de.hsadmin.core.model.AbstractEntity;
|
import de.hsadmin.core.model.AbstractEntity;
|
||||||
import de.hsadmin.core.model.AbstractModuleImpl;
|
import de.hsadmin.core.model.AbstractModuleImpl;
|
||||||
import de.hsadmin.core.model.AuthorisationException;
|
import de.hsadmin.core.model.AuthorisationException;
|
||||||
|
import de.hsadmin.core.model.GenericModuleImpl;
|
||||||
import de.hsadmin.core.model.HSAdminException;
|
import de.hsadmin.core.model.HSAdminException;
|
||||||
import de.hsadmin.core.util.TextUtil;
|
import de.hsadmin.core.util.TextUtil;
|
||||||
import de.hsadmin.mods.cust.Contact;
|
import de.hsadmin.mods.cust.Contact;
|
||||||
import de.hsadmin.mods.cust.Customer;
|
import de.hsadmin.mods.cust.Customer;
|
||||||
|
import de.hsadmin.mods.dom.Domain;
|
||||||
import de.hsadmin.mods.user.UnixUser;
|
import de.hsadmin.mods.user.UnixUser;
|
||||||
|
|
||||||
public class PacModuleImpl extends AbstractModuleImpl {
|
public class PacModuleImpl extends AbstractModuleImpl {
|
||||||
@ -98,6 +100,11 @@ public class PacModuleImpl extends AbstractModuleImpl {
|
|||||||
if (maxUid >= nUID) nUID = maxUid + 1;
|
if (maxUid >= nUID) nUID = maxUid + 1;
|
||||||
admin.setUserId(nUID);
|
admin.setUserId(nUID);
|
||||||
users.add(admin);
|
users.add(admin);
|
||||||
|
GenericModuleImpl helperModule = new GenericModuleImpl(getTransaction());
|
||||||
|
Domain pacDomain = new Domain();
|
||||||
|
pacDomain.setName(pac.getName() + ".hostsharing.net");
|
||||||
|
pacDomain.setUser(admin);
|
||||||
|
helperModule.add(pacDomain);
|
||||||
return super.add(newEntity);
|
return super.add(newEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user