@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; InstalledDriver that = (InstalledDriver) o; if (jdbcCompliant != that.jdbcCompliant) return false; if (majorVersion != that.majorVersion) return false; if (minorVersion != that.minorVersion) return false; if (dataSourceClassName != null ? !dataSourceClassName.equals(that.dataSourceClassName) : that.dataSourceClassName != null) return false; if (deploymentUnitName != null ? !deploymentUnitName.equals(that.deploymentUnitName) : that.deploymentUnitName != null) return false; if (driverClassName != null ? !driverClassName.equals(that.driverClassName) : that.driverClassName != null) return false; if (driverName != null ? !driverName.equals(that.driverName) : that.driverName != null) return false; if (moduleName != null ? !moduleName.equals(that.moduleName) : that.moduleName != null) return false; if (xaDataSourceClassName != null ? !xaDataSourceClassName.equals(that.xaDataSourceClassName) : that.xaDataSourceClassName != null) return false; return true; }
if (dependency instanceof ModuleDependencySpec) { ModuleDependencySpec moduleDependency = (ModuleDependencySpec) dependency; if (moduleDependency.getIdentifier().equals(that.getModule().getIdentifier())) { return true; if (module != null && module.getIdentifier().equals(that.getModule().getIdentifier())) { return true;
/** * Determine whether this object is equal to another. * * @param other the other object * @return {@code true} if they are equal, {@code false} otherwise */ public boolean equals(Object other) { return other instanceof ModuleIdentifier && equals((ModuleIdentifier)other); }
/** * Determine whether this object is equal to another. * * @param other the other object * @return {@code true} if they are equal, {@code false} otherwise */ public boolean equals(Object other) { return other instanceof ModuleIdentifier && equals((ModuleIdentifier)other); }
/** {@inheritDoc} */ public synchronized boolean removeDeployedExtension(String name, ModuleIdentifier identifier) { final Set<ExtensionJar> jars = this.extensions.get(name); if (jars != null) { final Iterator<ExtensionJar> it = jars.iterator(); while (it.hasNext()) { final ExtensionJar jar = it.next(); if (jar.moduleIdentifier.equals(identifier)) { it.remove(); return true; } } } return false; }
/** {@inheritDoc} */ public synchronized boolean removeDeployedExtension(String name, ModuleIdentifier identifier) { final Set<ExtensionJar> jars = this.extensions.get(name); if (jars != null) { final Iterator<ExtensionJar> it = jars.iterator(); while (it.hasNext()) { final ExtensionJar jar = it.next(); if (jar.moduleIdentifier.equals(identifier)) { it.remove(); return true; } } } return false; }
/** {@inheritDoc} */ public synchronized boolean removeDeployedExtension(String name, ModuleIdentifier identifier) { final Set<ExtensionJar> jars = this.extensions.get(name); if (jars != null) { final Iterator<ExtensionJar> it = jars.iterator(); while (it.hasNext()) { final ExtensionJar jar = it.next(); if (jar.moduleIdentifier.equals(identifier)) { it.remove(); return true; } } } return false; }
/** {@inheritDoc} */ public synchronized boolean removeDeployedExtension(String name, ModuleIdentifier identifier) { final Set<ExtensionJar> jars = this.extensions.get(name); if (jars != null) { final Iterator<ExtensionJar> it = jars.iterator(); while (it.hasNext()) { final ExtensionJar jar = it.next(); if (jar.moduleIdentifier.equals(identifier)) { it.remove(); return true; } } } return false; }
@Override protected ModuleSpec findModule(ModuleIdentifier identifier) throws ModuleLoadException { return (moduleSpec.getModuleIdentifier().equals(identifier) ? moduleSpec : null); }
@Override protected ModuleSpec findModule(ModuleIdentifier identifier) throws ModuleLoadException { return (moduleSpec.getModuleIdentifier().equals(identifier) ? moduleSpec : null); }
public void addExclusion(final ModuleIdentifier exclusion) { allDependencies = null; exclusions.add(exclusion); Iterator<ModuleDependency> it = systemDependencies.iterator(); while (it.hasNext()) { final ModuleDependency dep = it.next(); if (dep.getIdentifier().equals(exclusion)) { it.remove(); } } it = localDependencies.iterator(); while (it.hasNext()) { final ModuleDependency dep = it.next(); if (dep.getIdentifier().equals(exclusion)) { it.remove(); } } }
public void addExclusion(final ModuleIdentifier exclusion) { allDependencies = null; exclusions.add(exclusion); Iterator<ModuleDependency> it = systemDependencies.iterator(); while (it.hasNext()) { final ModuleDependency dep = it.next(); if (dep.getIdentifier().equals(exclusion)) { it.remove(); } } it = localDependencies.iterator(); while (it.hasNext()) { final ModuleDependency dep = it.next(); if (dep.getIdentifier().equals(exclusion)) { it.remove(); } } }
public void addExclusion(final ModuleIdentifier exclusion) { allDependencies = null; exclusions.add(exclusion); Iterator<ModuleDependency> it = systemDependencies.iterator(); while (it.hasNext()) { final ModuleDependency dep = it.next(); if (dep.getIdentifier().equals(exclusion)) { it.remove(); } } it = localDependencies.iterator(); while (it.hasNext()) { final ModuleDependency dep = it.next(); if (dep.getIdentifier().equals(exclusion)) { it.remove(); } } }
public void addExclusion(final ModuleIdentifier exclusion) { allDependencies = null; exclusions.add(exclusion); Iterator<ModuleDependency> it = systemDependencies.iterator(); while (it.hasNext()) { final ModuleDependency dep = it.next(); if (dep.getIdentifier().equals(exclusion)) { it.remove(); } } it = localDependencies.iterator(); while (it.hasNext()) { final ModuleDependency dep = it.next(); if (dep.getIdentifier().equals(exclusion)) { it.remove(); } } }
@Override protected Module preloadModule(final ModuleIdentifier identifier) throws ModuleLoadException { if (identifier.equals(ModuleIdentifier.CLASSPATH)) { return loadModuleLocal(identifier); } else if (delegateLoader != null) { return preloadModule(identifier, delegateLoader); } else { return null; } }
protected Module preloadModule(final ModuleIdentifier identifier) throws ModuleLoadException { if (identifier.equals(myIdentifier)) { return loadModuleLocal(identifier); } else { Module module = loadModuleLocal(identifier); if (module == null) { return preloadModule(identifier, delegate); } else { return module; } } }
private AddonId findInstalledModule(AddonRepository repository, ModuleIdentifier moduleId) { AddonId found = null; for (AddonId addon : repository.listEnabledCompatibleWithVersion(AddonRepositoryImpl.getRuntimeAPIVersion())) { if (moduleCache.getModuleId(addon).equals(moduleId)) { found = addon; break; } } return found; }
@SuppressWarnings({ "unchecked", "rawtypes" }) private void markDeploymentWithModuleDependency(ModuleIdentifier moduleIdentifier, AttachmentKey attachment, DeploymentUnit deployment) { ModuleSpecification moduleSpecification = deployment.getAttachment(Attachments.MODULE_SPECIFICATION); for (ModuleDependency deploymentDependency : moduleSpecification.getUserDependencies()) { if (deploymentDependency.getIdentifier().equals(moduleIdentifier)) { deployment.putAttachment(attachment, Boolean.TRUE); return; } } }
@Override public ModuleSpec get(ModuleLoader loader, ModuleIdentifier id) { if (getId().equals(id)) { Builder builder = ModuleSpec.build(id); builder.addDependency(DependencySpec.createClassLoaderDependencySpec(PathFilters.acceptAll(), PathFilters.acceptAll(), ClassLoader.getSystemClassLoader(), getPaths())); configure(loader, builder); return builder.create(); } return null; }
/** * Gives any additional modules the same dependencies and permissions as the primary module. * <p/> * This makes sure they can access all API classes etc. * * @param moduleSpecification The primary module spec * @param module The additional module */ private void addAllDependenciesAndPermissions(final ModuleSpecification moduleSpecification, final AdditionalModuleSpecification module) { module.addSystemDependencies(moduleSpecification.getSystemDependencies()); module.addLocalDependencies(moduleSpecification.getLocalDependencies()); for(ModuleDependency dep : moduleSpecification.getUserDependencies()) { if(!dep.getIdentifier().equals(module.getModuleIdentifier())) { module.addUserDependency(dep); } } for(PermissionFactory factory : moduleSpecification.getPermissionFactories()) { module.addPermissionFactory(factory); } }