public final class PropertyStates extends Object
PropertyState instances.@NotNull public static @NotNull org.apache.jackrabbit.oak.api.PropertyState createProperty(String name, Value value) throws RepositoryException
PropertyState based on a Value. The
Type of the property state is determined by the
type of the value.name - The name of the property statevalue - The value of the property stateRepositoryException - forwarded from value@NotNull public static @NotNull org.apache.jackrabbit.oak.api.PropertyState createProperty(String name, Iterable<Value> values) throws RepositoryException
PropertyState based on a list of
Value instances. The Type of the property is determined
by the type of the first value in the list or Type.STRING if the
list is empty.name - The name of the property statevalues - The values of the property stateRepositoryException - forwarded from valuepublic static org.apache.jackrabbit.oak.api.PropertyState createProperty(String name, Iterable<Value> values, int type) throws RepositoryException
RepositoryException@NotNull public static @NotNull org.apache.jackrabbit.oak.api.PropertyState createProperty(String name, String value, int type)
PropertyState from a string.name - The name of the property statevalue - The value of the property statetype - The type of the property state@NotNull public static @NotNull org.apache.jackrabbit.oak.api.PropertyState createProperty(String name, Object value, org.apache.jackrabbit.oak.api.Type<?> type)
PropertyState.name - The name of the property statevalue - The value of the property statetype - The type of the property state@NotNull public static <T> @NotNull org.apache.jackrabbit.oak.api.PropertyState createProperty(String name, T value)
PropertyState where the Type of the property state
is inferred from the runtime type of T according to the mapping
established through Type.name - The name of the property statevalue - The value of the property statepublic static org.apache.jackrabbit.oak.api.PropertyState convert(org.apache.jackrabbit.oak.api.PropertyState state, org.apache.jackrabbit.oak.api.Type<?> type)
Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.