Tabnine Logo
JcrNameParser.validate
Code IndexAdd Tabnine to your IDE (free)

How to use
validate
method
in
org.apache.jackrabbit.oak.namepath.JcrNameParser

Best Java code snippets using org.apache.jackrabbit.oak.namepath.JcrNameParser.validate (Showing top 13 results out of 315)

origin: apache/jackrabbit-oak

  public static void checkName(String jcrName, boolean allowResidual) throws ConstraintViolationException {
    if (jcrName == null || !(allowResidual && "*".equals(jcrName) || validate(jcrName))) {
      throw new ConstraintViolationException("Not a valid JCR name '" + jcrName + '\'');
    }
  }
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

  public static void checkName(String jcrName, boolean allowResidual) throws ConstraintViolationException {
    if (jcrName == null || !(allowResidual && "*".equals(jcrName) || validate(jcrName))) {
      throw new ConstraintViolationException("Not a valid JCR name '" + jcrName + '\'');
    }
  }
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Converts the given JCR name to the corresponding Oak name. Throws
 * a {@link ConstraintViolationException} if the name is {@code null}
 * or otherwise invalid.
 *
 * @param jcrName JCR name
 * @return Oak name
 * @throws ConstraintViolationException if name is invalid or {@code null}
 */
@Nonnull
protected String getOakNameOrThrowConstraintViolation(@CheckForNull String jcrName)
    throws ConstraintViolationException {
  if (jcrName == null) {
    throw new ConstraintViolationException("Missing JCR name");
  }
  String oakName = mapper.getOakNameOrNull(jcrName);
  if (oakName == null || !JcrNameParser.validate(jcrName)) {
    throw new ConstraintViolationException(
        "Invalid name: " + jcrName);
  }
  return oakName;
}
origin: apache/jackrabbit-oak

/**
 * Converts the given JCR name to the corresponding Oak name. Throws
 * a {@link ConstraintViolationException} if the name is {@code null}
 * or otherwise invalid.
 *
 * @param jcrName JCR name
 * @return Oak name
 * @throws ConstraintViolationException if name is invalid or {@code null}
 */
@NotNull
protected String getOakNameOrThrowConstraintViolation(@Nullable String jcrName)
    throws ConstraintViolationException {
  if (jcrName == null) {
    throw new ConstraintViolationException("Missing JCR name");
  }
  String oakName = mapper.getOakNameOrNull(jcrName);
  if (oakName == null || !JcrNameParser.validate(jcrName)) {
    throw new ConstraintViolationException(
        "Invalid name: " + jcrName);
  }
  return oakName;
}
origin: org.apache.jackrabbit/oak-core

/**
 * Converts the given JCR name to the corresponding Oak name. Throws
 * a {@link ConstraintViolationException} if the name is {@code null}
 * or otherwise invalid.
 *
 * @param jcrName JCR name
 * @return Oak name
 * @throws ConstraintViolationException if name is invalid or {@code null}
 */
@NotNull
protected String getOakNameOrThrowConstraintViolation(@Nullable String jcrName)
    throws ConstraintViolationException {
  if (jcrName == null) {
    throw new ConstraintViolationException("Missing JCR name");
  }
  String oakName = mapper.getOakNameOrNull(jcrName);
  if (oakName == null || !JcrNameParser.validate(jcrName)) {
    throw new ConstraintViolationException(
        "Invalid name: " + jcrName);
  }
  return oakName;
}
origin: apache/jackrabbit-oak

} else if (name.startsWith("[") && !name.endsWith("]")) {
  return null;
} else if (!JcrNameParser.validate(name)) {
  return null;
origin: org.apache.jackrabbit/oak-core

type != PropertyType.LONG &&
type != PropertyType.BOOLEAN &&
JcrNameParser.validate(value.getString());
origin: org.apache.jackrabbit/oak-core

} else if (name.startsWith("[") && !name.endsWith("]")) {
  return null;
} else if (!JcrNameParser.validate(name)) {
  return null;
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

} else if (name.startsWith("[") && !name.endsWith("]")) {
  return null;
} else if (!JcrNameParser.validate(name)) {
  return null;
origin: apache/jackrabbit-oak

type != PropertyType.LONG &&
type != PropertyType.BOOLEAN &&
JcrNameParser.validate(value.getString());
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

type != PropertyType.LONG &&
type != PropertyType.BOOLEAN &&
JcrNameParser.validate(value.getString());
origin: apache/jackrabbit-oak

case PropertyType.NAME:
  String oakName = namePathMapper.getOakNameOrNull(value);
  if (oakName == null || !JcrNameParser.validate(oakName)) {
    throw new ValueFormatException("Invalid name: " + value);
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

case PropertyType.NAME:
  String oakName = namePathMapper.getOakNameOrNull(value);
  if (oakName == null || !JcrNameParser.validate(oakName)) {
    throw new ValueFormatException("Invalid name: " + value);
org.apache.jackrabbit.oak.namepathJcrNameParservalidate

Popular methods of JcrNameParser

  • checkName
  • parse
    Parse the specified jcr name and inform the specified listenerabout the result or any error that may

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now