Fixed extension query by extension id.
This commit is contained in:
parent
0313df9b70
commit
ac91965779
|
@ -48,7 +48,7 @@ public class Core {
|
||||||
className = className.substring(Core.OSGI_PREFIX.length());
|
className = className.substring(Core.OSGI_PREFIX.length());
|
||||||
|
|
||||||
ServiceQuery query = new ServiceQuery();
|
ServiceQuery query = new ServiceQuery();
|
||||||
query.put("id", className);
|
query.put(ServiceQuery.EXTENSION_ID, className);
|
||||||
return Service.locate(ProcessCall.class, "org.adempiere.base.Process", query);
|
return Service.locate(ProcessCall.class, "org.adempiere.base.Process", query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ public class Core {
|
||||||
className = className.substring(Core.OSGI_PREFIX.length());
|
className = className.substring(Core.OSGI_PREFIX.length());
|
||||||
|
|
||||||
ServiceQuery query = new ServiceQuery();
|
ServiceQuery query = new ServiceQuery();
|
||||||
query.put("id", className);
|
query.put(ServiceQuery.EXTENSION_ID, className);
|
||||||
return Service.locate(ModelValidator.class, "org.adempiere.base.ModelValidator", query);
|
return Service.locate(ModelValidator.class, "org.adempiere.base.ModelValidator", query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,4 +6,5 @@ public class ServiceQuery extends HashMap<String, String> {
|
||||||
|
|
||||||
private static final long serialVersionUID = -3624488575106821781L;
|
private static final long serialVersionUID = -3624488575106821781L;
|
||||||
|
|
||||||
|
public static final String EXTENSION_ID = "Extension.ID";
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class ExtensionList<T> implements Iterable<T>{
|
||||||
private boolean accept(IConfigurationElement element) {
|
private boolean accept(IConfigurationElement element) {
|
||||||
for (String name : filters.keySet()) {
|
for (String name : filters.keySet()) {
|
||||||
String expected = filters.get(name);
|
String expected = filters.get(name);
|
||||||
if (name.equals("Extension.ID")) {
|
if (name.equals(ServiceQuery.EXTENSION_ID)) {
|
||||||
String id = element.getDeclaringExtension().getUniqueIdentifier();
|
String id = element.getDeclaringExtension().getUniqueIdentifier();
|
||||||
if (!expected.equals(id))
|
if (!expected.equals(id))
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue