Examples of capabilityAs()


Examples of org.sonatype.nexus.capability.CapabilityReference.capabilityAs()

      );
    }

    final CapabilityReference capabilityReference = capabilities.iterator().next();
    final GenerateMetadataCapabilityConfiguration configuration =
        capabilityReference.capabilityAs(GenerateMetadataCapability.class).getConfig();

    final String version = payload.toString();

    final Map<String, String> newAliases = Maps.newHashMap();
    newAliases.putAll(configuration.aliases());
View Full Code Here

Examples of org.sonatype.nexus.capability.CapabilityReference.capabilityAs()

    final CapabilityContext capabilityContext = mock(CapabilityContext.class);
    when(reference.context()).thenReturn(capabilityContext);
    when(capabilityContext.id()).thenReturn(CapabilityIdentity.capabilityIdentity("ID"));
    when(capabilityContext.isEnabled()).thenReturn(true);
    when(capabilityContext.notes()).thenReturn("Notes");
    when(reference.capabilityAs(GenerateMetadataCapability.class)).thenReturn(yumRepositoryCapability);
    Map<String, String> aliases = Maps.newHashMap();
    aliases.put("foo", "bar");
    when(yumRepositoryCapability.getConfig()).thenReturn(
        new GenerateMetadataCapabilityConfiguration(RELEASES, aliases, true, 1, "/comps.xml")
    );
View Full Code Here

Examples of org.sonatype.nexus.plugins.capabilities.CapabilityReference.capabilityAs()

    final CapabilityIdentity capaId = new CapabilityIdentity(configId());

    final CapabilityReference reference = capaRegistry.get(capaId);

    final ConfigEntry entry = reference
        .capabilityAs(ConfigCapability.class);

    return entry;

  }
View Full Code Here

Examples of org.sonatype.nexus.plugins.capabilities.CapabilityReference.capabilityAs()

    final CapabilityIdentity capaId = new CapabilityIdentity(configId());

    final CapabilityReference reference = capaRegistry.get(capaId);

    final ConfigEntry entry = reference
        .capabilityAs(ConfigCapability.class);

    final String comboId = entry.comboId();

    final AmazonService amazonService = entry.amazonService();
View Full Code Here

Examples of org.sonatype.nexus.plugins.capabilities.CapabilityReference.capabilityAs()

    final CapabilityIdentity capaId = new CapabilityIdentity(configId());

    final CapabilityReference reference = capaRegistry.get(capaId);

    final ConfigEntry entry = reference
        .capabilityAs(ConfigCapability.class);

    return entry;

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.