Codota Logo
Instance.setComponent
Code IndexAdd Codota to your IDE (free)

How to use
setComponent
method
in
net.roboconf.core.model.beans.Instance

Best Java code snippets using net.roboconf.core.model.beans.Instance.setComponent (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: net.roboconf/roboconf-dm-rest-commons

instance.setComponent( instanceComponent );
origin: roboconf/roboconf-platform

instance.channels.addAll( ModelUtils.getPropertyValues( currentBlock, ParsingConstants.PROPERTY_INSTANCE_CHANNELS ));
instance.setComponent( ComponentHelpers.findComponent( this.graphs, currentBlock.getName()));
if( instance.getComponent() == null ) {
  ParsingError error = new ParsingError( ErrorCode.CO_INEXISTING_COMPONENT, block.getDeclaringFile().getEditedFile(), currentBlock.getLine());
origin: roboconf/roboconf-platform

@Test
public void testInstance() {
  Instance inst = new Instance();
  Iterator<ModelError> iterator = RuntimeModelValidator.validate( inst ).iterator();
  Assert.assertEquals( ErrorCode.RM_EMPTY_INSTANCE_NAME, iterator.next().getErrorCode());
  Assert.assertEquals( ErrorCode.RM_EMPTY_INSTANCE_COMPONENT, iterator.next().getErrorCode());
  Assert.assertFalse( iterator.hasNext());
  inst.setName( "?my instance?" );
  iterator = RuntimeModelValidator.validate( inst ).iterator();
  Assert.assertEquals( ErrorCode.RM_INVALID_INSTANCE_NAME, iterator.next().getErrorCode());
  Assert.assertEquals( ErrorCode.RM_EMPTY_INSTANCE_COMPONENT, iterator.next().getErrorCode());
  Assert.assertFalse( iterator.hasNext());
  inst.setName( "my-instance" );
  iterator = RuntimeModelValidator.validate( inst ).iterator();
  Assert.assertEquals( ErrorCode.RM_EMPTY_INSTANCE_COMPONENT, iterator.next().getErrorCode());
  Assert.assertFalse( iterator.hasNext());
  inst.setComponent( new Component( "comp" ));
  Assert.assertEquals( 0, RuntimeModelValidator.validate( inst ).size());
  inst.setName( "my instance" );
  Assert.assertEquals( 0, RuntimeModelValidator.validate( inst ).size());
  inst.overriddenExports.put( "inst.value", "whatever" );
  iterator = RuntimeModelValidator.validate( inst ).iterator();
  Assert.assertEquals( ErrorCode.RM_MAGIC_INSTANCE_VARIABLE, iterator.next().getErrorCode());
  Assert.assertFalse( iterator.hasNext());
}
origin: roboconf/roboconf-platform

@Test
public void testFindAllExportedVariables() {
  Instance instance = new Instance( "inst 1" ).component( new Component( "c" ));
  Assert.assertEquals( 0, InstanceHelpers.findAllExportedVariables( instance ).size());
  instance.overriddenExports.put( "var1", "value1" );
  Map<String,String> map = InstanceHelpers.findAllExportedVariables( instance );
  Assert.assertEquals( 1, map.size());
  Assert.assertEquals( "value1", map.get( "var1" ));
  Component component = new Component( "comp 1" );
  component.addExportedVariable( new ExportedVariable( "var1", "another value" ));
  component.addExportedVariable( new ExportedVariable( "var2", "value2" ));
  instance.setComponent( component );
  map = InstanceHelpers.findAllExportedVariables( instance );
  Assert.assertEquals( 2, map.size());
  Assert.assertEquals( "value1", map.get( "comp 1.var1" ));
  Assert.assertEquals( "value2", map.get( "comp 1.var2" ));
  instance.overriddenExports.clear();
  map = InstanceHelpers.findAllExportedVariables( instance );
  Assert.assertEquals( 2, map.size());
  Assert.assertEquals( "another value", map.get( "comp 1.var1" ));
  Assert.assertEquals( "value2", map.get( "comp 1.var2" ));
}
origin: roboconf/roboconf-platform

inst.setComponent( comp );
iterator = RuntimeModelValidator.validate( inst ).iterator();
Assert.assertEquals( ErrorCode.RM_MISSING_VARIABLE_VALUE, iterator.next().getErrorCode());
origin: roboconf/roboconf-platform

instance.setComponent( component );
instance.overriddenExports.put( "var1", "some value" );
instance.overriddenExports.put( "toto.ip", null );
origin: roboconf/roboconf-platform

@Test
public void testIsTarget() {
  Instance inst = new Instance( "i" );
  Assert.assertFalse( InstanceHelpers.isTarget( inst ));
  inst.setComponent( new Component( "comp" ).installerName( "whatever" ));
  Assert.assertFalse( InstanceHelpers.isTarget( inst ));
  inst.getComponent().setInstallerName( Constants.TARGET_INSTALLER );
  Assert.assertTrue( InstanceHelpers.isTarget( inst ));
}
net.roboconf.core.model.beansInstancesetComponent

Popular methods of Instance

  • getName
  • getComponent
  • getStatus
  • <init>
  • getImports
  • setStatus
  • component
  • getParent
  • getChildren
  • setName
  • channel
    Adds a channel in a chain approach.
  • name
    Sets the name in a chain approach.
  • channel,
  • name,
  • setParent,
  • status,
  • equals,
  • parent,
  • toString

Popular in Java

  • Making http post requests using okhttp
  • requestLocationUpdates (LocationManager)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • JFileChooser (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now