Examples of DeploymentManifest


Examples of org.apache.aries.subsystem.core.archive.DeploymentManifest

  boolean isApplication() {
    return getSubsystemManifest().getSubsystemTypeHeader().isApplication();
  }
 
  boolean isAutostart() {
    DeploymentManifest manifest = getDeploymentManifest();
    Header<?> header = manifest.getHeaders().get(DeploymentManifest.ARIESSUBSYSTEM_AUTOSTART);
    return Boolean.valueOf(header.getValue());
  }
View Full Code Here

Examples of org.apache.aries.subsystem.core.archive.DeploymentManifest

  boolean isScoped() {
    return isApplication() || isComposite();
  }
 
  void removedContent(Resource resource) {
    DeploymentManifest manifest = getDeploymentManifest();
    DeployedContentHeader header = manifest.getDeployedContentHeader();
    if (header == null)
      return;
    DeployedContentHeader.Clause clause = header.getClause(resource);
    if (clause == null)
      return;
View Full Code Here

Examples of org.apache.aries.subsystem.core.archive.DeploymentManifest

      return;
    removedContent(Collections.singleton(clause));
  }
 
  void removedContent(Collection<DeployedContentHeader.Clause> content) {
    DeploymentManifest manifest = getDeploymentManifest();
    DeployedContentHeader header = manifest.getDeployedContentHeader();
    if (header == null)
      return;
    Collection<DeployedContentHeader.Clause> clauses = new ArrayList<DeployedContentHeader.Clause>(header.getClauses());
    for (Iterator<DeployedContentHeader.Clause> i = clauses.iterator(); i.hasNext();)
      if (content.contains(i.next())) {
        i.remove();
        break;
      }
    DeploymentManifest.Builder builder = new DeploymentManifest.Builder();
    for (Entry<String, Header<?>> entry : manifest.getHeaders().entrySet()) {
      if (DeployedContentHeader.NAME.equals(entry.getKey()))
        continue;
      builder.header(entry.getValue());
    }
    if (!clauses.isEmpty())
View Full Code Here

Examples of org.apache.aries.subsystem.core.archive.DeploymentManifest

      IOUtils.close(fos);
    }
  }
 
  private String getDeploymentManifestHeaderValue(String name) {
    DeploymentManifest manifest = getDeploymentManifest();
    if (manifest == null)
      return null;
    Header<?> header = manifest.getHeaders().get(name);
    if (header == null)
      return null;
    return header.getValue();
  }
View Full Code Here

Examples of org.apache.aries.subsystem.core.archive.DeploymentManifest

  }
 
  synchronized DeploymentManifest getDeploymentManifest() {
    if (deploymentManifest == null) {
      try {
        deploymentManifest = new DeploymentManifest(directory.getFile("OSGI-INF/DEPLOYMENT.MF").open());
      }
      catch (Throwable t) {
        throw new SubsystemException(t);
      }
    }
View Full Code Here

Examples of org.apache.aries.subsystem.core.archive.DeploymentManifest

  org.eclipse.equinox.region.Region getRegion() {
    return Activator.getInstance().getRegionDigraph().getRegion(getRegionName());
  }
 
  String getRegionName() {
    DeploymentManifest manifest = getDeploymentManifest();
    Header<?> header = manifest.getHeaders().get(DeploymentManifest.ARIESSUBSYSTEM_REGION);
    if (header == null)
      return null;
    return header.getValue();
  }
View Full Code Here

Examples of org.apache.aries.subsystem.core.archive.DeploymentManifest

 
  private DeploymentManifest computeExistingDeploymentManifest(IDirectory directory) throws IOException {
    Manifest manifest = ManifestProcessor.obtainManifestFromAppDir(directory, "OSGI-INF/DEPLOYMENT.MF");
    if (manifest == null)
      return null;
    return new DeploymentManifest(manifest);
  }
View Full Code Here

Examples of org.apache.aries.subsystem.core.archive.DeploymentManifest

  private DeploymentManifest initializeDeploymentManifest(IDirectory idir)
      throws IOException {
    Manifest manifest = ManifestProcessor.obtainManifestFromAppDir(idir,
        "OSGI-INF/DEPLOYMENT.MF");
    if (manifest != null)
      return new DeploymentManifest(manifest);
    else
      return new DeploymentManifest.Builder()
          .manifest(getSubsystemManifest())
          .location(BasicSubsystem.ROOT_LOCATION).autostart(true).id(0)
          .lastId(SubsystemIdentifier.getLastId())
View Full Code Here

Examples of org.apache.aries.subsystem.core.archive.DeploymentManifest

      }
    }
    // TODO Can we automatically assume it actually is resolved?
    target.setState(State.RESOLVED);
    try {
      target.setDeploymentManifest(new DeploymentManifest(
          target.getDeploymentManifest(),
          null,
          target.isAutostart(),
          target.getSubsystemId(),
          SubsystemIdentifier.getLastId(),
View Full Code Here

Examples of org.apache.aries.subsystem.core.archive.DeploymentManifest

      return null;
    return DeployedContentHeader.newInstance(content);
  }
 
  private DeploymentManifest computeDeploymentManifest() throws IOException {
    DeploymentManifest result = computeExistingDeploymentManifest();
    if (result != null)
      return result;
    result = new DeploymentManifest.Builder().manifest(resource.getSubsystemManifest())
        .header(computeDeployedContentHeader())
        .header(computeProvisionResourceHeader()).build();
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.