org.apache.sling.commons.testing.jcr
Class MockProperty
java.lang.Object
   org.apache.sling.commons.testing.jcr.MockProperty
org.apache.sling.commons.testing.jcr.MockProperty
- All Implemented Interfaces: 
- javax.jcr.Item, javax.jcr.Property
- public class MockProperty 
- extends java.lang.Object- implements javax.jcr.Property
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
MockProperty
public MockProperty(java.lang.String name)
getBoolean
public boolean getBoolean()
                   throws javax.jcr.ValueFormatException,
                          javax.jcr.RepositoryException
- 
- Specified by:
- getBooleanin interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.RepositoryException
 
getDate
public java.util.Calendar getDate()
                           throws javax.jcr.ValueFormatException,
                                  javax.jcr.RepositoryException
- 
- Specified by:
- getDatein interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.RepositoryException
 
getDefinition
public javax.jcr.nodetype.PropertyDefinition getDefinition()
                                                    throws javax.jcr.RepositoryException
- 
- Specified by:
- getDefinitionin interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.RepositoryException
 
getDouble
public double getDouble()
                 throws javax.jcr.ValueFormatException,
                        javax.jcr.RepositoryException
- 
- Specified by:
- getDoublein interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.RepositoryException
 
getLength
public long getLength()
               throws javax.jcr.ValueFormatException,
                      javax.jcr.RepositoryException
- 
- Specified by:
- getLengthin interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.RepositoryException
 
getLengths
public long[] getLengths()
                  throws javax.jcr.ValueFormatException,
                         javax.jcr.RepositoryException
- 
- Specified by:
- getLengthsin interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.RepositoryException
 
getLong
public long getLong()
             throws javax.jcr.ValueFormatException,
                    javax.jcr.RepositoryException
- 
- Specified by:
- getLongin interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.RepositoryException
 
getNode
public javax.jcr.Node getNode()
                       throws javax.jcr.ValueFormatException,
                              javax.jcr.RepositoryException
- 
- Specified by:
- getNodein interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.RepositoryException
 
getStream
public java.io.InputStream getStream()
                              throws javax.jcr.ValueFormatException,
                                     javax.jcr.RepositoryException
- 
- Specified by:
- getStreamin interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.RepositoryException
 
getString
public java.lang.String getString()
                           throws javax.jcr.ValueFormatException,
                                  javax.jcr.RepositoryException
- 
- Specified by:
- getStringin interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.RepositoryException
 
getType
public int getType()
            throws javax.jcr.RepositoryException
- 
- Specified by:
- getTypein interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.RepositoryException
 
getValue
public javax.jcr.Value getValue()
                         throws javax.jcr.ValueFormatException,
                                javax.jcr.RepositoryException
- 
- Specified by:
- getValuein interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.RepositoryException
 
getValues
public javax.jcr.Value[] getValues()
                            throws javax.jcr.ValueFormatException,
                                   javax.jcr.RepositoryException
- 
- Specified by:
- getValuesin interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.RepositoryException
 
