Class PropertyImpl
- java.lang.Object
-
- org.apache.jackrabbit.oak.jcr.session.PropertyImpl
-
-
Field Summary
Fields Modifier and Type Field Description protected Tdlgstatic StringITEM_SAVE_DOES_SESSION_SAVEstatic intMV_PROPERTY_WARN_THRESHOLDstatic booleanSAVE_SESSIONThe value of this flag determines the behaviour ofItem.save().protected SessionContextsessionContextprotected SessionDelegatesessionDelegate-
Fields inherited from interface javax.jcr.Property
JCR_ACTIVITY, JCR_AUTOCREATED, JCR_BASE_VERSION, JCR_CHILD_VERSION_HISTORY, JCR_CONFIGURATION, JCR_CONTENT, JCR_COPIED_FROM, JCR_CREATED, JCR_CREATED_BY, JCR_CURRENT_LIFECYCLE_STATE, JCR_DATA, JCR_DEFAULT_PRIMARY_TYPE, JCR_DEFAULT_VALUES, JCR_DESCRIPTION, JCR_ENCODING, JCR_FROZEN_MIXIN_TYPES, JCR_FROZEN_PRIMARY_TYPE, JCR_FROZEN_UUID, JCR_HAS_ORDERABLE_CHILD_NODES, JCR_HOST, JCR_ID, JCR_IS_ABSTRACT, JCR_IS_CHECKED_OUT, JCR_IS_MIXIN, JCR_LANGUAGE, JCR_LAST_MODIFIED, JCR_LAST_MODIFIED_BY, JCR_LIFECYCLE_POLICY, JCR_LOCK_IS_DEEP, JCR_LOCK_OWNER, JCR_MANDATORY, JCR_MERGE_FAILED, JCR_MIMETYPE, JCR_MIXIN_TYPES, JCR_MULTIPLE, JCR_NAME, JCR_NODE_TYPE_NAME, JCR_ON_PARENT_VERSION, JCR_PATH, JCR_PORT, JCR_PREDECESSORS, JCR_PRIMARY_ITEM_NAME, JCR_PRIMARY_TYPE, JCR_PROTECTED, JCR_PROTOCOL, JCR_REPOSITORY, JCR_REQUIRED_PRIMARY_TYPES, JCR_REQUIRED_TYPE, JCR_ROOT, JCR_SAME_NAME_SIBLINGS, JCR_STATEMENT, JCR_SUCCESSORS, JCR_SUPERTYPES, JCR_TITLE, JCR_UUID, JCR_VALUE_CONSTRAINTS, JCR_VERSION_HISTORY, JCR_VERSIONABLE_UUID, JCR_WORKSPACE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(ItemVisitor visitor)protected @NotNull PropertyStatecreateMultiState(String oakName, List<Value> values, Type<?> type)protected @NotNull PropertyStatecreateSingleState(String oakName, Value value, Type<?> type)ItemgetAncestor(int depth)@NotNull BinarygetBinary()booleangetBoolean()@NotNull CalendargetDate()@NotNull BigDecimalgetDecimal()@NotNull PropertyDefinitiongetDefinition()intgetDepth()doublegetDouble()longgetLength()@org.jetbrains.annotations.NotNull long[]getLengths()longgetLong()@NotNull StringgetName()@NotNull NodegetNode()@NotNull NodegetParent()@NotNull StringgetPath()@NotNull PropertygetProperty()@NotNull SessiongetSession()@NotNull InputStreamgetStream()@NotNull StringgetString()intgetType()@NotNull ValuegetValue()@NotNull Value[]getValues()booleanisModified()booleanisMultiple()booleanisNew()booleanisNode()booleanisSame(Item otherItem)protected <U> Uperform(@NotNull SessionOperation<U> op)Perform the passedSessionOperation.voidrefresh(boolean keepChanges)voidremove()voidsave()voidsetValue(boolean value)voidsetValue(double value)voidsetValue(long value)voidsetValue(InputStream value)voidsetValue(String value)voidsetValue(String[] strings)voidsetValue(BigDecimal value)voidsetValue(Calendar value)voidsetValue(Binary value)voidsetValue(Node value)voidsetValue(Value value)voidsetValue(Value[] values)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.jcr.Item
getAncestor, getDepth, getName, getPath, getSession, isSame, refresh, save
-
-
-
-
Field Detail
-
ITEM_SAVE_DOES_SESSION_SAVE
public static final String ITEM_SAVE_DOES_SESSION_SAVE
- See Also:
- Constant Field Values
-
MV_PROPERTY_WARN_THRESHOLD
public static final int MV_PROPERTY_WARN_THRESHOLD
- See Also:
- Constant Field Values
-
SAVE_SESSION
public static final boolean SAVE_SESSION
The value of this flag determines the behaviour ofItem.save(). Iffalse, save will throw aUnsupportedRepositoryOperationExceptionif the sub tree rooted at this item does not contain all transient changes. Iftrue, save will delegate toSession.save().
-
sessionContext
protected final SessionContext sessionContext
-
dlg
protected final T extends ItemDelegate dlg
-
sessionDelegate
protected final SessionDelegate sessionDelegate
-
-
Method Detail
-
getParent
@NotNull public @NotNull Node getParent() throws RepositoryException
- Specified by:
getParentin interfaceItem- Throws:
RepositoryException
-
isModified
public boolean isModified()
- Specified by:
isModifiedin interfaceItem
-
remove
public void remove() throws RepositoryException- Specified by:
removein interfaceItem- Throws:
RepositoryException
-
accept
public void accept(ItemVisitor visitor) throws RepositoryException
- Specified by:
acceptin interfaceItem- Throws:
RepositoryException
-
setValue
public void setValue(Value value) throws RepositoryException
- Specified by:
setValuein interfaceProperty- Throws:
RepositoryException
-
setValue
public void setValue(Value[] values) throws RepositoryException
- Specified by:
setValuein interfaceProperty- Throws:
RepositoryException
-
setValue
public void setValue(String value) throws RepositoryException
- Specified by:
setValuein interfaceProperty- Throws:
RepositoryException
-
setValue
public void setValue(String[] strings) throws RepositoryException
- Specified by:
setValuein interfaceProperty- Throws:
RepositoryException
-
setValue
public void setValue(InputStream value) throws RepositoryException
- Specified by:
setValuein interfaceProperty- Throws:
RepositoryException
-
setValue
public void setValue(Binary value) throws RepositoryException
- Specified by:
setValuein interfaceProperty- Throws:
RepositoryException
-
setValue
public void setValue(long value) throws RepositoryException- Specified by:
setValuein interfaceProperty- Throws:
RepositoryException
-
setValue
public void setValue(double value) throws RepositoryException- Specified by:
setValuein interfaceProperty- Throws:
RepositoryException
-
setValue
public void setValue(BigDecimal value) throws RepositoryException
- Specified by:
setValuein interfaceProperty- Throws:
RepositoryException
-
setValue
public void setValue(Calendar value) throws RepositoryException
- Specified by:
setValuein interfaceProperty- Throws:
RepositoryException
-
setValue
public void setValue(boolean value) throws RepositoryException- Specified by:
setValuein interfaceProperty- Throws:
RepositoryException
-
setValue
public void setValue(Node value) throws RepositoryException
- Specified by:
setValuein interfaceProperty- Throws:
RepositoryException
-
getValue
@NotNull public @NotNull Value getValue() throws RepositoryException
- Specified by:
getValuein interfaceProperty- Throws:
RepositoryException
-
getValues
@NotNull public @NotNull Value[] getValues() throws RepositoryException
- Specified by:
getValuesin interfaceProperty- Throws:
RepositoryException
-
getString
@NotNull public @NotNull String getString() throws RepositoryException
- Specified by:
getStringin interfaceProperty- Throws:
RepositoryException
-
getStream
@NotNull public @NotNull InputStream getStream() throws RepositoryException
- Specified by:
getStreamin interfaceProperty- Throws:
RepositoryException
-
getBinary
@NotNull public @NotNull Binary getBinary() throws RepositoryException
- Specified by:
getBinaryin interfaceProperty- Throws:
RepositoryException
-
getLong
public long getLong() throws RepositoryException- Specified by:
getLongin interfaceProperty- Throws:
RepositoryException
-
getDouble
public double getDouble() throws RepositoryException- Specified by:
getDoublein interfaceProperty- Throws:
RepositoryException
-
getDecimal
@NotNull public @NotNull BigDecimal getDecimal() throws RepositoryException
- Specified by:
getDecimalin interfaceProperty- Throws:
RepositoryException
-
getDate
@NotNull public @NotNull Calendar getDate() throws RepositoryException
- Specified by:
getDatein interfaceProperty- Throws:
RepositoryException
-
getBoolean
public boolean getBoolean() throws RepositoryException- Specified by:
getBooleanin interfaceProperty- Throws:
RepositoryException
-
getNode
@NotNull public @NotNull Node getNode() throws RepositoryException
- Specified by:
getNodein interfaceProperty- Throws:
RepositoryException
-
getProperty
@NotNull public @NotNull Property getProperty() throws RepositoryException
- Specified by:
getPropertyin interfaceProperty- Throws:
RepositoryException
-
getLength
public long getLength() throws RepositoryException- Specified by:
getLengthin interfaceProperty- Throws:
RepositoryException
-
getLengths
@NotNull public @org.jetbrains.annotations.NotNull long[] getLengths() throws RepositoryException- Specified by:
getLengthsin interfaceProperty- Throws:
RepositoryException
-
getDefinition
@NotNull public @NotNull PropertyDefinition getDefinition() throws RepositoryException
- Specified by:
getDefinitionin interfaceProperty- Throws:
RepositoryException
-
getType
public int getType() throws RepositoryException- Specified by:
getTypein interfaceProperty- Throws:
RepositoryException
-
isMultiple
public boolean isMultiple() throws RepositoryException- Specified by:
isMultiplein interfaceProperty- Throws:
RepositoryException
-
perform
@NotNull protected final <U> U perform(@NotNull @NotNull SessionOperation<U> op) throws RepositoryExceptionPerform the passedSessionOperation.- Type Parameters:
U- return type of the operation- Parameters:
op- operation to perform- Returns:
- the result of
op.perform() - Throws:
RepositoryException- as thrown byop.perform().
-
getName
@NotNull public @NotNull String getName() throws RepositoryException
- Specified by:
getNamein interfaceItem- Throws:
RepositoryException- See Also:
Item.getName()
-
getPath
@NotNull public @NotNull String getPath() throws RepositoryException
- Specified by:
getPathin interfaceItem- Throws:
RepositoryException- See Also:
Item.getPath()
-
getSession
@NotNull public @NotNull Session getSession()
- Specified by:
getSessionin interfaceItem
-
getAncestor
public Item getAncestor(int depth) throws RepositoryException
- Specified by:
getAncestorin interfaceItem- Throws:
RepositoryException
-
getDepth
public int getDepth() throws RepositoryException- Specified by:
getDepthin interfaceItem- Throws:
RepositoryException
-
isSame
public boolean isSame(Item otherItem) throws RepositoryException
- Specified by:
isSamein interfaceItem- Throws:
RepositoryException- See Also:
Item.isSame(javax.jcr.Item)
-
save
public void save() throws RepositoryExceptionThis implementation delegates toSession.save()ifSAVE_SESSIONistrue. Otherwise it only performs the save if the subtree rooted at this item contains all transient changes. That is, if callingSession.save()would have the same effect as calling this method. In all other cases this method will throw anUnsupportedRepositoryOperationException- Specified by:
savein interfaceItem- Throws:
RepositoryException- See Also:
Item.save()
-
refresh
public void refresh(boolean keepChanges) throws RepositoryException- Specified by:
refreshin interfaceItem- Throws:
RepositoryException- See Also:
Item.refresh(boolean)
-
createSingleState
@NotNull protected @NotNull PropertyState createSingleState(String oakName, Value value, Type<?> type) throws RepositoryException
- Throws:
RepositoryException
-
createMultiState
@NotNull protected @NotNull PropertyState createMultiState(String oakName, List<Value> values, Type<?> type) throws RepositoryException
- Throws:
RepositoryException
-
-