Package org.apache.jackrabbit.core
Class PropertyImpl
- java.lang.Object
- 
- org.apache.jackrabbit.core.ItemImpl
- 
- org.apache.jackrabbit.core.PropertyImpl
 
 
- 
- 
Field Summary- 
Fields inherited from class org.apache.jackrabbit.core.ItemImplid, itemMgr, sessionContext, stateMgr, STATUS_DESTROYED, STATUS_INVALIDATED, STATUS_MODIFIED, STATUS_NORMAL
 - 
Fields inherited from interface javax.jcr.PropertyJCR_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 SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(ItemVisitor visitor)protected voidcheckSetValue(boolean multipleValues)Checks various pre-conditions that are common to allsetValue()methods.BinarygetBinary()Wrapper aroundgetValue()booleangetBoolean()Wrapper aroundgetValue()CalendargetDate()Wrapper aroundgetValue()BigDecimalgetDecimal()Wrapper aroundgetValue()PropertyDefinitiongetDefinition()doublegetDouble()Wrapper aroundgetValue()longgetLength()protected longgetLength(InternalValue value)Determines the length of the given value.long[]getLengths()longgetLong()Wrapper aroundgetValue()StringgetName()NodegetNode()protected ItemStategetOrCreateTransientItemState()NodegetParent()protected NodegetParent(boolean checkPermission)PropertygetProperty()NamegetQName()InputStreamgetStream()Wrapper aroundgetValue()StringgetString()Wrapper aroundgetValue()intgetType()ValuegetValue()Value[]getValues()InternalValueinternalGetValue()Returns the internal value of a single-valued property.InternalValue[]internalGetValues()Returns the internal values of a multi-valued property.protected voidinternalSetValue(InternalValue[] values, int type)booleanisMultiple()booleanisNode()protected voidmakePersistent()protected voidonRedefine(QPropertyDefinition def)protected voidrestoreTransient(PropertyState transientState)voidsetValue(boolean value)Wrapper aroundsetValue(Value)voidsetValue(double value)Wrapper aroundsetValue(Value)voidsetValue(long value)Wrapper aroundsetValue(Value)voidsetValue(InputStream value)Wrapper aroundsetValue(Value)voidsetValue(String value)Wrapper aroundsetValue(Value)voidsetValue(String[] strings)Wrapper aroundsetValue(Value[])voidsetValue(BigDecimal value)Wrapper aroundsetValue(Value)voidsetValue(Calendar value)Wrapper aroundsetValue(Value)voidsetValue(Binary value)Wrapper aroundsetValue(Value)voidsetValue(Node value)Wrapper aroundsetValue(Value)voidsetValue(Value value)voidsetValue(Value[] values)voidsetValue(Value[] values, int valueType)Sets the values of this property.voidsetValue(Name name)voidsetValue(Name[] names)Same asProperty.setValue(String[])Nameinstead ofStringvalues.StringtoString()Return a string representation of this property for diagnostic purposes.- 
Methods inherited from class org.apache.jackrabbit.core.ItemImplgetAncestor, getDepth, getId, getPath, getPrimaryPath, getQName, getSession, getType, getValueFactory, getValues, isModified, isNew, isSame, isTransactionalNew, isTransient, itemSanityCheck, perform, refresh, remove, safeGetJCRPath, sanityCheck, save, setRemoved
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface javax.jcr.ItemgetAncestor, getDepth, getPath, getSession, isModified, isNew, isSame, refresh, remove, save
 
- 
 
- 
- 
- 
Method Detail- 
getOrCreateTransientItemStateprotected ItemState getOrCreateTransientItemState() throws RepositoryException - Specified by:
- getOrCreateTransientItemStatein class- ItemImpl
- Throws:
- RepositoryException
 
 - 
makePersistentprotected void makePersistent() throws InvalidItemStateException- Specified by:
- makePersistentin class- ItemImpl
- Throws:
- InvalidItemStateException
 
 - 
restoreTransientprotected void restoreTransient(PropertyState transientState) throws RepositoryException - Throws:
- RepositoryException
 
 - 
onRedefineprotected void onRedefine(QPropertyDefinition def) throws RepositoryException - Throws:
- RepositoryException
 
 - 
