if (NAMESPACE_1_0_0.equals(namespace)) {
URL url = getClass().getResource("/opendaylight-blueprint-ext-1.0.0.xsd");
LOG.debug("getSchemaLocation for {} returning URL {}", namespace, url);
if (NAMESPACE_1_0_0.equals(namespace)) {
URL url = getClass().getResource("/opendaylight-blueprint-ext-1.0.0.xsd");
LOG.debug("getSchemaLocation for {} returning URL {}", namespace, url);
LOG.debug("In parse for {}", element);
if (nodeNameEquals(element, RpcImplementationBean.RPC_IMPLEMENTATION)) {
LOG.debug("In parse for {}", element);
if (nodeNameEquals(element, RpcImplementationBean.RPC_IMPLEMENTATION)) {
- public ComponentMetadata decorate(Node node, ComponentMetadata component, ParserContext context) {
+ public ComponentMetadata decorate(final Node node, final ComponentMetadata component, final ParserContext context) {
if (node instanceof Attr) {
if (nodeNameEquals(node, RESTART_DEPENDENTS_ON_UPDATES)) {
return decorateRestartDependentsOnUpdates((Attr) node, component, context);
if (node instanceof Attr) {
if (nodeNameEquals(node, RESTART_DEPENDENTS_ON_UPDATES)) {
return decorateRestartDependentsOnUpdates((Attr) node, component, context);
- private ComponentMetadata decorateServiceType(Attr attr, ComponentMetadata component, ParserContext context) {
+ private static ComponentMetadata decorateServiceType(final Attr attr, final ComponentMetadata component,
+ final ParserContext context) {
if (!(component instanceof MutableServiceMetadata)) {
throw new ComponentDefinitionException("Expected an instanceof MutableServiceMetadata");
}
if (!(component instanceof MutableServiceMetadata)) {
throw new ComponentDefinitionException("Expected an instanceof MutableServiceMetadata");
}
- private ComponentMetadata decorateServiceReferenceType(Attr attr, ComponentMetadata component,
- ParserContext context) {
+ private static ComponentMetadata decorateServiceReferenceType(final Attr attr, final ComponentMetadata component,
+ final ParserContext context) {
if (!(component instanceof MutableServiceReferenceMetadata)) {
throw new ComponentDefinitionException("Expected an instanceof MutableServiceReferenceMetadata");
}
if (!(component instanceof MutableServiceReferenceMetadata)) {
throw new ComponentDefinitionException("Expected an instanceof MutableServiceReferenceMetadata");
}
- private static ComponentMetadata decorateRestartDependentsOnUpdates(Attr attr, ComponentMetadata component,
- ParserContext context) {
+ private static ComponentMetadata decorateRestartDependentsOnUpdates(final Attr attr,
+ final ComponentMetadata component, final ParserContext context) {
return enableComponentProcessorProperty(attr, component, context, "restartDependentsOnUpdates");
}
return enableComponentProcessorProperty(attr, component, context, "restartDependentsOnUpdates");
}
- private static ComponentMetadata decorateUseDefaultForReferenceTypes(Attr attr, ComponentMetadata component,
- ParserContext context) {
+ private static ComponentMetadata decorateUseDefaultForReferenceTypes(final Attr attr,
+ final ComponentMetadata component, final ParserContext context) {
return enableComponentProcessorProperty(attr, component, context, "useDefaultForReferenceTypes");
}
return enableComponentProcessorProperty(attr, component, context, "useDefaultForReferenceTypes");
}
- private static ComponentMetadata enableComponentProcessorProperty(Attr attr, ComponentMetadata component,
- ParserContext context, String propertyName) {
+ private static ComponentMetadata enableComponentProcessorProperty(final Attr attr,
+ final ComponentMetadata component, final ParserContext context, final String propertyName) {
if (component != null) {
throw new ComponentDefinitionException("Attribute " + attr.getNodeName()
+ " can only be used on the root <blueprint> element");
if (component != null) {
throw new ComponentDefinitionException("Attribute " + attr.getNodeName()
+ " can only be used on the root <blueprint> element");
ComponentDefinitionRegistry registry = context.getComponentDefinitionRegistry();
MutableBeanMetadata metadata = (MutableBeanMetadata) registry.getComponentDefinition(COMPONENT_PROCESSOR_NAME);
if (metadata == null) {
ComponentDefinitionRegistry registry = context.getComponentDefinitionRegistry();
MutableBeanMetadata metadata = (MutableBeanMetadata) registry.getComponentDefinition(COMPONENT_PROCESSOR_NAME);
if (metadata == null) {
registerRpcRegistryServiceRefBean(context);
MutableBeanMetadata metadata = context.createMetadata(MutableBeanMetadata.class);
registerRpcRegistryServiceRefBean(context);
MutableBeanMetadata metadata = context.createMetadata(MutableBeanMetadata.class);
ComponentFactoryMetadata metadata = new RpcServiceMetadata(getId(context, element),
element.getAttribute(INTERFACE));
ComponentFactoryMetadata metadata = new RpcServiceMetadata(getId(context, element),
element.getAttribute(INTERFACE));
ComponentDefinitionRegistry registry = context.getComponentDefinitionRegistry();
if (registry.getComponentDefinition(ROUTED_RPC_REG_CONVERTER_NAME) == null) {
MutableBeanMetadata metadata = context.createMetadata(MutableBeanMetadata.class);
ComponentDefinitionRegistry registry = context.getComponentDefinitionRegistry();
if (registry.getComponentDefinition(ROUTED_RPC_REG_CONVERTER_NAME) == null) {
MutableBeanMetadata metadata = context.createMetadata(MutableBeanMetadata.class);
ComponentDefinitionRegistry registry = context.getComponentDefinitionRegistry();
if (registry.getComponentDefinition(RPC_REGISTRY_NAME) == null) {
MutableReferenceMetadata metadata = createServiceRef(context, RpcProviderRegistry.class, null);
ComponentDefinitionRegistry registry = context.getComponentDefinitionRegistry();
if (registry.getComponentDefinition(RPC_REGISTRY_NAME) == null) {
MutableReferenceMetadata metadata = createServiceRef(context, RpcProviderRegistry.class, null);
registerNotificationServiceRefBean(context);
MutableBeanMetadata metadata = context.createMetadata(MutableBeanMetadata.class);
registerNotificationServiceRefBean(context);
MutableBeanMetadata metadata = context.createMetadata(MutableBeanMetadata.class);
ComponentDefinitionRegistry registry = context.getComponentDefinitionRegistry();
if (registry.getComponentDefinition(NOTIFICATION_SERVICE_NAME) == null) {
MutableReferenceMetadata metadata = createServiceRef(context, NotificationService.class, null);
ComponentDefinitionRegistry registry = context.getComponentDefinitionRegistry();
if (registry.getComponentDefinition(NOTIFICATION_SERVICE_NAME) == null) {
MutableReferenceMetadata metadata = createServiceRef(context, NotificationService.class, null);
LOG.debug("parseClusteredAppConfig");
// Find the default-config child element representing the default app config XML, if present.
LOG.debug("parseClusteredAppConfig");
// Find the default-config child element representing the default app config XML, if present.
if (Strings.isNullOrEmpty(updateStrategyValue)
|| updateStrategyValue.equalsIgnoreCase(UpdateStrategy.RELOAD.name())) {
return UpdateStrategy.RELOAD;
if (Strings.isNullOrEmpty(updateStrategyValue)
|| updateStrategyValue.equalsIgnoreCase(UpdateStrategy.RELOAD.name())) {
return UpdateStrategy.RELOAD;
ComponentFactoryMetadata metadata = new SpecificReferenceListMetadata(getId(context, element),
element.getAttribute(INTERFACE));
ComponentFactoryMetadata metadata = new SpecificReferenceListMetadata(getId(context, element),
element.getAttribute(INTERFACE));
ComponentFactoryMetadata metadata = new StaticReferenceMetadata(getId(context, element),
element.getAttribute(INTERFACE));
ComponentFactoryMetadata metadata = new StaticReferenceMetadata(getId(context, element),
element.getAttribute(INTERFACE));
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
builderFactory.setNamespaceAware(true);
builderFactory.setCoalescing(true);
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
builderFactory.setNamespaceAware(true);
builderFactory.setCoalescing(true);
MutableValueMetadata metadata = context.createMetadata(MutableValueMetadata.class);
metadata.setStringValue(value);
return metadata;
}
MutableValueMetadata metadata = context.createMetadata(MutableValueMetadata.class);
metadata.setStringValue(value);
return metadata;
}
- private static MutableReferenceMetadata createServiceRef(ParserContext context, Class<?> cls, String filter) {
+ private static MutableReferenceMetadata createServiceRef(final ParserContext context, final Class<?> cls,
+ final String filter) {
MutableReferenceMetadata metadata = context.createMetadata(MutableReferenceMetadata.class);
metadata.setRuntimeInterface(cls);
metadata.setInterface(cls.getName());
MutableReferenceMetadata metadata = context.createMetadata(MutableReferenceMetadata.class);
metadata.setRuntimeInterface(cls);
metadata.setInterface(cls.getName());
MutableRefMetadata metadata = context.createMetadata(MutableRefMetadata.class);
metadata.setComponentId(id);
return metadata;
}
MutableRefMetadata metadata = context.createMetadata(MutableRefMetadata.class);
metadata.setComponentId(id);
return metadata;
}