Package org.platformlayer.core.model

Examples of org.platformlayer.core.model.PlatformLayerKey


    visitQueue();
  }

  public void visitQueue() throws OpsException {
    for (int i = 0; i < queue.size(); i++) {
      PlatformLayerKey key = queue.get(i);
      if (visited.contains(key)) {
        continue;
      }
      visitChildren(key);
    }
View Full Code Here


    this.opsSystem = opsSystem;
  }

  Object doOperation() throws OpsException {
    final Action action = activeJob.getAction();
    final PlatformLayerKey targetItemKey = activeJob.getTargetItemKey();

    RenameThread rename = new RenameThread(action.getClass().getSimpleName() + " " + targetItemKey);
    try {
      OpsContextBuilder opsContextBuilder = opsSystem.getInjector().getInstance(OpsContextBuilder.class);
View Full Code Here

      net.destItem = model.databaseItem;
      net.port = 3306;
      net.uniqueId = getFirewallUniqueId();

      PlatformLayerKey sourceKey = model.getKey();
      net.sourceItemKey = sourceKey;

      instance.addChild(net);
    }
View Full Code Here

      throw new IllegalArgumentException();
    }

    List<InstanceBase> machines = Lists.newArrayList();
    boolean showDeleted = false;
    PlatformLayerKey parent = PlatformLayerKey.parse(tag.getValue());
    for (ItemBase item : platformLayer.listChildrenTyped(parent, showDeleted)) {
      if (item instanceof InstanceBase) {
        machines.add((InstanceBase) item);
      }
    }
View Full Code Here

  }

  public StorageConfiguration getStorageConfiguration(Machine machine) throws OpsException {
    InstanceBase instance = toInstance(machine);

    PlatformLayerKey cloudKey = instance.cloud;

    MachineProvider cloud = getCloud(cloudKey);

    return getStorageConfiguration(cloud);
  }
View Full Code Here

  public <T extends ItemBase> T putItem(T item) throws OpsException {
    JaxbHelper jaxbHelper = PlatformLayerClientBase.toJaxbHelper(item);

    String xml = PlatformLayerClientBase.serialize(jaxbHelper, item);

    PlatformLayerKey key = PlatformLayerClientBase.toKey(jaxbHelper, item, listServices(true));

    UntypedItem created = putItem(key, xml, Format.XML);

    Class<T> itemClass = (Class<T>) item.getClass();
    return promoteToTyped(created, itemClass);
View Full Code Here

  protected void populateColumns(BoundTable<JettyService> table) {

    Column<JettyService, String> idColumn = new TextColumn<JettyService>() {
      @Override
      public String getValue(JettyService object) {
        PlatformLayerKey key = object.getKey();
        if (key == null) {
          return "";
        }
        String id = key.getItemIdString();
        if (id == null) {
          return "";
        }
        return id;
      }
View Full Code Here

  public <T> T findItem(PlatformLayerKey path, Class<T> itemClass) throws OpsException {
    return platformLayerClient.findItem(path, itemClass);
  }

  public <T> T findItem(String id, Class<T> itemClass) throws OpsException {
    PlatformLayerKey key = toKey(itemClass, id);

    return findItem(key, itemClass);
  }
View Full Code Here

  public <T> PlatformLayerKey toKey(Class<T> itemClass, String id) throws PlatformLayerClientException {
    JaxbHelper jaxbHelper = PlatformLayerClientBase.toJaxbHelper(itemClass, new Class[0]);
    ManagedItemId itemId = new ManagedItemId(id);

    PlatformLayerKey key = PlatformLayerClientBase.toKey(jaxbHelper, itemId, itemClass,
        platformLayerClient.listServices(true));
    return key;
  }
View Full Code Here

  public Action action;

  public JobExecutionData lastRun;

  public static PlatformLayerKey buildKey(ProjectId projectId, ManagedItemId jobId) {
    return new PlatformLayerKey(null, projectId, JobData.SERVICE_TYPE, JobData.ITEM_TYPE, jobId);
  }
View Full Code Here

TOP

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

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.