private void checkImplementationContainer( final ImplementationContainer container) throws ADLException { Implementation impl = container.getImplementation(); if (impl != null) { String className = impl.getClassName(); if (className == null) { throw new ADLException("Implementation class name missing", (Node) impl); } } }
private void checkControllerContainer(final ControllerContainer container) throws ADLException { Controller ctrl = container.getController(); if (ctrl != null) { if (ctrl.getDescriptor() == null) { throw new ADLException("Controller descriptor missing", (Node) ctrl); } } } }
public Component visit(final List<Node> path, final ComponentContainer node, final Map<Object, Object> context) throws ADLException, TaskException { final Implementation impl = castNodeError(node, ImplementationContainer.class).getImplementation(); if (impl == null) { throw new CompilerError(GenericErrors.INTERNAL_ERROR, "This visitor is only applicable for primitive component."); } return createImplementationTask(node, impl); }
if (container instanceof ImplementationContainer) { ImplementationContainer ic = (ImplementationContainer) container; Implementation i = ic.getImplementation(); if (i != null) { implementation = i.getClassName(); if (container instanceof ControllerContainer) { ControllerContainer cc = (ControllerContainer) container; if (cc.getController() != null) { controller = cc.getController().getDescriptor(); if (container instanceof TemplateControllerContainer) { TemplateControllerContainer tcc = (TemplateControllerContainer) container; if (tcc.getTemplateController() != null) { templateController = tcc.getTemplateController() .getDescriptor(); template = true;
public void execute(final Object context) throws Exception { if (getInstance() != null) { return; } Object type = getFactoryProviderTask().getFactory(); Object result = builder.createComponent(type, name, definition, controllerDesc, contentDesc, context); setInstance(result); }
public void execute(final Object context) throws Exception { if (getInstance() != null) { return; } Object type = getFactoryProviderTask().getFactory(); org.objectweb.fractal.api.Component node = (org.objectweb.fractal.api.Component) virtualNodeCreationTask .getResult(); /* * PATCH node == null if no free node available. think about a * better solution. */ if (node == null) { return; } /* * physicalNodeName is fixed in NodeLauncher, at the creation of the * node */ String physicalNodeName = Fractal.getNameController(node) .getFcName(); String factoryName = ""; if (physicalNodeName.equals("jadeboot")) factoryName = InetAddress.getLocalHost().getCanonicalHostName(); else factoryName = physicalNodeName; ((Map) context).put("factoryName", factoryName); Object result = builder.createComponent(type, name, definition, controllerDesc, contentDesc, context); setInstance(result); }