setValue
public void setValue(boolean value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
- 
- Specified by:
- setValuein interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.version.VersionException
- javax.jcr.lock.LockException
- javax.jcr.nodetype.ConstraintViolationException
- javax.jcr.RepositoryException
 
setValue
public void setValue(java.util.Calendar value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
- 
- Specified by:
- setValuein interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.version.VersionException
- javax.jcr.lock.LockException
- javax.jcr.nodetype.ConstraintViolationException
- javax.jcr.RepositoryException
 
setValue
public void setValue(double value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
- 
- Specified by:
- setValuein interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.version.VersionException
- javax.jcr.lock.LockException
- javax.jcr.nodetype.ConstraintViolationException
- javax.jcr.RepositoryException
 
setValue
public void setValue(java.io.InputStream value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
- 
- Specified by:
- setValuein interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.version.VersionException
- javax.jcr.lock.LockException
- javax.jcr.nodetype.ConstraintViolationException
- javax.jcr.RepositoryException
 
setValue
public void setValue(long value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
- 
- Specified by:
- setValuein interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.version.VersionException
- javax.jcr.lock.LockException
- javax.jcr.nodetype.ConstraintViolationException
- javax.jcr.RepositoryException
 
setValue
public void setValue(javax.jcr.Node value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
- 
- Specified by:
- setValuein interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.version.VersionException
- javax.jcr.lock.LockException
- javax.jcr.nodetype.ConstraintViolationException
- javax.jcr.RepositoryException
 
setValue
public void setValue(java.lang.String value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
- 
- Specified by:
- setValuein interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.version.VersionException
- javax.jcr.lock.LockException
- javax.jcr.nodetype.ConstraintViolationException
- javax.jcr.RepositoryException
 
setValue
public void setValue(java.lang.String[] inputValues)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
- 
- Specified by:
- setValuein interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.version.VersionException
- javax.jcr.lock.LockException
- javax.jcr.nodetype.ConstraintViolationException
- javax.jcr.RepositoryException
 
setValue
public void setValue(javax.jcr.Value value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
- 
- Specified by:
- setValuein interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.version.VersionException
- javax.jcr.lock.LockException
- javax.jcr.nodetype.ConstraintViolationException
- javax.jcr.RepositoryException
 
setValue
public void setValue(javax.jcr.Value[] values)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
- 
- Specified by:
- setValuein interface- javax.jcr.Property
 
- 
- Throws:
- javax.jcr.ValueFormatException
- javax.jcr.version.VersionException
- javax.jcr.lock.LockException
- javax.jcr.nodetype.ConstraintViolationException
- javax.jcr.RepositoryException
 
accept
public void accept(javax.jcr.ItemVisitor visitor)
            throws javax.jcr.RepositoryException
- 
- Specified by:
- acceptin interface- javax.jcr.Item
 
- 
- Throws:
- javax.jcr.RepositoryException
 
getAncestor
public javax.jcr.Item getAncestor(int depth)
                           throws javax.jcr.ItemNotFoundException,
                                  javax.jcr.AccessDeniedException,
                                  javax.jcr.RepositoryException
- 
- Specified by:
- getAncestorin interface- javax.jcr.Item
 
- 
- Throws:
- javax.jcr.ItemNotFoundException
- javax.jcr.AccessDeniedException
- javax.jcr.RepositoryException
 
getDepth
public int getDepth()
             throws javax.jcr.RepositoryException
- 
- Specified by:
- getDepthin interface- javax.jcr.Item
 
- 
- Throws:
- javax.jcr.RepositoryException
 
getName
public java.lang.String getName()
                         throws javax.jcr.RepositoryException
- 
- Specified by:
- getNamein interface- javax.jcr.Item
 
- 
- Throws:
- javax.jcr.RepositoryException
 
getParent
public javax.jcr.Node getParent()
                         throws javax.jcr.ItemNotFoundException,
                                javax.jcr.AccessDeniedException,
                                javax.jcr.RepositoryException
- 
- Specified by:
- getParentin interface- javax.jcr.Item
 
- 
- Throws:
- javax.jcr.ItemNotFoundException
- javax.jcr.AccessDeniedException
- javax.jcr.RepositoryException
 
getPath
public java.lang.String getPath()
                         throws javax.jcr.RepositoryException
- 
- Specified by:
- getPathin interface- javax.jcr.Item
 
- 
- Throws:
- javax.jcr.RepositoryException
 
getSession
public javax.jcr.Session getSession()
                             throws javax.jcr.RepositoryException
- 
- Specified by:
- getSessionin interface- javax.jcr.Item
 
- 
- Throws:
- javax.jcr.RepositoryException
 
isModified
public boolean isModified()
- 
- Specified by:
- isModifiedin interface- javax.jcr.Item
 
- 
 
isNew
public boolean isNew()
- 
- Specified by:
- isNewin interface- javax.jcr.Item
 
- 
 
isNode
public boolean isNode()
- 
- Specified by:
- isNodein interface- javax.jcr.Item
 
- 
 
isSame
public boolean isSame(javax.jcr.Item otherItem)
               throws javax.jcr.RepositoryException
- 
- Specified by:
- isSamein interface- javax.jcr.Item
 
- 
- Throws:
- javax.jcr.RepositoryException
 
refresh
public void refresh(boolean keepChanges)
             throws javax.jcr.InvalidItemStateException,
                    javax.jcr.RepositoryException
- 
- Specified by:
- refreshin interface- javax.jcr.Item
 
- 
- Throws:
- javax.jcr.InvalidItemStateException
- javax.jcr.RepositoryException
 
remove
public void remove()
            throws javax.jcr.version.VersionException,
                   javax.jcr.lock.LockException,
                   javax.jcr.nodetype.ConstraintViolationException,
                   javax.jcr.RepositoryException
- 
- Specified by:
- removein interface- javax.jcr.Item
 
- 
- Throws:
- javax.jcr.version.VersionException
- javax.jcr.lock.LockException
- javax.jcr.nodetype.ConstraintViolationException
- javax.jcr.RepositoryException
 
save
public void save()
          throws javax.jcr.AccessDeniedException,
                 javax.jcr.ItemExistsException,
                 javax.jcr.nodetype.ConstraintViolationException,
                 javax.jcr.InvalidItemStateException,
                 javax.jcr.ReferentialIntegrityException,
                 javax.jcr.version.VersionException,
                 javax.jcr.lock.LockException,
                 javax.jcr.nodetype.NoSuchNodeTypeException,
                 javax.jcr.RepositoryException
- 
- Specified by:
- savein interface- javax.jcr.Item
 
- 
- Throws:
- javax.jcr.AccessDeniedException
- javax.jcr.ItemExistsException
- javax.jcr.nodetype.ConstraintViolationException
- javax.jcr.InvalidItemStateException
- javax.jcr.ReferentialIntegrityException
- javax.jcr.version.VersionException
- javax.jcr.lock.LockException
- javax.jcr.nodetype.NoSuchNodeTypeException
- javax.jcr.RepositoryException
 
Copyright © 2007-2009. All Rights Reserved.