Class MockValue
- java.lang.Object
-
- org.apache.sling.commons.testing.jcr.MockValue
-
- All Implemented Interfaces:
javax.jcr.Value
public class MockValue extends Object implements javax.jcr.Value
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.jcr.BinarygetBinary()booleangetBoolean()CalendargetDate()BigDecimalgetDecimal()doublegetDouble()longgetLong()InputStreamgetStream()StringgetString()intgetType()voidsetDecimal(BigDecimal value)voidsetValue(boolean booleanValue)voidsetValue(double doubleValue)voidsetValue(long longValue)voidsetValue(InputStream stream)voidsetValue(String stringValue)voidsetValue(Calendar calendarValue)
-
-
-
Constructor Detail
-
MockValue
public MockValue()
-
MockValue
public MockValue(String str)
-
-
Method Detail
-
getBoolean
public boolean getBoolean() throws javax.jcr.ValueFormatException, IllegalStateException, javax.jcr.RepositoryException- Specified by:
getBooleanin interfacejavax.jcr.Value- Throws:
javax.jcr.ValueFormatExceptionIllegalStateExceptionjavax.jcr.RepositoryException
-
getDate
public Calendar getDate() throws javax.jcr.ValueFormatException, IllegalStateException, javax.jcr.RepositoryException
- Specified by:
getDatein interfacejavax.jcr.Value- Throws:
javax.jcr.ValueFormatExceptionIllegalStateExceptionjavax.jcr.RepositoryException
-
getDouble
public double getDouble() throws javax.jcr.ValueFormatException, IllegalStateException, javax.jcr.RepositoryException- Specified by:
getDoublein interfacejavax.jcr.Value- Throws:
javax.jcr.ValueFormatExceptionIllegalStateExceptionjavax.jcr.RepositoryException
-
getLong
public long getLong() throws javax.jcr.ValueFormatException, IllegalStateException, javax.jcr.RepositoryException- Specified by:
getLongin interfacejavax.jcr.Value- Throws:
javax.jcr.ValueFormatExceptionIllegalStateExceptionjavax.jcr.RepositoryException
-
getStream
public InputStream getStream() throws IllegalStateException, javax.jcr.RepositoryException
- Specified by:
getStreamin interfacejavax.jcr.Value- Throws:
IllegalStateExceptionjavax.jcr.RepositoryException
-
getString
public String getString() throws javax.jcr.ValueFormatException, IllegalStateException, javax.jcr.RepositoryException
- Specified by:
getStringin interfacejavax.jcr.Value- Throws:
javax.jcr.ValueFormatExceptionIllegalStateExceptionjavax.jcr.RepositoryException
-
getType
public int getType()
- Specified by:
getTypein interfacejavax.jcr.Value
-
setValue
public void setValue(String stringValue)
-
setValue
public void setValue(boolean booleanValue)
-
setValue
public void setValue(Calendar calendarValue)
-
setValue
public void setValue(double doubleValue)
-
setValue
public void setValue(long longValue)
-
setValue
public void setValue(InputStream stream)
-
setDecimal
public void setDecimal(BigDecimal value)
-
getBinary
public javax.jcr.Binary getBinary() throws javax.jcr.RepositoryException- Specified by:
getBinaryin interfacejavax.jcr.Value- Throws:
javax.jcr.RepositoryException
-
getDecimal
public BigDecimal getDecimal() throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
- Specified by:
getDecimalin interfacejavax.jcr.Value- Throws:
javax.jcr.ValueFormatExceptionjavax.jcr.RepositoryException
-
-