Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up inference around parsing name:version strings #737

Merged
merged 8 commits into from
Jun 30, 2017
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public interface BrooklynObject extends Identifiable, Configurable {
* <p>
* In some cases this may be set heuristically from context and so may not be accurate.
* Callers can set an explicit catalog item ID if inferencing is not correct.
* <p>
* This should conform to OSGi specs for <code>symbolic_name:version</code>
* but weaker semantics are usually allowed so long as neither segment contains a <code>:</code> or whitespace.
*/
String getCatalogItemId();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

import org.apache.brooklyn.api.entity.Entity;
import org.apache.brooklyn.api.entity.EntitySpec;
import org.apache.brooklyn.api.framework.FrameworkLookup;
import org.apache.brooklyn.api.location.LocationSpec;
import org.apache.brooklyn.api.mgmt.ManagementContext;
import org.apache.brooklyn.api.mgmt.classloading.BrooklynClassLoadingContext;
Expand All @@ -39,8 +38,6 @@
import org.apache.brooklyn.camp.brooklyn.BrooklynCampConstants;
import org.apache.brooklyn.camp.brooklyn.BrooklynCampReservedKeys;
import org.apache.brooklyn.camp.brooklyn.spi.creation.service.CampServiceSpecResolver;
import org.apache.brooklyn.camp.brooklyn.spi.creation.service.ServiceTypeResolver;
import org.apache.brooklyn.camp.brooklyn.spi.creation.service.ServiceTypeResolverAdaptor;
import org.apache.brooklyn.camp.spi.AbstractResource;
import org.apache.brooklyn.camp.spi.ApplicationComponentTemplate;
import org.apache.brooklyn.camp.spi.AssemblyTemplate;
Expand Down Expand Up @@ -82,7 +79,6 @@
* This generates instances of a template resolver that use a {@link ServiceTypeResolver}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best to update description now ServiceTypeResolver is deleted. Should probably also remove this now too.

* to parse the {@code serviceType} line in the template.
*/
@SuppressWarnings("deprecation") // Because of ServiceTypeResolver
public class BrooklynComponentTemplateResolver {

private static final Logger log = LoggerFactory.getLogger(BrooklynComponentTemplateResolver.class);
Expand Down Expand Up @@ -197,10 +193,7 @@ public <T extends Entity> EntitySpec<T> resolveSpec(Set<String> encounteredRegis

private List<EntitySpecResolver> getServiceTypeResolverOverrides() {
List<EntitySpecResolver> overrides = new ArrayList<>();
Iterable<ServiceTypeResolver> loader = FrameworkLookup.lookupAll(ServiceTypeResolver.class, mgmt.getCatalogClassLoader());
for (ServiceTypeResolver resolver : loader) {
overrides.add(new ServiceTypeResolverAdaptor(this, resolver));
}
// none for now -- previously supported ServiceTypeResolver service
return overrides;
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading