Examples of InvalidContentException


Examples of org.apache.stanbol.enhancer.servicesapi.InvalidContentException

    }
    String text = "";
    try {
      text = ContentItemHelper.getText(contentPart.getValue());
    } catch (IOException e) {
      throw new InvalidContentException(this, ci, e);
    }
    if (text.trim().length() == 0) {
      log.info("No text contained in ContentPart {" + contentPart.getKey() + "} of ContentItem {" + ci.getUri() + "}");
      return;
    }
View Full Code Here

Examples of org.apache.stanbol.enhancer.servicesapi.InvalidContentException

        }
        String text = "";
        try {
            text = ContentItemHelper.getText(contentPart.getValue());
        } catch (IOException e) {
            throw new InvalidContentException(this, ci, e);
        }
        if (text.trim().length() == 0) {
            log.info("No text contained in ContentPart {} of ContentItem {}",
                contentPart.getKey(),ci.getUri());
            return;
View Full Code Here

Examples of org.eclipse.osgi.signedcontent.InvalidContentException

  private void verifyDigests() throws InvalidContentException {
    // Check the digest at end of file
    for (int i = 0; i < digests.length; i++) {
      byte rc[] = digests[i].digest();
      if (!MessageDigest.isEqual(result[i], rc))
        throw new InvalidContentException(NLS.bind(SignedContentMessages.File_In_Jar_Is_Tampered, entry.getName(), bundleFile.getBaseFile()), null);
    }
  }
View Full Code Here

Examples of org.jscep.transport.response.InvalidContentException

public class InvalidContentExceptionTest {

    @Test
    public void testInvalidContentExceptionCause() {
  Throwable cause = new Exception();
  InvalidContentException e = new InvalidContentException(cause);

  assertThat(e.getCause(), is(cause));
    }
View Full Code Here

Examples of org.jscep.transport.response.InvalidContentException

    }

    @Test
    public void testInvalidContentExceptionMessage() {
  String message = "message";
  InvalidContentException e = new InvalidContentException(message);

  assertThat(e.getMessage(), is(message));
    }
View Full Code Here

Examples of org.openbravo.service.web.InvalidContentException

      xec.getEntityResolver().setResolvingMode(ResolvingMode.MUST_EXIST);
    }
    final List<BaseOBObject> processedObjects = xec.process(doc);

    if (xec.getErrorMessages() != null) {
      throw new InvalidContentException(xec.getErrorMessages());
    }

    // the create action also allows updating
    if (changeAction == ChangeAction.CREATE || changeAction == ChangeAction.UPDATE) {
      return doCreateUpdate(xec);
View Full Code Here

Examples of org.openbravo.service.web.InvalidContentException

  protected String doCreateUpdate(XMLEntityConverter xec) {
    final ImportResult ir = new ImportResult();

    DataImportService.getInstance().saveUpdateConvertedObjects(xec, ir, false, null);
    if (ir.getErrorMessages() != null) {
      throw new InvalidContentException(ir.getErrorMessages());
    }
    final String log = (xec.getLogMessages() != null ? xec.getLogMessages() : "")
        + (xec.getLogMessages() != null ? "\n" : "") + "Updated " + xec.getToUpdate().size()
        + " business objects, Inserted " + xec.getToInsert().size() + " business objects ";
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.