public boolean isAffected(ModuleData data) throws NotEmptyException { if (data == null) throw new NotEmptyException("data cannot be empty"); for (ModuleData item : moduleDatas) if (item.equals(data)) return true; return false; }
public void removeData(ModuleData data) throws AccessNotAllowedException, NotEmptyException { if (data == null) throw new NotEmptyException("data cannot be empty"); if (Tools.hasRight("REMOVE_DATA_FROM_MODULE")) { for (ModuleData gp : moduleDatas) if (gp.equals(data)) { gp.remove(); break; } } else throw new AccessNotAllowedException("You can't remove data from module"); }
public void addData(ModuleData data) throws AccessNotAllowedException, NotEmptyException { if (data == null) throw new NotEmptyException("data cannot be empty"); if (Tools.hasRight("ADD_DATA_TO_MODULE")) { data.setModule(this); moduleDatas.add(data); } else throw new AccessNotAllowedException("You can't add data to module"); }
private String getCheckedModuleName() { String moduleName = gwtModuleRunner.getModuleName(); if (moduleName == null || "".equals(moduleName.trim())) { throw new GwtTestConfigurationException( "The tested module name returned by " + gwtModuleRunner.getClass().getName() + ".getModuleName() should not be null or empty"); } String moduleAlias = ModuleData.get().getModuleAlias(moduleName); if (moduleAlias == null) { throw new GwtTestConfigurationException( "The tested module '" + moduleName + "' has not been found. Did you forget to declare a 'module-file' property in your 'META-INF/gwt-test-utils.properties' configuration file ?"); } return moduleAlias; }
private void processModuleFile(String key, URL url) { ModuleData.get().parseModule(key); }
@Nullable @Override public Module findIdeModule(@NotNull ModuleData module) { final Module ideModule = findIdeModule(module.getInternalName()); return isExternalSystemAwareModule(module.getOwner(), ideModule) ? ideModule : null; }