Package com.enonic.xp.data
Class PropertyTree
- java.lang.Object
-
- com.enonic.xp.data.PropertyTree
-
- All Implemented Interfaces:
Serializable
@PublicApi public final class PropertyTree extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PropertyTree()
Creates a new PropertyTree using a default PropertyIdProvider which uses UUID.randomUUID().
-
Method Summary
-
-
-
Method Detail
-
copy
public PropertyTree copy()
-
getProperties
public ImmutableList<Property> getProperties(ValueType valueType)
-
ifNotNull
public PropertyTree ifNotNull()
-
newSet
public PropertySet newSet()
-
newSet
public PropertySet newSet(PropertyTree source)
-
countNames
public int countNames(String name)
-
setProperty
public Property setProperty(PropertyPath path, Value value)
-
setValues
public void setValues(PropertyPath path, Iterable<Value> values)
-
removeProperty
public void removeProperty(String path)
-
removeProperty
public void removeProperty(PropertyPath path)
-
removeProperties
public void removeProperties(String name)
-
getRoot
public PropertySet getRoot()
-
hasProperty
public boolean hasProperty(String path)
-
hasProperty
public boolean hasProperty(PropertyPath path)
-
hasProperty
public boolean hasProperty(String name, int index)
-
getProperty
public Property getProperty(PropertyPath path)
-
getProperties
public ImmutableList<Property> getProperties(String name)
-
getValue
public Value getValue(PropertyPath path)
-
getPropertySet
public PropertySet getPropertySet(PropertyPath path)
-
getPropertySet
public PropertySet getPropertySet(String path)
-
getTotalSize
public int getTotalSize()
-
setSet
public Property setSet(PropertyPath path, PropertySet value)
-
setSet
public Property setSet(String path, PropertySet value)
-
setSet
public Property setSet(String name, int index, PropertySet value)
-
addSet
public Property addSet(String name, PropertySet value)
-
addSets
public Property[] addSets(String name, PropertySet... value)
-
addSet
public PropertySet addSet(String name)
-
setString
public Property setString(PropertyPath path, String value)
-
addStrings
public Property[] addStrings(String name, Collection<String> values)
-
setXml
public Property setXml(PropertyPath path, String value)
-
setBinaryReference
public Property setBinaryReference(PropertyPath path, BinaryReference value)
-
setBinaryReference
public Property setBinaryReference(String path, BinaryReference value)
-
setBinaryReference
public Property setBinaryReference(String name, int index, BinaryReference value)
-
addBinaryReference
public Property addBinaryReference(String name, BinaryReference value)
-
addBinaryReferences
public Property[] addBinaryReferences(String name, BinaryReference... value)
-
setReference
public Property setReference(PropertyPath path, Reference value)
-
setLink
public Property setLink(PropertyPath path, Link value)
-
setBoolean
public Property setBoolean(PropertyPath path, Boolean value)
-
setLong
public Property setLong(PropertyPath path, Long value)
-
setDouble
public Property setDouble(PropertyPath path, Double value)
-
setGeoPoint
public Property setGeoPoint(PropertyPath path, GeoPoint value)
-
setLocalDate
public Property setLocalDate(PropertyPath path, LocalDate value)
-
setLocalDateTime
public Property setLocalDateTime(PropertyPath path, LocalDateTime value)
-
setLocalDateTime
public Property setLocalDateTime(String path, LocalDateTime value)
-
setLocalDateTime
public Property setLocalDateTime(String name, int index, LocalDateTime value)
-
addLocalDateTime
public Property addLocalDateTime(String name, LocalDateTime value)
-
addLocalDateTimes
public Property[] addLocalDateTimes(String name, LocalDateTime... value)
-
setLocalTime
public Property setLocalTime(PropertyPath path, LocalTime value)
-
setInstant
public Property setInstant(PropertyPath path, Instant value)
-
getSet
public PropertySet getSet(String name, int index)
-
getSet
public PropertySet getSet(PropertyPath path)
-
getSet
public PropertySet getSet(String path)
-
getSets
public Iterable<PropertySet> getSets(String name)
-
getString
public String getString(PropertyPath path)
-
getBoolean
public Boolean getBoolean(PropertyPath path)
-
getLong
public Long getLong(PropertyPath path)
-
getDouble
public Double getDouble(PropertyPath path)
-
getGeoPoint
public GeoPoint getGeoPoint(PropertyPath path)
-
getBinaryReference
public BinaryReference getBinaryReference(String name, int index)
-
getBinaryReference
public BinaryReference getBinaryReference(PropertyPath path)
-
getBinaryReference
public BinaryReference getBinaryReference(String path)
-
getBinaryReferences
public Iterable<BinaryReference> getBinaryReferences(String name)
-
getLink
public Link getLink(PropertyPath path)
-
getReference
public Reference getReference(PropertyPath path)
-
getLocalDate
public LocalDate getLocalDate(PropertyPath path)
-
getLocalDateTime
public LocalDateTime getLocalDateTime(String name, int index)
-
getLocalDateTime
public LocalDateTime getLocalDateTime(PropertyPath path)
-
getLocalDateTime
public LocalDateTime getLocalDateTime(String path)
-
getLocalDateTimes
public Iterable<LocalDateTime> getLocalDateTimes(String name)
-
getLocalTime
public LocalTime getLocalTime(PropertyPath path)
-
getInstant
public Instant getInstant(PropertyPath path)
-
-