remove legacy code pac dw/sw
1 files deleted
14 files modified
| | |
| | | |
| | | 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"; |
| | | |
| | |
| | | } |
| | | //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 |
| | |
| | | } |
| | | //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 |
| | |
| | | } |
| | | //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 |
| | |
| | | } |
| | | //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 |
| | |
| | | //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(); |
| | |
| | | } |
| | | //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 |
| | |
| | | } |
| | | //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 |
| | |
| | | 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(); |
| | |
| | | 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[] { |
| | |
| | | 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); |
| | |
| | | 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(); |
| | |
| | | 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())); |
| | |
| | | } |
| | | //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 |
| | |
| | | EMailAddressTest.class, |
| | | SSLCertDomainTest.class, |
| | | DatabaseCleanTest.class, |
| | | PacMigrationTest.class, |
| | | CustomerTest.class |
| | | // LongCustomerNameTest.class, |
| | | // QueueTaskTest.class |
| | |
| | | DomainDeleteTest.class, |
| | | EMailAddressTest.class, |
| | | DatabaseCleanTest.class, |
| | | PacMigrationTest.class, |
| | | CustomerTest.class |
| | | // LongCustomerNameTest.class |
| | | // QueueTaskTest.class |
| | |
| | | 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()), |