@NotNull public static PropertyValue newReference(@NotNull String value) { return new PropertyStateValue(GenericPropertyState.referenceProperty("", value)); }
@Nonnull public static PropertyValue newReference(@Nonnull String value) { return new PropertyStateValue(GenericPropertyState.referenceProperty("", value)); }
@NotNull public Value createValue(@NotNull Node value, boolean weak) throws RepositoryException { if (!value.isNodeType(NodeType.MIX_REFERENCEABLE)) { throw new ValueFormatException( "Node is not referenceable: " + value.getPath()); } return weak ? newValue(GenericPropertyState.weakreferenceProperty("", value.getUUID()), namePathMapper, getBlobAccessProvider()) : newValue(GenericPropertyState.referenceProperty("", value.getUUID()), namePathMapper, getBlobAccessProvider()); }
@Override @SuppressWarnings("deprecation") public Value createValue(Node value, boolean weak) throws RepositoryException { if (!value.isNodeType(NodeType.MIX_REFERENCEABLE)) { throw new ValueFormatException( "Node is not referenceable: " + value.getPath()); } return weak ? newValue(GenericPropertyState.weakreferenceProperty("", value.getUUID()), namePathMapper) : newValue(GenericPropertyState.referenceProperty("", value.getUUID()), namePathMapper); }
p = GenericPropertyState.weakreferenceProperty(prop.getName(), ids.get(0)); } else { p = GenericPropertyState.referenceProperty(prop.getName(), ids.get(0));
p = GenericPropertyState.weakreferenceProperty(prop.getName(), ids.get(0)); } else { p = GenericPropertyState.referenceProperty(prop.getName(), ids.get(0));
p = GenericPropertyState.weakreferenceProperty(prop.getName(), ids.get(0)); } else { p = GenericPropertyState.referenceProperty(prop.getName(), ids.get(0));
throw new ValueFormatException("Invalid reference value " + value); return newValue(GenericPropertyState.referenceProperty("", value), namePathMapper, getBlobAccessProvider()); case PropertyType.WEAKREFERENCE: if (!UUIDUtils.isValidUUID(value)) {
throw new ValueFormatException("Invalid reference value " + value); return newValue(GenericPropertyState.referenceProperty("", value), namePathMapper); case PropertyType.WEAKREFERENCE: if (!UUIDUtils.isValidUUID(value)) {
return type.isArray() ? MultiGenericPropertyState.referenceProperty(name, (Iterable<String>) value) : GenericPropertyState.referenceProperty(name, (String) value); case PropertyType.WEAKREFERENCE: return type.isArray()
return type.isArray() ? MultiGenericPropertyState.referenceProperty(name, (Iterable<String>) value) : GenericPropertyState.referenceProperty(name, (String) value); case PropertyType.WEAKREFERENCE: return type.isArray()