Examples of CapabilityImpl


Examples of org.apache.felix.bundlerepository.impl.CapabilityImpl

        // convert capabilities
        org.osgi.service.obr.Capability[] c = resource.getCapabilities();
        if (c != null) {
            capabilities = new Capability[c.length];
            for (int i = 0; i < c.length; i++) {
                CapabilityImpl cap = new CapabilityImpl(c[i].getName());
                Iterator iter = c[i].getProperties().entrySet().iterator();    
                int j = 0;
                while (iter.hasNext()) {
                    Map.Entry entry = (Map.Entry) iter.next();
                    cap.addProperty((String) entry.getKey(), null, (String) entry.getValue());
                }
               
                capabilities[i] = cap;
            }
        }
View Full Code Here

Examples of org.apache.karaf.features.internal.resolver.CapabilityImpl

        }

        private void wrap(Map<Capability, Capability> map, Subsystem subsystem, Resource resource) {
            ResourceImpl wrapped = new ResourceImpl();
            for (Capability cap : resource.getCapabilities(null)) {
                CapabilityImpl wCap = new CapabilityImpl(wrapped, cap.getNamespace(), cap.getDirectives(), cap.getAttributes());
                map.put(cap, wCap);
                wrapped.addCapability(wCap);
            }
            for (Requirement req : resource.getRequirements(null)) {
                RequirementImpl wReq = new RequirementImpl(wrapped, req.getNamespace(), req.getDirectives(), req.getAttributes());
View Full Code Here

Examples of org.apache.karaf.features.internal.resolver.CapabilityImpl

                    // We use both actual services and services declared from the headers
                    // TODO: use actual services
                    Map<String, String> headers = new DictionaryAsMap<>(res.getBundle().getHeaders());
                    Resource tmp = ResourceBuilder.build(res.getBundle().getLocation(), headers);
                    for (Capability cap : tmp.getCapabilities(ServiceNamespace.SERVICE_NAMESPACE)) {
                        dummy.addCapability(new CapabilityImpl(dummy, cap.getNamespace(), cap.getDirectives(), cap.getAttributes()));
                    }
                    ss.addSystemResource(res);
                    for (Capability cap : res.getCapabilities(null)) {
                        hasEeCap |= cap.getNamespace().equals(EXECUTION_ENVIRONMENT_NAMESPACE);
                    }
View Full Code Here

Examples of org.apache.karaf.features.internal.resolver.CapabilityImpl

        String[] namespace = new String[1];
        Map<String, String> directives = new HashMap<>();
        Map<String, Object> attributes = new HashMap<>();
        parseClause(reader, namespace, directives, attributes);
        sanityCheckEndElement(reader, reader.getEventType(), CAPABILITY);
        return new CapabilityImpl(resource, namespace[0], directives, attributes);
    }
View Full Code Here

Examples of org.osgi.impl.bundle.obr.resource.CapabilityImpl

        Collection res = m_resource.getCapabilityList();
        Iterator it = res.iterator();
        while ( it.hasNext() )
        {
            Capability capability = new Capability();
            CapabilityImpl ci = ( CapabilityImpl ) it.next();
            capability.setName( ci.getName() );
            // System.out.println(ci.getName()) ;
            if ( !( ci.getName().compareTo( "bundle" ) == 0 ) )
            {
                Map properties = ci.getProperties();
                for ( Iterator e = properties.entrySet().iterator(); e.hasNext(); )
                {
                    PElement p = new PElement();
                    Map.Entry entry = ( Map.Entry ) e.next();
                    String key = ( String ) entry.getKey();
View Full Code Here

Examples of org.sonatype.nexus.capabilities.client.support.CapabilityImpl

    this.type = checkNotNull(type);
  }

  @Override
  public Capability create(final CapabilityClient client) {
    return new CapabilityImpl(client, type);
  }
View Full Code Here

Examples of org.sonatype.nexus.capabilities.client.support.CapabilityImpl

    return new CapabilityImpl(client, type);
  }

  @Override
  public Capability create(final CapabilityClient client, final CapabilityStatusXO settings) {
    return new CapabilityImpl(client, settings);
  }
View Full Code Here

Examples of org.sonatype.nexus.capabilities.client.support.CapabilityImpl

  public ReflectiveCapability(final Class<? extends Capability> capabilityType,
                              final CapabilityClient client,
                              final String type)
  {
    this.capabilityType = checkNotNull(capabilityType);
    delegate = new CapabilityImpl(client, type);
  }
View Full Code Here

Examples of org.sonatype.nexus.capabilities.client.support.CapabilityImpl

  public ReflectiveCapability(final Class<? extends Capability> capabilityType,
                              final CapabilityClient client,
                              final CapabilityStatusXO settings)
  {
    this.capabilityType = checkNotNull(capabilityType);
    delegate = new CapabilityImpl(client, settings);
  }
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.