Examples of revert()


Examples of org.apache.poi.openxml4j.opc.OPCPackage.revert()

    PackagePartName relativeName = PackagingURIHelper.createPartName(
        new URI("media/image1.gif"), partBase);
    assertTrue("The part name must be equal to "
        + partNameToValid.getName(), partNameToValid
        .equals(relativeName));
    pkg.revert();
  }

    public void testCreateURIFromString() throws Exception {
        String[] href = {
                "..\\\\\\cygwin\\home\\yegor\\.vim\\filetype.vim",
View Full Code Here

Examples of org.apache.poi.openxml4j.opc.Package.revert()

    PackagePartName relativeName = PackagingURIHelper.createPartName(
        "media/image1.gif", partBase);
    assertTrue("The part name must be equal to "
        + partNameToValid.getName(), partNameToValid
        .equals(relativeName));
    pkg.revert();
  }

  /**
   * Test createPartName(URI, y)
   */
 
View Full Code Here

Examples of org.apache.poi.openxml4j.opc.Package.revert()

    PackagePartName relativeName = PackagingURIHelper.createPartName(
        new URI("media/image1.gif"), partBase);
    assertTrue("The part name must be equal to "
        + partNameToValid.getName(), partNameToValid
        .equals(relativeName));
    pkg.revert();
  }
}
View Full Code Here

Examples of org.apache.poi.openxml4j.opc.Package.revert()

      PackagePartName nameDerived = PackagingURIHelper
          .createPartName("/word/document.xml/image1.gif");
      pkg.createPart(name, ContentTypes.XML);
      pkg.createPart(nameDerived, ContentTypes.EXTENSION_GIF);
    } catch (InvalidOperationException e) {
      pkg.revert();
      return;
    } catch (InvalidFormatException e) {
      fail(e.getMessage());
    }
    fail("A package implementer shall neither create nor recognize a part with a"
View Full Code Here

Examples of org.apache.poi.openxml4j.opc.Package.revert()

    } catch (InvalidFormatException e) {
      throw new RuntimeException(e);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
    pkg.revert();
  }

  private static String extractInvalidFormatMessage(String sampleNameSuffix) {

    InputStream is = OpenXML4JTestDataSamples.openComplianceSampleStream("OPCCompliance_CoreProperties_" + sampleNameSuffix);
View Full Code Here

Examples of org.apache.poi.openxml4j.opc.Package.revert()

      // expected during successful test
      return e.getMessage();
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
    pkg.revert();
    // Normally must thrown an InvalidFormatException exception.
    throw new AssertionFailedError("expected OPC compliance exception was not thrown");
  }
 
  /**
 
View Full Code Here

Examples of org.apache.poi.openxml4j.opc.Package.revert()

      throw new RuntimeException(e);
    } catch (InvalidOperationException e) {
      // expected during successful test
      assertEquals("OPC Compliance error [M4.1]: can't add another core properties part ! Use the built-in package method instead.", e.getMessage());
    }
    pkg.revert();
  }

  /**
   * Test M4.1 rule.
   */
 
View Full Code Here

Examples of org.apache.poi.openxml4j.opc.Package.revert()

      throw new RuntimeException(e);
    } catch (InvalidOperationException e) {
      // expected during successful test
      assertEquals("OPC Compliance error [M4.1]: you try to add more than one core properties relationship in the package !", e.getMessage());
    }
    pkg.revert();
  }

  /**
   * Test M4.2 rule.
   */
 
View Full Code Here

Examples of org.apache.sling.api.resource.ResourceResolver.revert()

                            resourceResolver,
                            config.getClusterInstancesPath()
                                    + "/" + slingId + "/properties");
            // SLING-2879 - revert/refresh resourceResolver here to work
            // around a potential issue with jackrabbit in a clustered environment
            resourceResolver.revert();
            resourceResolver.refresh();

            final ModifiableValueMap myInstanceMap = myInstance.adaptTo(ModifiableValueMap.class);
            final Set<String> keys = new HashSet<String>(myInstanceMap.keySet());
            for(final String key : keys) {
View Full Code Here

Examples of org.apache.sling.api.resource.ResourceResolver.revert()

            logger.error(
                    "deleteAnnouncementsOf: got PersistenceException when deleting "
                    + "announcements of instanceId="+instanceId+": " + e, e);
        } finally {
            if (resourceResolver!=null) {
                resourceResolver.revert();
                resourceResolver.close();
                resourceResolver = null;
            }
        }
    }
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.