|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.ItemImpl
org.apache.jackrabbit.core.PropertyImpl
public class PropertyImpl
PropertyImpl implements the Property interface.
| Field Summary |
|---|
| Fields inherited from class org.apache.jackrabbit.core.ItemImpl |
|---|
id, itemMgr, rep, session, stateMgr, STATUS_DESTROYED, STATUS_INVALIDATED, STATUS_MODIFIED, STATUS_NORMAL |
| Method Summary | |
|---|---|
void |
accept(ItemVisitor visitor)
|
protected void |
checkSetValue(boolean multipleValues)
Checks various pre-conditions that are common to all setValue() methods. |
Binary |
getBinary()
|
boolean |
getBoolean()
|
Calendar |
getDate()
|
BigDecimal |
getDecimal()
|
PropertyDefinition |
getDefinition()
|
double |
getDouble()
|
long |
getLength()
|
protected long |
getLength(InternalValue value)
Determines the length of the given value. |
long[] |
getLengths()
|
long |
getLong()
|
String |
getName()
|
Node |
getNode()
|
protected ItemState |
getOrCreateTransientItemState()
|
Node |
getParent()
|
Property |
getProperty()
|
Name |
getQName()
Same as except that
this method returns a Name instead of a
String. |
InputStream |
getStream()
|
String |
getString()
|
int |
getType()
|
Value |
getValue()
|
Value[] |
getValues()
|
InternalValue |
internalGetValue()
Returns the internal value of a single-valued property. |
InternalValue[] |
internalGetValues()
Returns the internal values of a multi-valued property. |
protected void |
internalSetValue(InternalValue[] values,
int type)
|
boolean |
isMultiple()
|
boolean |
isNode()
|
protected void |
makePersistent()
|
protected void |
onRedefine(QPropertyDefinition def)
|
protected void |
restoreTransient(PropertyState transientState)
|
void |
setValue(BigDecimal value)
|
void |
setValue(Binary value)
|
void |
setValue(boolean value)
|
void |
setValue(Calendar value)
|
void |
setValue(double value)
|
void |
setValue(InputStream value)
|
void |
setValue(long value)
|
void |
setValue(Name name)
Same as except that
this method takes a Name instead of a String
value. |
void |
setValue(Name[] names)
Same as except that
this method takes an array of Name instead of
String values. |
void |
setValue(Node target)
|
void |
setValue(String value)
|
void |
setValue(String[] strings)
|
void |
setValue(Value value)
|
void |
setValue(Value[] values)
|
void |
setValue(Value[] values,
int valueType)
Sets the values of this property. |
String |
toString()
Return a string representation of this property for diagnostic purposes. |
| Methods inherited from class org.apache.jackrabbit.core.ItemImpl |
|---|
getAncestor, getDepth, getId, getPath, getPrimaryPath, getSession, internalRemove, isModified, isNew, isSame, isTransactionalNew, isTransient, refresh, remove, safeGetJCRPath, sanityCheck, save, setRemoved |
| 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, getPath, getSession, isModified, isNew, isSame, refresh, remove, save |
| Method Detail |
|---|
protected ItemState getOrCreateTransientItemState()
throws RepositoryException
getOrCreateTransientItemState in class ItemImplRepositoryException
protected void makePersistent()
throws InvalidItemStateException
makePersistent in class ItemImplInvalidItemStateException
protected void restoreTransient(PropertyState transientState)
throws RepositoryException
RepositoryException
protected void onRedefine(QPropertyDefinition def)
throws RepositoryException
RepositoryException
protected long getLength(InternalValue value)
throws RepositoryException
value - value whose length should be determined
RepositoryException - if an error occursProperty.getLength(),
Property.getLengths()
protected void checkSetValue(boolean multipleValues)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
setValue() methods. The checks performed are:
multipleValues - flag indicating whether the property is about to
be set to an array of values
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 occursProperty.setValue(javax.jcr.Value)
protected void internalSetValue(InternalValue[] values,
int type)
throws ConstraintViolationException,
RepositoryException
values - type -
ConstraintViolationException
RepositoryException
public void setValue(Name name)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
Property.setValue(String) except that
this method takes a Name instead of a String
value.
name -
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public void setValue(Name[] names)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
Property.setValue(String[]) except that
this method takes an array of Name instead of
String values.
names -
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryExceptionpublic Name getQName()
Item.getName() except that
this method returns a Name instead of a
String.
getQName in class ItemImplName
public InternalValue[] internalGetValues()
throws RepositoryException
ValueFormatException - if this property is not multi-valued
RepositoryException
public InternalValue internalGetValue()
throws RepositoryException
ValueFormatException - if this property is not single-valued
RepositoryException
public Value[] getValues()
throws RepositoryException
getValues in interface PropertyRepositoryException
public Value getValue()
throws RepositoryException
getValue in interface PropertyRepositoryException
public String getString()
throws RepositoryException
getString in interface PropertyRepositoryException
public InputStream getStream()
throws RepositoryException
getStream in interface PropertyRepositoryException
public long getLong()
throws RepositoryException
getLong in interface PropertyRepositoryException
public double getDouble()
throws RepositoryException
getDouble in interface PropertyRepositoryException
public Calendar getDate()
throws RepositoryException
getDate in interface PropertyRepositoryException
public boolean getBoolean()
throws RepositoryException
getBoolean in interface PropertyRepositoryException
public Node getNode()
throws ValueFormatException,
RepositoryException
getNode in interface PropertyValueFormatException
RepositoryException
public Property getProperty()
throws RepositoryException
getProperty in interface PropertyRepositoryException
public BigDecimal getDecimal()
throws RepositoryException
getDecimal in interface PropertyRepositoryException
public void setValue(BigDecimal value)
throws RepositoryException
setValue in interface PropertyRepositoryException
public Binary getBinary()
throws RepositoryException
getBinary in interface PropertyRepositoryException
public void setValue(Binary value)
throws RepositoryException
setValue in interface PropertyRepositoryException
public void setValue(Calendar value)
throws RepositoryException
setValue in interface PropertyRepositoryException
public void setValue(double value)
throws RepositoryException
setValue in interface PropertyRepositoryException
public void setValue(InputStream value)
throws RepositoryException
setValue in interface PropertyRepositoryException
public void setValue(String value)
throws RepositoryException
setValue in interface PropertyRepositoryException
public void setValue(String[] strings)
throws RepositoryException
setValue in interface PropertyRepositoryException
public void setValue(boolean value)
throws RepositoryException
setValue in interface PropertyRepositoryException
public void setValue(Node target)
throws ValueFormatException,
RepositoryException
setValue in interface PropertyValueFormatException
RepositoryException
public void setValue(long value)
throws RepositoryException
setValue in interface PropertyRepositoryException
public void setValue(Value value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
setValue in interface PropertyValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public void setValue(Value[] values)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
setValue in interface PropertyValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public void setValue(Value[] values,
int valueType)
throws RepositoryException
values - property values (possibly null)valueType - default value type if not set in the node type,
may be PropertyType.UNDEFINED
RepositoryException - if the property values could not be set
public long getLength()
throws RepositoryException
getLength in interface PropertyRepositoryException
public long[] getLengths()
throws RepositoryException
getLengths in interface PropertyRepositoryException
public PropertyDefinition getDefinition()
throws RepositoryException
getDefinition in interface PropertyRepositoryException
public int getType()
throws RepositoryException
getType in interface PropertyRepositoryException
public boolean isMultiple()
throws RepositoryException
isMultiple in interface PropertyRepositoryExceptionpublic boolean isNode()
isNode in interface ItemisNode in class ItemImpl
public String getName()
throws RepositoryException
getName in interface ItemgetName in class ItemImplRepositoryException
public void accept(ItemVisitor visitor)
throws RepositoryException
accept in interface Itemaccept in class ItemImplRepositoryException
public Node getParent()
throws RepositoryException
getParent in interface ItemgetParent in class ItemImplRepositoryExceptionpublic String toString()
toString in class ItemImpl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||