getLengthprotected long getLength(InternalValue value) throws RepositoryException Determines the length of the given value.- Parameters:
- value- value whose length should be determined
- Returns:
- the length of the given value
- Throws:
- RepositoryException- if an error occurs
- See Also:
- Property.getLength(),- Property.getLengths()
 
 - 
checkSetValueprotected void checkSetValue(boolean multipleValues) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryExceptionChecks various pre-conditions that are common to allsetValue()methods. The checks performed are:- parent node must be checked-out
- property must not be protected
- parent node must not be locked by somebody else
- property must be multi-valued when set to an array of values (and vice versa)
 - Parameters:
- multipleValues- flag indicating whether the property is about to be set to an array of values
- Throws:
- ValueFormatException- if a single-valued property is set to an array of values (and vice versa)
- VersionException- if the parent node is not checked-out
- LockException- if the parent node is locked by somebody else
- ConstraintViolationException- if the property is protected
- RepositoryException- if another error occurs
- See Also:
- Property.setValue(javax.jcr.Value)
 
 - 
internalSetValueprotected void internalSetValue(InternalValue[] values, int type) throws ConstraintViolationException, RepositoryException - Parameters:
- values-
- type-
- Throws:
- ConstraintViolationException
- RepositoryException
 
 - 
getParentprotected Node getParent(boolean checkPermission) throws RepositoryException - Throws:
- RepositoryException
 
 - 
setValuepublic void setValue(Name name) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException - Parameters:
- name-
- Throws:
- ValueFormatException
- VersionException
- LockException
- ConstraintViolationException
- RepositoryException
 
 - 
setValuepublic void setValue(Name[] names) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException Same asProperty.setValue(String[])Nameinstead ofStringvalues.- Parameters:
- names-
- Throws:
- ValueFormatException
- VersionException
- LockException
- ConstraintViolationException
- RepositoryException
 
 - 
getQNamepublic Name getQName() 
 - 
internalGetValuespublic InternalValue[] internalGetValues() throws RepositoryException Returns the internal values of a multi-valued property.- Returns:
- array of values
- Throws:
- ValueFormatException- if this property is not multi-valued
- RepositoryException
 
 - 
internalGetValuepublic InternalValue internalGetValue() throws RepositoryException Returns the internal value of a single-valued property.- Returns:
- value
- Throws:
- ValueFormatException- if this property is not single-valued
- RepositoryException
 
 - 
getValuespublic Value[] getValues() throws RepositoryException - Specified by:
- getValuesin interface- Property
- Throws:
- RepositoryException
 
 - 
getValuepublic Value getValue() throws RepositoryException - Specified by:
- getValuein interface- Property
- Throws:
- RepositoryException
 
 - 
getStringpublic String getString() throws RepositoryException Wrapper aroundgetValue()- Specified by:
- getStringin interface- Property
- Throws:
- RepositoryException
 
 - 
getStreampublic InputStream getStream() throws RepositoryException Wrapper aroundgetValue()- Specified by:
- getStreamin interface- Property
- Throws:
- RepositoryException
 
 - 
getLongpublic long getLong() throws RepositoryExceptionWrapper aroundgetValue()- Specified by:
- getLongin interface- Property
- Throws:
- RepositoryException
 
 - 
getDoublepublic double getDouble() throws RepositoryExceptionWrapper aroundgetValue()- Specified by:
- getDoublein interface- Property
- Throws:
- RepositoryException
 
 - 
getDatepublic Calendar getDate() throws RepositoryException Wrapper aroundgetValue()- Specified by:
- getDatein interface- Property
- Throws:
- RepositoryException
 
 - 
getBooleanpublic boolean getBoolean() throws RepositoryExceptionWrapper aroundgetValue()- Specified by:
- getBooleanin interface- Property
- Throws:
- RepositoryException
 
 - 
getNodepublic Node getNode() throws ValueFormatException, RepositoryException - Specified by:
- getNodein interface- Property
- Throws:
- ValueFormatException
- RepositoryException
 
 - 
getPropertypublic Property getProperty() throws RepositoryException - Specified by:
- getPropertyin interface- Property
- Throws:
- RepositoryException
 
 - 
getDecimalpublic BigDecimal getDecimal() throws RepositoryException Wrapper aroundgetValue()- Specified by:
- getDecimalin interface- Property
- Throws:
- RepositoryException
 
 - 
