Examples of DeployedContentHeader


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

 
  boolean isReferenced(Resource resource) {
    // Everything is referenced for the root subsystem during initialization.
    if (isRoot() && EnumSet.of(State.INSTALLING, State.INSTALLED).contains(getState()))
      return true;
    DeployedContentHeader header = getDeploymentManifest().getDeployedContentHeader();
    if (header == null)
      return false;
    return header.isReferenced(resource);
  }
View Full Code Here

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

    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;
    removedContent(Collections.singleton(clause));
  }
View Full Code Here

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

    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())
      builder.header(new DeployedContentHeader(clauses));
    try {
      setDeploymentManifest(builder.build());
    } catch (Exception e) {
      throw new SubsystemException(e);
    }
View Full Code Here

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

 
  private void computeContentResources(DeploymentManifest manifest) throws BundleException, IOException, InvalidSyntaxException, URISyntaxException {
    if (manifest == null)
      computeContentResources(getSubsystemManifest());
    else {
      DeployedContentHeader header = manifest.getDeployedContentHeader();
      if (header == null)
        return;
      for (DeployedContentHeader.Clause clause : header.getClauses()) {
        Resource resource = findContent(clause);
        if (resource == null)
          addMissingResource(clause);
        else
          addContentResource(resource);
View Full Code Here

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

  }
 
  protected boolean isReferencedProvisionTo() {
    DeploymentManifest manifest = subsystem.getDeploymentManifest();
    if (manifest != null) {
      DeployedContentHeader header = manifest.getDeployedContentHeader();
      if (header != null && header.contains(resource))
        return subsystem.isReferenced(resource);
    }
    if (subsystem.equals(provisionTo))
      return isReferencedSubsystem();
    return false;
View Full Code Here

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

  }
 
  protected boolean isReferencedSubsystem() {
    DeploymentManifest manifest = subsystem.getDeploymentManifest();
    if (manifest != null) {
      DeployedContentHeader header = manifest.getDeployedContentHeader();
      if (header != null && header.contains(resource))
        return subsystem.isReferenced(resource);
    }
    return true;
  }
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.