static org.apache.sling.api.resource.Resource |
JsonUtil.createResource(org.apache.sling.api.resource.ResourceResolver resolver,
String path,
Map<String,JsonUtil.JsonProperty> propertiesSet,
javax.jcr.ValueFactory factory,
MappingRules mapping) |
Creates the resource parsed from JSON.
|
static void |
JsonUtil.exportJson(@NotNull com.google.gson.stream.JsonWriter writer,
@NotNull org.apache.sling.api.resource.Resource resource,
MappingRules mapping) |
|
static void |
JsonUtil.exportJson(com.google.gson.stream.JsonWriter writer,
org.apache.sling.api.resource.Resource resource,
MappingRules mapping,
int depth) |
|
static void |
JsonUtil.exportProperties(@NotNull com.google.gson.stream.JsonWriter writer,
@NotNull org.apache.sling.api.resource.Resource resource,
MappingRules mapping) |
|
static String |
JsonUtil.getValueString(Object value,
int type,
MappingRules mapping) |
Embeds the property type in the string value if the formats scope is 'value'.
|
static org.apache.sling.api.resource.Resource |
JsonUtil.importJson(com.google.gson.stream.JsonReader reader,
org.apache.sling.api.resource.ResourceResolver resolver,
String path,
MappingRules mapping) |
|
static boolean |
JsonUtil.importJsonProperty(javax.jcr.ValueFactory factory,
org.apache.sling.api.resource.Resource resource,
JsonUtil.JsonProperty property,
MappingRules mapping) |
Changes the property specified by the JSON POJO of the given node if the change rule is appropriate to
the current state of the node (changes are made only if not only 'extend' is specified as rule or if
the property is new) and if the property filter of the rules accepts the property.
|
static javax.jcr.Value |
JsonUtil.makeJcrValue(javax.jcr.Node node,
int type,
Object object,
MappingRules mapping) |
Create a JCR value from string value for the designated JCR type.
|
static boolean |
JsonUtil.setJsonProperty(javax.jcr.Node node,
JsonUtil.JsonProperty property,
MappingRules mapping) |
Creates or updates one property at a JCR node.
|
static void |
JsonUtil.writeJsonProperties(@NotNull org.apache.sling.api.resource.Resource resource,
@NotNull com.google.gson.stream.JsonWriter writer,
@NotNull StringFilter filter,
@Nullable javax.jcr.Node node,
@NotNull MappingRules mapping) |
Write all properties of an node accepted by the filter into an JSON array.
|
static void |
JsonUtil.writeJsonProperty(@NotNull org.apache.sling.api.resource.Resource resource,
@NotNull com.google.gson.stream.JsonWriter writer,
@Nullable String name,
@Nullable Object value,
@NotNull MappingRules mapping) |
Writes a resource property (without node - probably synthetic resource)
|
static void |
JsonUtil.writeJsonProperty(@NotNull org.apache.sling.api.resource.Resource resource,
@NotNull com.google.gson.stream.JsonWriter writer,
@Nullable javax.jcr.Property property,
@NotNull MappingRules mapping) |
Writes a JCR property as an JSON object: { name: ..., value: ..., type: ..., multi: ...}.
|
static void |
JsonUtil.writeJsonValue(@NotNull org.apache.sling.api.resource.Resource resource,
@NotNull com.google.gson.stream.JsonWriter writer,
@NotNull String name,
@NotNull Object value,
@NotNull Integer type,
@NotNull MappingRules mapping) |
Write a JCR value to the JSON writer.
|
static void |
JsonUtil.writeJsonValueMap(@NotNull org.apache.sling.api.resource.Resource resource,
@NotNull com.google.gson.stream.JsonWriter writer,
@NotNull StringFilter filter,
@Nullable org.apache.sling.api.resource.ValueMap values,
@NotNull MappingRules mapping) |
Write all properties of an node accepted by the filter into an JSON array.
|