/** * @deprecated Use {@link UUIDUtils#generateUUID()} */ @NotNull public static String generateUUID() { return UUIDUtils.generateUUID(); }
/** * @deprecated Use {@link UUIDUtils#isValidUUID(String)} (String)} */ public static boolean isValidUUID(String uuid) { return UUIDUtils.isValidUUID(uuid); }
/** * @deprecated Use {@link UUIDUtils#generateUUID(String)} */ @NotNull public static String generateUUID(String hint) { return UUIDUtils.generateUUID(hint); }
/** * @deprecated Use {@link UUIDUtils#isValidUUID(String)} (String)} */ public static boolean isValidUUID(String uuid) { return UUIDUtils.isValidUUID(uuid); }
/** * @deprecated Use {@link UUIDUtils#generateUUID(String)} */ @Nonnull public static String generateUUID(String hint) { return UUIDUtils.generateUUID(hint); }
/** * @deprecated Use {@link UUIDUtils#isValidUUID(String)} (String)} */ public static boolean isValidUUID(String uuid) { return UUIDUtils.isValidUUID(uuid); }
/** * @deprecated Use {@link UUIDUtils#generateUUID(String)} */ @NotNull public static String generateUUID(String hint) { return UUIDUtils.generateUUID(hint); }
/** * The possibly non existing tree identified by the specified {@code identifier} or {@code null}. * * @param identifier The identifier of the tree such as exposed by {@link #getIdentifier(Tree)} * @return The tree with the given {@code identifier} or {@code null} if no * such tree exists. */ @Nullable public Tree getTree(String identifier) { if (identifier.startsWith("/")) { return root.getTree(identifier); } else { int k = identifier.indexOf('/'); String uuid = k == -1 ? identifier : identifier.substring(0, k); checkArgument(UUIDUtils.isValidUUID(uuid), "Not a valid identifier '" + identifier + '\''); String basePath = resolveUUID(uuid); if (basePath == null) { return null; } else if (k == -1) { return root.getTree(basePath); } else { return root.getTree(PathUtils.concat(basePath, identifier.substring(k + 1))); } } }
/** * @deprecated Use {@link UUIDUtils#generateUUID()} */ @Nonnull public static String generateUUID() { return UUIDUtils.generateUUID(); }
/** * The possibly non existing tree identified by the specified {@code identifier} or {@code null}. * * @param identifier The identifier of the tree such as exposed by {@link #getIdentifier(Tree)} * @return The tree with the given {@code identifier} or {@code null} if no * such tree exists. */ @CheckForNull public Tree getTree(String identifier) { if (identifier.startsWith("/")) { return root.getTree(identifier); } else { int k = identifier.indexOf('/'); String uuid = k == -1 ? identifier : identifier.substring(0, k); checkArgument(UUIDUtils.isValidUUID(uuid), "Not a valid identifier '" + identifier + '\''); String basePath = resolveUUID(uuid); if (basePath == null) { return null; } else if (k == -1) { return root.getTree(basePath); } else { return root.getTree(PathUtils.concat(basePath, identifier.substring(k + 1))); } } }
/** * @deprecated Use {@link UUIDUtils#generateUUID()} */ @NotNull public static String generateUUID() { return UUIDUtils.generateUUID(); }
/** * The possibly non existing tree identified by the specified {@code identifier} or {@code null}. * * @param identifier The identifier of the tree such as exposed by {@link #getIdentifier(Tree)} * @return The tree with the given {@code identifier} or {@code null} if no * such tree exists. */ @Nullable public Tree getTree(String identifier) { if (identifier.startsWith("/")) { return root.getTree(identifier); } else { int k = identifier.indexOf('/'); String uuid = k == -1 ? identifier : identifier.substring(0, k); checkArgument(UUIDUtils.isValidUUID(uuid), "Not a valid identifier '" + identifier + '\''); String basePath = resolveUUID(uuid); if (basePath == null) { return null; } else if (k == -1) { return root.getTree(basePath); } else { return root.getTree(PathUtils.concat(basePath, identifier.substring(k + 1))); } } }
private String getContentID(String authorizableId, boolean usercaseMappedProfile) { String s = authorizableId.toLowerCase(); if (usercaseMappedProfile) { s = java.text.Normalizer.normalize(s, java.text.Normalizer.Form.NFKC); } return UUIDUtils.generateUUID(s); }
return UUIDUtils.isValidUUID(value.getString()); case PropertyType.URI: new URI(value.getString());
@NotNull String getContentID(@NotNull String authorizableId) { String s = authorizableId.toLowerCase(); if (usercaseMappedProfile) { s = java.text.Normalizer.normalize(s, java.text.Normalizer.Form.NFKC); } return UUIDUtils.generateUUID(s); } }
return UUIDUtils.isValidUUID(value.getString()); case PropertyType.URI: new URI(value.getString());
@NotNull String getContentID(@NotNull String authorizableId) { String s = authorizableId.toLowerCase(); if (usercaseMappedProfile) { s = java.text.Normalizer.normalize(s, java.text.Normalizer.Form.NFKC); } return UUIDUtils.generateUUID(s); } }
return UUIDUtils.isValidUUID(value.getString()); case PropertyType.URI: new URI(value.getString());
@Nonnull String getContentID(@Nonnull String authorizableId) { String s = authorizableId.toLowerCase(); if (usercaseMappedProfile) { s = java.text.Normalizer.normalize(s, java.text.Normalizer.Form.NFKC); } return UUIDUtils.generateUUID(s); } }
private void checkPropertyTypeConstraints(PropertyState after) throws CommitFailedException { if (NodeStateUtils.isHidden(after.getName())) { return; } NodeState definition = effective.getDefinition(after); if (definition == null) { constraintViolation(4, "No matching property definition found for " + after); } else if (JCR_UUID.equals(after.getName()) && effective.isNodeType(MIX_REFERENCEABLE)) { // special handling for the jcr:uuid property of mix:referenceable // TODO: this should be done in a pluggable extension if (!isValidUUID(after.getValue(Type.STRING))) { constraintViolation(12, "Invalid UUID value in the jcr:uuid property"); } } else { int requiredType = getRequiredType(definition); if (requiredType != PropertyType.UNDEFINED) { checkRequiredType(after, requiredType); checkValueConstraints(definition, after, requiredType); } } }