Package org.apache.poi.openxml4j.exceptions

Examples of org.apache.poi.openxml4j.exceptions.InvalidOperationException


    if (relationshipType == null) {
      throw new IllegalArgumentException("relationshipType");
    }

    if (this.isRelationshipPart || targetPartName.isRelationshipPartURI()) {
      throw new InvalidOperationException(
          "Rule M1.25: The Relationships part shall not have relationships to any other part.");
    }

    if (relationships == null) {
      relationships = new PackageRelationshipCollection();
View Full Code Here


    // Try to retrieve the target part

    if (this.isRelationshipPart
        || PackagingURIHelper.isRelationshipPartURI(targetURI)) {
      throw new InvalidOperationException(
          "Rule M1.25: The Relationships part shall not have relationships to any other part.");
    }

    if (relationships == null) {
      relationships = new PackageRelationshipCollection();
View Full Code Here

      // Create a memory part
      PackagePart part = container.createPart(this.partName,
          this.contentType.toString(), false);
      part.relationships = this.relationships;
      if (part == null) {
        throw new InvalidOperationException(
            "Can't create a temporary part !");
      }
      outStream = part.getOutputStreamImpl();
    } else {
      outStream = this.getOutputStreamImpl();
View Full Code Here

   *             If this part is a relationship part.
   */
  private void throwExceptionIfRelationship()
      throws InvalidOperationException {
    if (this.isRelationshipPart)
      throw new InvalidOperationException(
          "Can do this operation on a relationship part !");
  }
View Full Code Here

  public void setContentType(String contentType)
      throws InvalidFormatException {
    if (container == null)
      this.contentType = new ContentType(contentType);
    else
      throw new InvalidOperationException(
          "You can't change the content type of a part.");
  }
View Full Code Here

    return new ZipPartMarshaller().marshall(this, os);
  }

  @Override
  public boolean load(InputStream ios) throws InvalidFormatException {
    throw new InvalidOperationException("Method not implemented !");
  }
View Full Code Here

    throw new InvalidOperationException("Method not implemented !");
  }

  @Override
  public void close() {
    throw new InvalidOperationException("Method not implemented !");
  }
View Full Code Here

    throw new InvalidOperationException("Method not implemented !");
  }

  @Override
  public void flush() {
    throw new InvalidOperationException("Method not implemented !");
  }
View Full Code Here

    }
  }

  @Override
  protected InputStream getInputStreamImpl() {
    throw new InvalidOperationException("Operation not authorized");
  }
View Full Code Here

    throw new InvalidOperationException("Operation not authorized");
  }

  @Override
  protected OutputStream getOutputStreamImpl() {
    throw new InvalidOperationException(
        "Can't use output stream to set properties !");
  }
View Full Code Here

TOP

Related Classes of org.apache.poi.openxml4j.exceptions.InvalidOperationException

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.