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

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

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

origin: apache/jackrabbit-oak

/**
 * Processes the given {@code name}, i.e. decodes it and checks
 * the format of the decoded name.
 *
 * @param nameInfo name to process
 * @return the decoded and valid jcr name or the original name if it is
 *         not encoded or if the resulting decoded name would be illegal.
 * @throws javax.jcr.RepositoryException
 */
private NameInfo processName(NameInfo nameInfo) throws RepositoryException {
  String decodedLocalName = ISO9075.decode(nameInfo.getLocalName());
  NameInfo decodedNameInfo = new NameInfo(nameInfo.getDocPrefix(), decodedLocalName);
  if (!decodedLocalName.equals(nameInfo.getLocalName())) {
    try {
      JcrNameParser.checkName(decodedNameInfo.getRepoQualifiedName(), true);
    } catch (ConstraintViolationException e) {
      // decoded name would be illegal according to jsr 170,
      // use encoded name as a fallback
      log.warn("encountered illegal decoded name '" + decodedLocalName + '\'', e);
      return nameInfo;
    }
  }
  return decodedNameInfo;
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Processes the given {@code name}, i.e. decodes it and checks
 * the format of the decoded name.
 *
 * @param nameInfo name to process
 * @return the decoded and valid jcr name or the original name if it is
 *         not encoded or if the resulting decoded name would be illegal.
 * @throws javax.jcr.RepositoryException
 */
private NameInfo processName(NameInfo nameInfo) throws RepositoryException {
  String decodedLocalName = ISO9075.decode(nameInfo.getLocalName());
  NameInfo decodedNameInfo = new NameInfo(nameInfo.getDocPrefix(), decodedLocalName);
  if (!decodedLocalName.equals(nameInfo.getLocalName())) {
    try {
      JcrNameParser.checkName(decodedNameInfo.getRepoQualifiedName(), true);
    } catch (ConstraintViolationException e) {
      // decoded name would be illegal according to jsr 170,
      // use encoded name as a fallback
      log.warn("encountered illegal decoded name '" + decodedLocalName + '\'', e);
      return nameInfo;
    }
  }
  return decodedNameInfo;
}
origin: org.apache.jackrabbit/oak-jcr

/**
 * Processes the given {@code name}, i.e. decodes it and checks
 * the format of the decoded name.
 *
 * @param nameInfo name to process
 * @return the decoded and valid jcr name or the original name if it is
 *         not encoded or if the resulting decoded name would be illegal.
 * @throws javax.jcr.RepositoryException
 */
private NameInfo processName(NameInfo nameInfo) throws RepositoryException {
  String decodedLocalName = ISO9075.decode(nameInfo.getLocalName());
  NameInfo decodedNameInfo = new NameInfo(nameInfo.getDocPrefix(), decodedLocalName);
  if (!decodedLocalName.equals(nameInfo.getLocalName())) {
    try {
      JcrNameParser.checkName(decodedNameInfo.getRepoQualifiedName(), true);
    } catch (ConstraintViolationException e) {
      // decoded name would be illegal according to jsr 170,
      // use encoded name as a fallback
      log.warn("encountered illegal decoded name '" + decodedLocalName + '\'', e);
      return nameInfo;
    }
  }
  return decodedNameInfo;
}
org.apache.jackrabbit.oak.namepathJcrNameParsercheckName

Popular methods of JcrNameParser

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

Popular in Java

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getContentResolver (Context)
  • addToBackStack (FragmentTransaction)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • BoxLayout (javax.swing)
  • JPanel (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top PhpStorm plugins
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