use of org.apache.sling.installer.core.impl.tasks.MockInstallationListener in project sling by apache.
the class TaskOrderingTest method getRegisteredResource.
private static EntityResourceList getRegisteredResource(String url) throws IOException {
new FileDataStore(new MockBundleContext());
final InternalResource internal = InternalResource.create("test", new InstallableResource(url, null, new Hashtable<String, Object>(), null, null, null));
RegisteredResourceImpl rr = RegisteredResourceImpl.create(internal);
TransformationResult[] tr = new DefaultTransformer().transform(rr);
if (tr == null) {
final TransformationResult result = new TransformationResult();
result.setId(url);
result.setResourceType(InstallableResource.TYPE_CONFIG);
tr = new TransformationResult[] { result };
}
rr = (RegisteredResourceImpl) rr.clone(tr[0]);
final EntityResourceList erl = new EntityResourceList("test", new MockInstallationListener());
erl.addOrUpdate(rr);
return erl;
}
Aggregations