org.apache.sling.commons.testing.jcr
Class MockValue

java.lang.Object
  extended by org.apache.sling.commons.testing.jcr.MockValue
All Implemented Interfaces:
javax.jcr.Value

public class MockValue
extends Object
implements javax.jcr.Value


Constructor Summary
MockValue()
           
MockValue(String str)
           
 
Method Summary
 javax.jcr.Binary getBinary()
           
 boolean getBoolean()
           
 Calendar getDate()
           
 BigDecimal getDecimal()
           
 double getDouble()
           
 long getLong()
           
 InputStream getStream()
           
 String getString()
           
 int getType()
           
 void setDecimal(BigDecimal value)
           
 void setValue(boolean booleanValue)
           
 void setValue(Calendar calendarValue)
           
 void setValue(double doubleValue)
           
 void setValue(InputStream stream)
           
 void setValue(long longValue)
           
 void setValue(String stringValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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:
getBoolean in interface javax.jcr.Value
Throws:
javax.jcr.ValueFormatException
IllegalStateException
javax.jcr.RepositoryException

getDate

public Calendar getDate()
                 throws javax.jcr.ValueFormatException,
                        IllegalStateException,
                        javax.jcr.RepositoryException
Specified by:
getDate in interface javax.jcr.Value
Throws:
javax.jcr.ValueFormatException
IllegalStateException
javax.jcr.RepositoryException

getDouble

public double getDouble()
                 throws javax.jcr.ValueFormatException,
                        IllegalStateException,
                        javax.jcr.RepositoryException
Specified by:
getDouble in interface javax.jcr.Value
Throws:
javax.jcr.ValueFormatException
IllegalStateException
javax.jcr.RepositoryException

getLong

public long getLong()
             throws javax.jcr.ValueFormatException,
                    IllegalStateException,
                    javax.jcr.RepositoryException
Specified by:
getLong in interface javax.jcr.Value
Throws:
javax.jcr.ValueFormatException
IllegalStateException
javax.jcr.RepositoryException

getStream

public InputStream getStream()
                      throws IllegalStateException,
                             javax.jcr.RepositoryException
Specified by:
getStream in interface javax.jcr.Value
Throws:
IllegalStateException
javax.jcr.RepositoryException

getString

public String getString()
                 throws javax.jcr.ValueFormatException,
                        IllegalStateException,
                        javax.jcr.RepositoryException
Specified by:
getString in interface javax.jcr.Value
Throws:
javax.jcr.ValueFormatException
IllegalStateException
javax.jcr.RepositoryException

getType

public int getType()
Specified by:
getType in interface javax.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:
getBinary in interface javax.jcr.Value
Throws:
javax.jcr.RepositoryException

getDecimal

public BigDecimal getDecimal()
                      throws javax.jcr.ValueFormatException,
                             javax.jcr.RepositoryException
Specified by:
getDecimal in interface javax.jcr.Value
Throws:
javax.jcr.ValueFormatException
javax.jcr.RepositoryException


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.