Class PropInfo
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.xml.PropInfo
-
public class PropInfo extends java.lang.Object
Information about a property being imported. This class is used by the XML import handlers to pass the parsed property information to the import process.In addition to carrying the actual property data, instances of this class also know how to apply that data when imported either to a
Node
instance through a session or directly to aTree
instance on the oak level.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PropInfo.MultipleStatus
Hint indicating whether the property is multi- or single-value
-
Constructor Summary
Constructors Constructor Description PropInfo(@Nullable java.lang.String name, int type, @NotNull java.util.List<? extends TextValue> values)
Creates a property information instance.PropInfo(@Nullable java.lang.String name, int type, @NotNull java.util.List<? extends TextValue> values, @NotNull PropInfo.MultipleStatus multipleStatus)
Creates a property information instance.PropInfo(@Nullable java.lang.String name, int type, @NotNull TextValue value)
Creates a property information instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyState
asPropertyState(@NotNull PropertyDefinition propertyDefinition)
void
dispose()
Disposes all values contained in this property.@Nullable java.lang.String
getName()
int
getTargetType(PropertyDefinition def)
@NotNull TextValue
getTextValue()
@NotNull java.util.List<? extends TextValue>
getTextValues()
int
getType()
@NotNull Value
getValue(int targetType)
@NotNull java.util.List<Value>
getValues(int targetType)
boolean
isUnknownMultiple()
-
-
-
Constructor Detail
-
PropInfo
public PropInfo(@Nullable @Nullable java.lang.String name, int type, @NotNull @NotNull TextValue value)
Creates a property information instance.- Parameters:
name
- name of the property being importedtype
- type of the property being importedvalue
- value of the property being imported
-
PropInfo
public PropInfo(@Nullable @Nullable java.lang.String name, int type, @NotNull @NotNull java.util.List<? extends TextValue> values)
Creates a property information instance.- Parameters:
name
- name of the property being importedtype
- type of the property being importedvalues
- value(s) of the property being imported
-
PropInfo
public PropInfo(@Nullable @Nullable java.lang.String name, int type, @NotNull @NotNull java.util.List<? extends TextValue> values, @NotNull @NotNull PropInfo.MultipleStatus multipleStatus)
Creates a property information instance.- Parameters:
name
- name of the property being importedtype
- type of the property being importedvalues
- value(s) of the property being importedmultipleStatus
- Hint indicating whether the property is
-
-
Method Detail
-
dispose
public void dispose()
Disposes all values contained in this property.
-
getTargetType
public int getTargetType(PropertyDefinition def)
-
getName
@Nullable public @Nullable java.lang.String getName()
-
getType
public int getType()
-
isUnknownMultiple
public boolean isUnknownMultiple()
-
getTextValue
@NotNull public @NotNull TextValue getTextValue() throws RepositoryException
- Throws:
RepositoryException
-
getTextValues
@NotNull public @NotNull java.util.List<? extends TextValue> getTextValues()
-
getValue
@NotNull public @NotNull Value getValue(int targetType) throws RepositoryException
- Throws:
RepositoryException
-
getValues
@NotNull public @NotNull java.util.List<Value> getValues(int targetType) throws RepositoryException
- Throws:
RepositoryException
-
asPropertyState
public PropertyState asPropertyState(@NotNull @NotNull PropertyDefinition propertyDefinition) throws RepositoryException
- Throws:
RepositoryException
-
-