Examples of ItemType


Examples of org.platformlayer.ids.ItemType

      ElementInfo elementInfo = XmlHelper.getXmlElementInfo(itemClass);

      if (elementInfo != null) {
        ServiceProvider serviceProvider = serviceProvidersByNamespace.get(elementInfo.namespace);
        if (serviceProvider != null) {
          ItemType itemType = new ItemType(elementInfo.elementName);
          modelClass = (ModelClass<T>) serviceProvider.getModelClass(itemType);
        }
      }
    }
    return modelClass;

Examples of org.platformlayer.ids.ItemType

    return build(serviceProvider, clazz);
  }

  public static <T extends ItemBase> ModelClass<T> build(ServiceProvider serviceProvider, Class<T> clazz) {
    JaxbHelper jaxbHelper = JaxbHelper.get(clazz);
    ItemType itemType = new ItemType(JaxbHelper.getXmlElementName(clazz));
    return new ModelClass<T>(serviceProvider, clazz, itemType);
  }

Examples of org.platformlayer.ids.ItemType

      if (entity == null) {
        throw new IllegalStateException();
      }

      ServiceType serviceType = db.getServiceType(entity.service);
      ItemType itemType = db.getItemType(entity.model);

      JaxbHelper jaxbHelper = getJaxbHelper(db, serviceType, itemType);
      T item = mapToModel(project, serviceType, itemType, entity, jaxbHelper, secretProvider);

      int itemId = entity.id;

Examples of org.platformlayer.ids.ItemType

      }

      ModelClass<?> modelClass = serviceProvider.getModelClass(key.getItemType());

      ServiceType serviceType = key.getServiceType();
      ItemType itemType = key.getItemType();
      ProjectId project = key.getProject();
      ManagedItemId itemId = key.getItemId();

      return fetchItem(db, serviceType, itemType, project, itemId, modelClass.getJavaClass(), secretProvider,
          fetchTags);

Examples of org.platformlayer.ids.ItemType

    public ItemType getItemType(int code) throws SQLException {
      String v = mapCodeToKey(ItemType.class, code);
      if (v == null) {
        return null;
      }
      return new ItemType(v);
    }

Examples of org.platformlayer.ids.ItemType

    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();
      }
      serviceInfo.itemTypes.add(itemType.getKey());
    }

    return serviceInfo;
  }

Examples of org.platformlayer.ids.ItemType

    }
  }

  private PlatformLayerKey resolveKey(PlatformLayerKey key) throws OpsException {
    if (key.getServiceType() == null) {
      ItemType itemType = key.getItemType();
      ServiceType serviceType = OpsContext.get().getOpsSystem().getServiceType(itemType);
      key = key.withServiceType(serviceType);
    }

    if (key.getProject() == null) {

Examples of org.platformlayer.ids.ItemType

    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);
  }

Examples of org.platformlayer.ids.ItemType

    ProjectId project = !Strings.isNullOrEmpty(componentProject) ? new ProjectId(componentProject) : null;

    String serviceComponent = components.get(1);
    ServiceType serviceType = !Strings.isNullOrEmpty(serviceComponent) ? new ServiceType(serviceComponent) : null;

    ItemType itemType = new ItemType(components.get(2));
    ManagedItemId itemId = new ManagedItemId(Joiner.on("/").join(components.subList(3, components.size())));

    return new PlatformLayerKey(hostKey, project, serviceType, itemType, itemId);
  }

Examples of org.platformlayer.ids.ItemType

  public static PlatformLayerKey build(String host, String project, String serviceType, String itemType, String itemId) {
    FederationKey federationKey = host != null ? FederationKey.build(host) : null;
    ProjectId projectKey = project != null ? new ProjectId(project) : null;
    ServiceType serviceKey = serviceType != null ? new ServiceType(serviceType) : null;
    ItemType itemKey = itemType != null ? new ItemType(itemType) : null;
    ManagedItemId idKey = itemId != null ? new ManagedItemId(itemId) : null;

    return new PlatformLayerKey(federationKey, projectKey, serviceKey, itemKey, idKey);
  }
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.