public class JCRTypeConverter
extends java.lang.Object
| Constructor and Description |
|---|
JCRTypeConverter(SessionImpl session)
Construct
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
booleanValue(java.lang.Object value)
Convert to JCR Boolean Value
|
java.lang.Object |
convert(java.lang.Class c,
java.lang.Object value)
General conversion method using JCR converters
|
java.lang.Object |
convert(org.alfresco.service.cmr.dictionary.DataTypeDefinition propertyType,
java.lang.Object value)
General conversion method using JCR converters
|
java.util.Calendar |
dateValue(java.lang.Object value)
Convert to JCR Date Value
|
double |
doubleValue(java.lang.Object value)
Convert to JCR Double Value
|
org.alfresco.service.cmr.repository.datatype.TypeConverter |
getConverter()
Get the underlying Converter
|
long |
longValue(java.lang.Object value)
Convert to JCR Long Value
|
org.alfresco.service.namespace.QName |
nameValue(java.lang.Object value)
Convert to JCR Name Value
|
org.alfresco.service.cmr.repository.Path |
pathValue(java.lang.Object value)
Convert to JCR Path Value
|
NodeImpl |
referenceValue(java.lang.Object value)
Convert to JCR Reference Value
|
java.io.InputStream |
streamValue(java.lang.Object value)
Convert to JCR Stream Value
|
java.lang.String |
stringValue(java.lang.Object value)
Convert to JCR String Value
|
public JCRTypeConverter(SessionImpl session)
session - public org.alfresco.service.cmr.repository.datatype.TypeConverter getConverter()
public NodeImpl referenceValue(java.lang.Object value) throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
session - value - javax.jcr.ValueFormatExceptionjavax.jcr.RepositoryExceptionpublic java.lang.String stringValue(java.lang.Object value)
throws javax.jcr.ValueFormatException,
javax.jcr.RepositoryException
value - javax.jcr.ValueFormatExceptionjavax.jcr.RepositoryExceptionpublic java.io.InputStream streamValue(java.lang.Object value)
throws java.lang.IllegalStateException,
javax.jcr.RepositoryException
value - java.lang.IllegalStateExceptionjavax.jcr.RepositoryExceptionpublic long longValue(java.lang.Object value)
throws javax.jcr.ValueFormatException,
java.lang.IllegalStateException,
javax.jcr.RepositoryException
value - javax.jcr.ValueFormatExceptionjava.lang.IllegalStateExceptionjavax.jcr.RepositoryExceptionpublic double doubleValue(java.lang.Object value)
throws javax.jcr.ValueFormatException,
java.lang.IllegalStateException,
javax.jcr.RepositoryException
value - javax.jcr.ValueFormatExceptionjava.lang.IllegalStateExceptionjavax.jcr.RepositoryExceptionpublic java.util.Calendar dateValue(java.lang.Object value)
throws javax.jcr.ValueFormatException,
java.lang.IllegalStateException,
javax.jcr.RepositoryException
value - javax.jcr.ValueFormatExceptionjava.lang.IllegalStateExceptionjavax.jcr.RepositoryExceptionpublic boolean booleanValue(java.lang.Object value)
throws javax.jcr.ValueFormatException,
java.lang.IllegalStateException,
javax.jcr.RepositoryException
value - javax.jcr.ValueFormatExceptionjava.lang.IllegalStateExceptionjavax.jcr.RepositoryExceptionpublic org.alfresco.service.namespace.QName nameValue(java.lang.Object value)
throws javax.jcr.ValueFormatException,
java.lang.IllegalStateException,
javax.jcr.RepositoryException
value - javax.jcr.ValueFormatExceptionjava.lang.IllegalStateExceptionjavax.jcr.RepositoryExceptionpublic org.alfresco.service.cmr.repository.Path pathValue(java.lang.Object value)
throws javax.jcr.ValueFormatException,
java.lang.IllegalStateException,
javax.jcr.RepositoryException
value - javax.jcr.ValueFormatExceptionjava.lang.IllegalStateExceptionjavax.jcr.RepositoryExceptionpublic final java.lang.Object convert(org.alfresco.service.cmr.dictionary.DataTypeDefinition propertyType,
java.lang.Object value)
throws javax.jcr.RepositoryException
propertyType - datatype to convert tovalue - the value to convertjavax.jcr.RepositoryExceptionpublic final java.lang.Object convert(java.lang.Class c,
java.lang.Object value)
throws javax.jcr.RepositoryException
c - classvalue - value to convertjavax.jcr.RepositoryExceptionCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.