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 classDocumentMessage.Builder
-
Field Summary
Fields Modifier and Type Field Description protected Blobblobprotected BlobInfoblobInfoprotected Stringnameprotected StringparentPathprotected Map<String,Serializable>propertiesprotected Stringtype
-
Constructor Summary
Constructors Modifier Constructor Description DocumentMessage()protectedDocumentMessage(DocumentMessage.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DocumentMessage.Builderbuilder(String type, String parentPath, String name)Helper to build a document message.static DocumentMessagecopy(DocumentMessage node, String newName)BlobgetBlob()BlobInfogetBlobInfo()StringgetId()A message identifier.StringgetName()StringgetParentPath()Map<String,Serializable>getProperties()StringgetType()Type of the documentvoidreadExternal(ObjectInput in)StringtoString()voidwriteExternal(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:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-