001: /*
002: * ContentPart.java
003: *
004: * Created on 26. Februar 2004, 20:09
005: */
006:
007: package org.contineo.core.communication;
008:
009: /**
010: *
011: * @author Michael Scholz
012: */
013: public class ContentPart {
014: /**
015: * @uml.property name="messageId"
016: */
017: private int messageId;
018:
019: /**
020: * @uml.property name="fileName"
021: */
022: private String fileName;
023:
024: /**
025: * @uml.property name="mimeType"
026: */
027: private String mimeType;
028:
029: /**
030: * @uml.property name="content"
031: */
032: private byte[] content;
033:
034: /** Creates a new instance of ContentPart */
035: public ContentPart() {
036: messageId = 0;
037: mimeType = "";
038: content = null;
039: } // end ctor ContentPart
040:
041: /**
042: *
043: * @uml.property name="messageId"
044: */
045: public int getMessageId() {
046: return messageId;
047: } // end method getMessageId
048:
049: /**
050: *
051: * @uml.property name="fileName"
052: */
053: public String getFileName() {
054: return fileName;
055: } // end method getFileName
056:
057: /**
058: *
059: * @uml.property name="mimeType"
060: */
061: public String getMimeType() {
062: return mimeType;
063: } // end method getMimeType
064:
065: /**
066: *
067: * @uml.property name="content"
068: */
069: public byte[] getContent() {
070: return content;
071: } // end method getContent
072:
073: /**
074: *
075: * @uml.property name="messageId"
076: */
077: public void setMessageId(int id) {
078: messageId = id;
079: } // end method setMessageId
080:
081: /**
082: *
083: * @uml.property name="fileName"
084: */
085: public void setFileName(String fname) {
086: fileName = fname;
087: } // end method setFileName
088:
089: /**
090: *
091: * @uml.property name="mimeType"
092: */
093: public void setMimeType(String type) {
094: mimeType = type;
095: } // end method setMimeType
096:
097: /**
098: *
099: * @uml.property name="content"
100: */
101: public void setContent(byte[] cntnt) {
102: content = cntnt;
103: } // end method setContent
104:
105: public long getContentSize() {
106: return content.length;
107: } // end method getContentSize
108: } // end class ContentPart
|