Class DocumentMessage
- java.lang.Object
-
- org.nuxeo.importer.stream.message.DocumentMessage
-
- All Implemented Interfaces:
Externalizable
,Serializable
,Message
public class DocumentMessage extends Object implements Message
Message that represent an immutable Nuxeo document.- Since:
- 9.1
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DocumentMessage.Builder
-
Field Summary
Fields Modifier and Type Field Description protected Blob
blob
protected BlobInfo
blobInfo
protected String
name
protected String
parentPath
protected Map<String,Serializable>
properties
protected String
type
-
Constructor Summary
Constructors Modifier Constructor Description DocumentMessage()
protected
DocumentMessage(DocumentMessage.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DocumentMessage.Builder
builder(String type, String parentPath, String name)
Helper to build a document message.static DocumentMessage
copy(DocumentMessage node, String newName)
Blob
getBlob()
BlobInfo
getBlobInfo()
String
getId()
A message identifier.String
getName()
String
getParentPath()
Map<String,Serializable>
getProperties()
String
getType()
Type of the documentvoid
readExternal(ObjectInput in)
String
toString()
void
writeExternal(ObjectOutput out)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.nuxeo.lib.stream.pattern.Message
forceBatch, poisonPill
-
-
-
-
Constructor Detail
-
DocumentMessage
public DocumentMessage()
-
DocumentMessage
protected DocumentMessage(DocumentMessage.Builder builder)
-
-
Method Detail
-
getName
public String getName()
-
getType
public String getType()
Type of the document
-
getParentPath
public String getParentPath()
-
getProperties
public Map<String,Serializable> getProperties()
-
getBlob
public Blob getBlob()
-
getBlobInfo
public BlobInfo getBlobInfo()
-
builder
public static DocumentMessage.Builder builder(String type, String parentPath, String name)
Helper to build a document message.- Parameters:
type
- the type of documentparentPath
- the container path where the document should be createdname
- the name of the document
-
copy
public static DocumentMessage copy(DocumentMessage node, String newName)
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
-