Class QValueFactoryLogger
- java.lang.Object
 - 
- org.apache.jackrabbit.spi.commons.logging.AbstractLogger
 - 
- org.apache.jackrabbit.spi.commons.logging.QValueFactoryLogger
 
 
 
- 
- All Implemented Interfaces:
 QValueFactory
public class QValueFactoryLogger extends AbstractLogger implements QValueFactory
Log wrapper for aQValueFactory. 
- 
- 
Constructor Summary
Constructors Constructor Description QValueFactoryLogger(QValueFactory qValueFactory, LogWriter writer)Create a new instance for the givenqValueFactorywhich useswriterfor persisting log messages. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QValue[]computeAutoValues(QPropertyDefinition propertyDefinition)Given theQPropertyDefinitionof an autocreated property, compute suitable values to be used in transient space until the newly created node gets saved.QValuecreate(boolean value)Create a newQValuewith typePropertyType.BOOLEAN.QValuecreate(byte[] value)Create a newQValuewith typePropertyType.BINARY.QValuecreate(double value)Create a newQValuewith typePropertyType.DOUBLE.QValuecreate(long value)Create a newQValuewith typePropertyType.LONG.QValuecreate(java.io.File value)Create a newQValuewith typePropertyType.BINARY.QValuecreate(java.io.InputStream value)Creates a QValue that contains the given binary stream.QValuecreate(java.lang.String value, int type)Create a newQValueusing the given String representation of the value and itstype.QValuecreate(java.math.BigDecimal value)Create a newQValuewith typePropertyType.DECIMAL.QValuecreate(java.net.URI value)Create a newQValuewith typePropertyType.URI.QValuecreate(java.util.Calendar value)Create a newQValuewith typePropertyType.DATE.QValuecreate(Name value)Create a newQValuewith typePropertyType.NAME.QValuecreate(Path value)Create a newQValuewith typePropertyType.PATH.QValueFactorygetQValueFactory() 
 - 
 
- 
- 
Constructor Detail
- 
QValueFactoryLogger
public QValueFactoryLogger(QValueFactory qValueFactory, LogWriter writer)
Create a new instance for the givenqValueFactorywhich useswriterfor persisting log messages.- Parameters:
 qValueFactory-writer-
 
 - 
 
- 
Method Detail
- 
getQValueFactory
public QValueFactory getQValueFactory()
- Returns:
 - the wrapped QValueFactory
 
 
- 
create
public QValue create(java.lang.String value, int type) throws RepositoryException
Description copied from interface:QValueFactoryCreate a newQValueusing the given String representation of the value and itstype.- Specified by:
 createin interfaceQValueFactory- Parameters:
 value- String representation of the newQValue. Note, that the given String must never benull.type- A validtype.- Returns:
 - a new 
QValue. - Throws:
 ValueFormatException- If the givenvaluecannot be converted to the specifiedtype.RepositoryException- If another error occurs.- See Also:
 QValue.getType()
 
- 
create
public QValue create(java.util.Calendar value) throws RepositoryException
Description copied from interface:QValueFactoryCreate a newQValuewith typePropertyType.DATE.- Specified by:
 createin interfaceQValueFactory- Parameters:
 value- A non-nullCalendarobject acting as value of the newQValue.- Returns:
 - a new 
QValue. - Throws:
 RepositoryException
 
- 
create
public QValue create(double value) throws RepositoryException
Description copied from interface:QValueFactoryCreate a newQValuewith typePropertyType.DOUBLE.- Specified by:
 createin interfaceQValueFactory- Parameters:
 value- Adoublecontaining the value of the newQValue.- Returns:
 - a new 
QValue. - Throws:
 RepositoryException
 
- 
create
public QValue create(long value) throws RepositoryException
Description copied from interface:QValueFactoryCreate a newQValuewith typePropertyType.LONG.- Specified by:
 createin interfaceQValueFactory- Parameters:
 value- Alongcontaining the value of the newQValue.- Returns:
 - a new 
QValue. - Throws:
 RepositoryException
 
- 
create
public QValue create(boolean value) throws RepositoryException
Description copied from interface:QValueFactoryCreate a newQValuewith typePropertyType.BOOLEAN.- Specified by:
 createin interfaceQValueFactory- Parameters:
 value- Abooleancontaining the value of the newQValue.- Returns:
 - a new 
QValue. - Throws:
 RepositoryException
 
- 
create
public QValue create(Name value) throws RepositoryException
Description copied from interface:QValueFactoryCreate a newQValuewith typePropertyType.NAME.- Specified by:
 createin interfaceQValueFactory- Parameters:
 value- A non-nullName.- Returns:
 - a new 
QValue. - Throws:
 RepositoryException
 
- 
create
public QValue create(Path value) throws RepositoryException
Description copied from interface:QValueFactoryCreate a newQValuewith typePropertyType.PATH.- Specified by:
 createin interfaceQValueFactory- Parameters:
 value- A non-nullPath.- Returns:
 - a new 
QValue. - Throws:
 RepositoryException
 
- 
create
public QValue create(java.net.URI value) throws RepositoryException
Description copied from interface:QValueFactoryCreate a newQValuewith typePropertyType.URI.- Specified by:
 createin interfaceQValueFactory- Parameters:
 value- A non-nullURI.- Returns:
 - a new 
QValue. - Throws:
 RepositoryException
 
- 
create
public QValue create(java.math.BigDecimal value) throws RepositoryException
Description copied from interface:QValueFactoryCreate a newQValuewith typePropertyType.DECIMAL.- Specified by:
 createin interfaceQValueFactory- Parameters:
 value- A non-nullBigDecimal.- Returns:
 - a new 
QValue. - Throws:
 RepositoryException
 
- 
create
public QValue create(byte[] value) throws RepositoryException
Description copied from interface:QValueFactoryCreate a newQValuewith typePropertyType.BINARY.- Specified by:
 createin interfaceQValueFactory- Returns:
 - a new 
QValue. - Throws:
 RepositoryException
 
- 
create
public QValue create(java.io.InputStream value) throws RepositoryException, java.io.IOException
Description copied from interface:QValueFactoryCreates a QValue that contains the given binary stream. The given stream is consumed and closed by this method. The type of the resulting QValue will bePropertyType.BINARY.- Specified by:
 createin interfaceQValueFactory- Parameters:
 value- binary stream- Returns:
 - a new binary 
QValue. - Throws:
 RepositoryException- if the value could not be createdjava.io.IOException- if the stream can not be consumed
 
- 
create
public QValue create(java.io.File value) throws RepositoryException, java.io.IOException
Description copied from interface:QValueFactoryCreate a newQValuewith typePropertyType.BINARY.- Specified by:
 createin interfaceQValueFactory- Returns:
 - a new binary 
QValue. - Throws:
 java.io.IOExceptionRepositoryException
 
- 
computeAutoValues
public QValue[] computeAutoValues(QPropertyDefinition propertyDefinition) throws RepositoryException
Description copied from interface:QValueFactoryGiven theQPropertyDefinitionof an autocreated property, compute suitable values to be used in transient space until the newly created node gets saved.- Specified by:
 computeAutoValuesin interfaceQValueFactory- Parameters:
 propertyDefinition- definition of property for which values should be created- Returns:
 - computed value
 - Throws:
 RepositoryException
 
 - 
 
 -