setValuepublic void setValue(BigDecimal value) throws RepositoryException Wrapper aroundsetValue(Value)- Specified by:
- setValuein interface- Property
- Throws:
- RepositoryException
 
 - 
getBinarypublic Binary getBinary() throws RepositoryException Wrapper aroundgetValue()- Specified by:
- getBinaryin interface- Property
- Throws:
- RepositoryException
 
 - 
setValuepublic void setValue(Binary value) throws RepositoryException Wrapper aroundsetValue(Value)- Specified by:
- setValuein interface- Property
- Throws:
- RepositoryException
 
 - 
setValuepublic void setValue(Calendar value) throws RepositoryException Wrapper aroundsetValue(Value)- Specified by:
- setValuein interface- Property
- Throws:
- RepositoryException
 
 - 
setValuepublic void setValue(double value) throws RepositoryExceptionWrapper aroundsetValue(Value)- Specified by:
- setValuein interface- Property
- Throws:
- RepositoryException
 
 - 
setValuepublic void setValue(InputStream value) throws RepositoryException Wrapper aroundsetValue(Value)- Specified by:
- setValuein interface- Property
- Throws:
- RepositoryException
 
 - 
setValuepublic void setValue(String value) throws RepositoryException Wrapper aroundsetValue(Value)- Specified by:
- setValuein interface- Property
- Throws:
- RepositoryException
 
 - 
setValuepublic void setValue(String[] strings) throws RepositoryException Wrapper aroundsetValue(Value[])- Specified by:
- setValuein interface- Property
- Throws:
- RepositoryException
 
 - 
setValuepublic void setValue(boolean value) throws RepositoryExceptionWrapper aroundsetValue(Value)- Specified by:
- setValuein interface- Property
- Throws:
- RepositoryException
 
 - 
setValuepublic void setValue(Node value) throws RepositoryException Wrapper aroundsetValue(Value)- Specified by:
- setValuein interface- Property
- Throws:
- RepositoryException
 
 - 
setValuepublic void setValue(long value) throws RepositoryExceptionWrapper aroundsetValue(Value)- Specified by:
- setValuein interface- Property
- Throws:
- RepositoryException
 
 - 
setValuepublic void setValue(Value value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException - Specified by:
- setValuein interface- Property
- Throws:
- ValueFormatException
- VersionException
- LockException
- ConstraintViolationException
- RepositoryException
 
 - 
setValuepublic void setValue(Value[] values) throws RepositoryException - Specified by:
- setValuein interface- Property
- Throws:
- RepositoryException
 
 - 
setValuepublic void setValue(Value[] values, int valueType) throws RepositoryException Sets the values of this property.- Parameters:
- values- property values (possibly- null)
- valueType- default value type if not set in the node type, may be- PropertyType.UNDEFINED
- Throws:
- RepositoryException- if the property values could not be set
 
 - 
getLengthpublic long getLength() throws RepositoryException- Specified by:
- getLengthin interface- Property
- Throws:
- RepositoryException
 
 - 
getLengthspublic long[] getLengths() throws RepositoryException- Specified by:
- getLengthsin interface- Property
- Throws:
- RepositoryException
 
 - 
getDefinitionpublic PropertyDefinition getDefinition() throws RepositoryException - Specified by:
- getDefinitionin interface- Property
- Throws:
- RepositoryException
 
 - 
getTypepublic int getType() throws RepositoryException- Specified by:
- getTypein interface- Property
- Throws:
- RepositoryException
 
 - 
isMultiplepublic boolean isMultiple() throws RepositoryException- Specified by:
- isMultiplein interface- Property
- Throws:
- RepositoryException
 
 - 
isNodepublic boolean isNode() 
 - 
getNamepublic String getName() throws RepositoryException - Specified by:
- getNamein interface- Item
- Specified by:
- getNamein class- ItemImpl
- Throws:
- RepositoryException
 
 - 
acceptpublic void accept(ItemVisitor visitor) throws RepositoryException - Specified by:
- acceptin interface- Item
- Specified by:
- acceptin class- ItemImpl
- Throws:
- RepositoryException
 
 - 
getParentpublic Node getParent() throws RepositoryException - Specified by:
- getParentin interface- Item
- Specified by:
- getParentin class- ItemImpl
- Throws:
- RepositoryException
 
 
- 
 
-