Package org.platformlayer.core.model

Examples of org.platformlayer.core.model.ServiceInfo


    if (items.containsKey(head)) {
      Collection<ServiceInfo> services = items.get(head);
      if (services.size() > 1) {
        throw new IllegalArgumentException("Cannot resolve path (ambiguous item type): " + path);
      }
      ServiceInfo serviceInfo = Iterables.getOnlyElement(services);
      itemType = head;
      if (serviceType != null) {
        if (!Objects.equal(serviceType, serviceInfo.serviceType)) {
          throw new IllegalArgumentException("Cannot resolve path (service/item type mismatch): " + path);
        }
View Full Code Here


      serviceProvidersByNamespace.put(xmlNamespace, serviceProvider);

      javaClassToModelClass.put(modelClass.getJavaClass(), modelClass);
    }

    ServiceInfo serviceInfo = serviceProvider.getServiceInfo();
    allServices.add(serviceInfo);
  }
View Full Code Here

    return serviceType;
  }

  @Override
  public ServiceInfo getServiceInfo() {
    ServiceInfo serviceInfo = new ServiceInfo();
    serviceInfo.serviceType = getServiceType().getKey();
    serviceInfo.description = description;
    // serviceInfo.schema =

    for (ModelClass<?> modelClass : getModels().all()) {
      ItemType itemType = modelClass.getItemType();

      if (serviceInfo.getNamespace() == null) {
        serviceInfo.namespace = modelClass.getPrimaryNamespace();
      }

      if (serviceInfo.itemTypes == null) {
        serviceInfo.itemTypes = Lists.newArrayList();
View Full Code Here

    if (namespaceURI == null) {
      throw new IllegalArgumentException("Namespace could not be determined");
    }

    ServiceInfo service = getServiceInfo(services, namespaceURI);
    if (service == null) {
      throw new PlatformLayerClientException("Cannot find service for " + namespaceURI);
    }

    ServiceType serviceType = new ServiceType(service.getServiceType());
    ItemType itemType = new ItemType(nodeName);

    FederationKey host = null;
    ProjectId project = null;
    return new PlatformLayerKey(host, project, serviceType, itemType, id);
View Full Code Here

TOP

Related Classes of org.platformlayer.core.model.ServiceInfo

Copyright © 2018 www.massapicom. 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.