HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2017-10-04 9dd25448d8b43df9ac96e76017b17bbe28ab0e1a
remove legacy code pac dw/sw
14 files modified
1 files deleted
326 ■■■■■ changed files
hsarback/src/de/hsadmin/hostsharing/BasePacType.java 2 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/db/MySqlDatabaseModuleImpl.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/db/MySqlUserModuleImpl.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/db/PgSqlDatabaseModuleImpl.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/db/PgSqlUserModuleImpl.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainModuleImpl.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/email/EMailAddressModuleImpl.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/email/EMailAliasModuleImpl.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java 4 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java 6 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/user/UnixUserModuleImpl.java 2 ●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/ContinuousIntegrationTest.java 1 ●●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/PacMigrationTest.java 294 ●●●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/RemoteTest.java 1 ●●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/SSLCertDomainTest.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/hostsharing/BasePacType.java
@@ -2,8 +2,6 @@
public class BasePacType {
    public static final String PAC_DW = "PAC/DW";
    public static final String PAC_SW = "PAC/SW";
    public static final String PAC_WEB = "PAC/WEB";
    public static final String PAC_SRV = "SRV/MGD";
hsarback/src/de/hsadmin/mods/db/MySqlDatabaseModuleImpl.java
@@ -58,7 +58,7 @@
        }
        //TODO: Needs better implementation
        String pacType = pac.getBasepac().getName();
        if (!pacType.equals(BasePacType.PAC_WEB) && !pacType.equals(BasePacType.PAC_DW)) {
        if (!pacType.equals(BasePacType.PAC_WEB)) {
            throw new HSAdminException("not allowed for this packet type");
        }        
        //TODO: Needs better implementation
hsarback/src/de/hsadmin/mods/db/MySqlUserModuleImpl.java
@@ -39,7 +39,7 @@
        }
        //TODO: Needs better implementation
        String pacType = pac.getBasepac().getName();
        if (!pacType.equals(BasePacType.PAC_WEB) && !pacType.equals(BasePacType.PAC_DW)) {
        if (!pacType.equals(BasePacType.PAC_WEB)) {
            throw new HSAdminException("not allowed for this packet type");
        }        
        //TODO: Needs better implementation
hsarback/src/de/hsadmin/mods/db/PgSqlDatabaseModuleImpl.java
@@ -57,7 +57,7 @@
        }
        //TODO: Needs better implementation
        String pacType = pac.getBasepac().getName();
        if (!pacType.equals(BasePacType.PAC_WEB) && !pacType.equals(BasePacType.PAC_DW)) {
        if (!pacType.equals(BasePacType.PAC_WEB)) {
            throw new HSAdminException("not allowed for this packet type");
        }        
        //TODO: Needs better implementation
hsarback/src/de/hsadmin/mods/db/PgSqlUserModuleImpl.java
@@ -34,7 +34,7 @@
        }
        //TODO: Needs better implementation
        String pacType = pac.getBasepac().getName();
        if (!pacType.equals(BasePacType.PAC_WEB) && !pacType.equals(BasePacType.PAC_DW)) {
        if (!pacType.equals(BasePacType.PAC_WEB)) {
            throw new HSAdminException("not allowed for this packet type");
        }        
        //TODO: Needs better implementation
hsarback/src/de/hsadmin/mods/dom/DomainModuleImpl.java
@@ -127,7 +127,7 @@
        //TODO: Needs better implementation
        final Pac pac = admin.getPac();
        String pacType = pac.getBasepac().getName();
        if (!pacType.equals(BasePacType.PAC_WEB) && !pacType.equals(BasePacType.PAC_DW) && !pacType.equals(BasePacType.PAC_SW)) {
        if (!pacType.equals(BasePacType.PAC_WEB)) {
            throw new HSAdminException("not allowed for this packet type");
        }
        final String hiveName = pac.getHive().getHiveName();
hsarback/src/de/hsadmin/mods/email/EMailAddressModuleImpl.java
@@ -57,7 +57,7 @@
        }
        //TODO: Needs better implementation
        String pacType = dom.getUser().getPac().getBasepac().getName();
        if (!pacType.equals(BasePacType.PAC_WEB) && !pacType.equals(BasePacType.PAC_DW) && !pacType.equals(BasePacType.PAC_SW)) {
        if (!pacType.equals(BasePacType.PAC_WEB)) {
            throw new HSAdminException("not allowed for this packet type");
        }        
        //TODO: Needs better implementation
hsarback/src/de/hsadmin/mods/email/EMailAliasModuleImpl.java
@@ -48,7 +48,7 @@
        }
        //TODO: Needs better implementation
        String pacType = pac.getBasepac().getName();
        if (!pacType.equals(BasePacType.PAC_WEB) && !pacType.equals(BasePacType.PAC_DW) && !pacType.equals(BasePacType.PAC_SW)) {
        if (!pacType.equals(BasePacType.PAC_WEB)) {
            throw new HSAdminException("not allowed for this packet type");
        }        
        //TODO: Needs better implementation
hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java
@@ -95,7 +95,7 @@
        pac.setPacComponents(pacComponents);
        AbstractEntity newPacEntity = null;
        String pacType = pac.getBasepac().getName();
        if (pacType.equals(BasePacType.PAC_WEB) || pacType.equals(BasePacType.PAC_DW) || pacType.equals(BasePacType.PAC_SW)) {
        if (pacType.equals(BasePacType.PAC_WEB)) {
            Set<UnixUser> users = new HashSet<UnixUser>();
            pac.setUnixUser(users);
            UnixUser admin = new UnixUser();
@@ -201,7 +201,7 @@
            throw new AuthorisationException(getTransaction().getLoginUser(), "delete", existingEntity);
        }
        String pacType = pac.getBasepac().getName();
        if (pacType.equals(BasePacType.PAC_WEB) || pacType.equals(BasePacType.PAC_DW) || pacType.equals(BasePacType.PAC_SW)) {
        if (pacType.equals(BasePacType.PAC_WEB)) {
            GenericModuleImpl helperModule = new GenericModuleImpl(getTransaction());
            String[] dependQueries = new String[] {
hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
@@ -27,7 +27,7 @@
            EntityManager em, T entity) throws ProcessorException {
        Pac pac = (Pac) entity;
        String basepacName = pac.getBasepac().getName();
        if (basepacName.equals(BasePacType.PAC_WEB) || basepacName.equals(BasePacType.PAC_DW) || basepacName.equals(BasePacType.PAC_SW)) {
        if (basepacName.equals(BasePacType.PAC_WEB)) {
            String pacName = pac.getName();
            Hive hive = pac.getHive();
            UnixUser unixUser = getPacAdminUser(pac);
@@ -54,7 +54,7 @@
            throws ProcessorException {
        Pac pac = (Pac) entity;
        String basepacName = pac.getBasepac().getName();
        if (basepacName.equals(BasePacType.PAC_WEB) || basepacName.equals(BasePacType.PAC_DW) || basepacName.equals(BasePacType.PAC_SW)) {
        if (basepacName.equals(BasePacType.PAC_WEB)) {
            return createSetQuotaProc(pac);
        } else {
            return new NullProcessor();
@@ -65,7 +65,7 @@
    public <T extends AbstractEntity> Processor createDeleteProcessor(EntityManager em, T entity) throws ProcessorException {
        Pac pac = (Pac) entity;
        String basepacName = pac.getBasepac().getName();
        if (basepacName.equals(BasePacType.PAC_WEB) || basepacName.equals(BasePacType.PAC_DW) || basepacName.equals(BasePacType.PAC_SW)) {
        if (basepacName.equals(BasePacType.PAC_WEB)) {
            Hive hive = pac.getHive();
            hive.getPacs().remove(pac); 
            WaitingTasksProcessor waiting = new WaitingTasksProcessor(createDelUserProc(pac.getName()));
hsarback/src/de/hsadmin/mods/user/UnixUserModuleImpl.java
@@ -129,7 +129,7 @@
        }
        //TODO: Needs better implementation
        String pacType = pac.getBasepac().getName();
        if (!pacType.equals(BasePacType.PAC_WEB) && !pacType.equals(BasePacType.PAC_DW) && !pacType.equals(BasePacType.PAC_SW)) {
        if (!pacType.equals(BasePacType.PAC_WEB)) {
            throw new HSAdminException("not allowed for this packet type");
        }        
        //TODO: Needs better implementation
hsarback/test/de/hsadmin/remote/ContinuousIntegrationTest.java
@@ -19,7 +19,6 @@
    EMailAddressTest.class,
    SSLCertDomainTest.class,
    DatabaseCleanTest.class,
    PacMigrationTest.class,
    CustomerTest.class
//    LongCustomerNameTest.class,
//    QueueTaskTest.class
hsarback/test/de/hsadmin/remote/PacMigrationTest.java
File was deleted
hsarback/test/de/hsadmin/remote/RemoteTest.java
@@ -18,7 +18,6 @@
    DomainDeleteTest.class,
    EMailAddressTest.class,
    DatabaseCleanTest.class,
    PacMigrationTest.class,
    CustomerTest.class
//  LongCustomerNameTest.class    
//    QueueTaskTest.class
hsarback/test/de/hsadmin/remote/SSLCertDomainTest.java
@@ -79,7 +79,7 @@
        setParams.put("name", "aaa03");
        setParams.put("hive", "h99");
        setParams.put("customer", config.getProperty("accountprefix.customer") + "-aaa");
        setParams.put("basepac", BasePacType.PAC_DW);
        setParams.put("basepac", BasePacType.PAC_WEB);
        setParams.put("curinetaddr", "176.9.242.78");
        Object[] params = new Object[] { user, 
                cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),