Class NuxeoPropertyData<T>
- java.lang.Object
-
- org.nuxeo.ecm.core.opencmis.impl.server.NuxeoPropertyDataBase<T>
-
- org.nuxeo.ecm.core.opencmis.impl.server.NuxeoPropertyData<T>
-
- All Implemented Interfaces:
org.apache.chemistry.opencmis.commons.data.ExtensionsData
,org.apache.chemistry.opencmis.commons.data.PropertyData<T>
- Direct Known Subclasses:
NuxeoPropertyData.NuxeoPropertyBooleanData
,NuxeoPropertyData.NuxeoPropertyDateTimeData
,NuxeoPropertyData.NuxeoPropertyDecimalData
,NuxeoPropertyData.NuxeoPropertyHtmlData
,NuxeoPropertyData.NuxeoPropertyIdData
,NuxeoPropertyData.NuxeoPropertyIntegerData
,NuxeoPropertyData.NuxeoPropertyStringData
,NuxeoPropertyData.NuxeoPropertyUriData
public abstract class NuxeoPropertyData<T> extends NuxeoPropertyDataBase<T>
Nuxeo implementation of an object's property, backed by a property of aDocumentModel
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.nuxeo.ecm.core.opencmis.impl.server.NuxeoPropertyDataBase
NuxeoPropertyDataBase.NuxeoPropertyBooleanDataFixed, NuxeoPropertyDataBase.NuxeoPropertyDataFixed<T>, NuxeoPropertyDataBase.NuxeoPropertyIdDataFixed, NuxeoPropertyDataBase.NuxeoPropertyIdMultiDataFixed, NuxeoPropertyDataBase.NuxeoPropertyIntegerDataFixed, NuxeoPropertyDataBase.NuxeoPropertyMultiDataFixed<T>, NuxeoPropertyDataBase.NuxeoPropertyStringDataFixed
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.chemistry.opencmis.commons.server.CallContext
callContext
protected String
name
protected boolean
readOnly
-
Fields inherited from class org.nuxeo.ecm.core.opencmis.impl.server.NuxeoPropertyDataBase
doc, propertyDefinition
-
-
Constructor Summary
Constructors Constructor Description NuxeoPropertyData(org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<T> propertyDefinition, DocumentModel doc, String name, boolean readOnly, org.apache.chemistry.opencmis.commons.server.CallContext callContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <U> org.apache.chemistry.opencmis.commons.data.PropertyData<U>
construct(NuxeoObjectData data, org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<U> pd, org.apache.chemistry.opencmis.commons.server.CallContext callContext)
Factory for a new Property.protected static Object
convertComplexPropertyToCMIS(ComplexProperty prop, org.apache.chemistry.opencmis.commons.server.CallContext callContext)
protected static Object
convertToCMIS(Object value)
protected static Object
convertToNuxeo(Object value, Type type)
protected static String
extractDigestFromRequestHeaders(javax.servlet.http.HttpServletRequest request, String digestAlgorithm)
protected static Blob
getBlob(DocumentModel doc)
protected static org.apache.chemistry.opencmis.commons.enums.DateTimeFormat
getCMISDateTimeFormat(org.apache.chemistry.opencmis.commons.server.CallContext callContext)
static org.apache.chemistry.opencmis.commons.data.ContentStream
getContentStream(DocumentModel doc, javax.servlet.http.HttpServletRequest request)
Deprecated.since 11.1, now unusedstatic List<String>
getFacets(DocumentModel doc)
Gets the doc's relevant facets.T
getFirstValue()
static Blob
getPersistentBlob(org.apache.chemistry.opencmis.commons.data.ContentStream contentStream, String filename)
Returns a Blob whose stream can be used several times.static List<String>
getSecondaryTypeIds(DocumentModel doc)
Gets the doc's secondary type ids.<U> U
getValue()
Conversion from Nuxeo values to CMIS ones.List<T>
getValues()
protected static boolean
isVersionOrProxyToVersion(DocumentModel doc)
static void
setContentStream(DocumentModel doc, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream, boolean overwrite)
void
setValue(Object value)
static String
transcodeBase64ToHex(String base64String)
static String
transcodeHexToBase64(String hexString)
static void
validateBlobDigest(DocumentModel doc, org.apache.chemistry.opencmis.commons.server.CallContext callContext)
static <T> void
validateCMISValue(Object value, org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<T> pd)
Validates a CMIS value according to a property definition.-
Methods inherited from class org.nuxeo.ecm.core.opencmis.impl.server.NuxeoPropertyDataBase
getDisplayName, getExtensions, getId, getLocalName, getPropertyDefinition, getQueryName, setExtensions
-
-
-
-
Field Detail
-
name
protected final String name
-
readOnly
protected final boolean readOnly
-
callContext
protected final org.apache.chemistry.opencmis.commons.server.CallContext callContext
-
-
Constructor Detail
-
NuxeoPropertyData
public NuxeoPropertyData(org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<T> propertyDefinition, DocumentModel doc, String name, boolean readOnly, org.apache.chemistry.opencmis.commons.server.CallContext callContext)
-
-
Method Detail
-
construct
public static <U> org.apache.chemistry.opencmis.commons.data.PropertyData<U> construct(NuxeoObjectData data, org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<U> pd, org.apache.chemistry.opencmis.commons.server.CallContext callContext)
Factory for a new Property.
-
getFacets
public static List<String> getFacets(DocumentModel doc)
Gets the doc's relevant facets.
-
getSecondaryTypeIds
public static List<String> getSecondaryTypeIds(DocumentModel doc)
Gets the doc's secondary type ids.
-
getContentStream
@Deprecated public static org.apache.chemistry.opencmis.commons.data.ContentStream getContentStream(DocumentModel doc, javax.servlet.http.HttpServletRequest request) throws org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException
Deprecated.since 11.1, now unused- Throws:
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException
-
setContentStream
public static void setContentStream(DocumentModel doc, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream, boolean overwrite) throws IOException, org.apache.chemistry.opencmis.commons.exceptions.CmisContentAlreadyExistsException, org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException
- Throws:
IOException
org.apache.chemistry.opencmis.commons.exceptions.CmisContentAlreadyExistsException
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException
-
getPersistentBlob
public static Blob getPersistentBlob(org.apache.chemistry.opencmis.commons.data.ContentStream contentStream, String filename) throws IOException
Returns a Blob whose stream can be used several times.- Throws:
IOException
-
validateBlobDigest
public static void validateBlobDigest(DocumentModel doc, org.apache.chemistry.opencmis.commons.server.CallContext callContext)
-
extractDigestFromRequestHeaders
protected static String extractDigestFromRequestHeaders(javax.servlet.http.HttpServletRequest request, String digestAlgorithm)
-
transcodeBase64ToHex
public static String transcodeBase64ToHex(String base64String) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getValue
public <U> U getValue()
Conversion from Nuxeo values to CMIS ones.- Overrides:
getValue
in classNuxeoPropertyDataBase<T>
- Returns:
- either a primitive type or a List of them, or
null
-
convertComplexPropertyToCMIS
protected static Object convertComplexPropertyToCMIS(ComplexProperty prop, org.apache.chemistry.opencmis.commons.server.CallContext callContext)
-
getCMISDateTimeFormat
protected static org.apache.chemistry.opencmis.commons.enums.DateTimeFormat getCMISDateTimeFormat(org.apache.chemistry.opencmis.commons.server.CallContext callContext)
-
validateCMISValue
public static <T> void validateCMISValue(Object value, org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<T> pd)
Validates a CMIS value according to a property definition.
-
getFirstValue
public T getFirstValue()
- Specified by:
getFirstValue
in interfaceorg.apache.chemistry.opencmis.commons.data.PropertyData<T>
- Specified by:
getFirstValue
in classNuxeoPropertyDataBase<T>
-
getValues
public List<T> getValues()
- Specified by:
getValues
in interfaceorg.apache.chemistry.opencmis.commons.data.PropertyData<T>
- Overrides:
getValues
in classNuxeoPropertyDataBase<T>
-
setValue
public void setValue(Object value)
- Overrides:
setValue
in classNuxeoPropertyDataBase<T>
-
getBlob
protected static Blob getBlob(DocumentModel doc) throws org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException
- Throws:
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException
-
isVersionOrProxyToVersion
protected static boolean isVersionOrProxyToVersion(DocumentModel doc)
-
-