|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wm.app.tn.util.TNFixedData
com.wm.app.tn.doc.BizDocContentPart
public class BizDocContentPart
Represents the content part that is associated with a BizDocEnvelope. Each BizDocEnvelope can have 0 or more content parts. BizDocContentPart can be used to represent small or large document parts. Some notes about small and large document parts:
BizDocEnvelope
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.wm.app.tn.util.TNFixedData |
---|
TNFixedData.TreeCursor |
Field Summary | |
---|---|
static java.lang.String |
STORAGE_TYPE_DB
constant to indicate storage type "database" |
static java.lang.String |
STORAGE_TYPE_SHARED_DISK
|
static java.lang.String |
STORAGE_TYPE_TSPACE
constant to indicate storage type "tspace" |
Constructor Summary | |
---|---|
BizDocContentPart(java.lang.String partName,
java.lang.String mimeType,
byte[] bytes,
int partIndex)
Costructor for BizDocContentPart (used for constructing small content parts) |
|
BizDocContentPart(java.lang.String partName,
java.lang.String mimeType,
byte[] bytes,
int partIndex,
int length,
java.lang.String storageType,
java.lang.Object storageRef)
Costructor for BizDocContentPart (can be used for constructing small or large content parts) |
|
BizDocContentPart(java.lang.String partName,
java.lang.String mimeType,
byte[] bytes,
int partIndex,
int length,
java.lang.String storageType,
java.lang.Object storageRef,
boolean largePart)
For internal use only (use either the 4-argument or 6-argument constructor) |
|
BizDocContentPart(java.lang.String partName,
java.lang.String mimeType,
int partIndex,
int length,
java.lang.String storageType,
java.lang.Object storageRef)
Costructor for BizDocContentPart (used for constructing large content parts) |
Method Summary | |
---|---|
static BizDocContentPart[] |
addContentPart(BizDocContentPart[] ary,
BizDocContentPart part)
Append to an array of BizDocContentParts |
static BizDocContentPart[] |
arrayCast(java.lang.Object[] ary)
For internal use only |
static com.wm.data.IData |
create()
|
static BizDocContentPart |
createLargeContentPart(java.lang.String partName,
java.lang.String mimeType,
int partIndex,
java.io.InputStream contentStream,
int contentLength)
|
byte[] |
getBytes()
|
java.lang.Object |
getContent()
For Internal use only |
java.lang.Object |
getContent(java.lang.String docId)
For Internal use only |
static java.lang.String |
getFromMimeType(java.lang.String mimeType,
java.lang.String key)
For internal use only |
int |
getLength()
|
java.lang.String |
getMimeType()
|
int |
getPartIndex()
|
java.lang.String |
getPartName()
|
java.lang.Object |
getStorageRef()
|
java.lang.String |
getStorageType()
|
boolean |
isLargePart()
|
void |
setBytes(byte[] bytes)
sets content of this part (applicable for small documents only) |
void |
setLargePart(boolean largePart)
|
void |
setLength(int length)
for internal use only |
void |
setMimeType(java.lang.String mimeType)
sets the mime type of this part (mime tyupe may contain information about the content-type and encodings of the part) |
void |
setPartIndex(int partIndex)
sets the index this part |
void |
setPartName(java.lang.String partName)
sets the part name of this content part |
void |
setStorageRef(java.lang.Object storageRef)
sets the storage reference object of this part (applicable only for large documents) |
void |
setStorageType(java.lang.String storageType)
Sets the storage type of this part (applicable only for large documents) |
Methods inherited from class com.wm.app.tn.util.TNFixedData |
---|
clone, dataSize, get, get, getCursor, getHashCursor, getIndexCursor, getKey, getSharedCursor, getTreeCursor, indexOf, merge, set, set, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STORAGE_TYPE_TSPACE
public static final java.lang.String STORAGE_TYPE_SHARED_DISK
public static final java.lang.String STORAGE_TYPE_DB
Constructor Detail |
---|
public BizDocContentPart(java.lang.String partName, java.lang.String mimeType, byte[] bytes, int partIndex)
partName
- the part name of the content partmimeType
- contains information about the content part such as
content-type, encoding and etc.bytes
- the actual content of the content part in the form of byte[]partIndex
- indicates the index of this part in the content part array
that is added to the BizDocEnvelopepublic BizDocContentPart(java.lang.String partName, java.lang.String mimeType, int partIndex, int length, java.lang.String storageType, java.lang.Object storageRef)
partName
- the part name of the content partmimeType
- contains information about the content part such as
content-type, encoding and etc.partIndex
- indicates the index of this part in the content part array
that is added to the BizDocEnvelopelength
- indicates the length of this content part in number of bytesstorageType
- indicates the storage type of this content part.
use STORAGE_TYPE_TSPACE or STORAGE_TYPE_DB constants of this classstorageRef
- contains the storage reference object of the content part.
if the storageType is STORAGE_TYPE_TSPACE, storageRef contains an
object of com.wm.util.tspace.Reservation class.public BizDocContentPart(java.lang.String partName, java.lang.String mimeType, byte[] bytes, int partIndex, int length, java.lang.String storageType, java.lang.Object storageRef)
partName
- is the part name of the content partmimeType
- contains information about the content part such as
content-type, encoding and etc.bytes
- contains the content of the content part. if this represents a large
content part then this field is left empty and the storageType and storageRef
fields are populatedpartIndex
- indicates the index of this part in the content part array
that is added to the BizDocEnvelopelength
- indicates the length of this content part in number of bytes.storageType
- - indicates the storage type of this content part.
use STORAGE_TYPE_TSPACE or STORAGE_TYPE_DB constants of this class.storageRef
- contains the storage reference object of the content part.
if the storageType is STORAGE_TYPE_TSPACE, storageRef contains an
object of com.wm.util.tspace.Reservation class.public BizDocContentPart(java.lang.String partName, java.lang.String mimeType, byte[] bytes, int partIndex, int length, java.lang.String storageType, java.lang.Object storageRef, boolean largePart)
Method Detail |
---|
public static com.wm.data.IData create()
public java.lang.String getPartName()
public java.lang.String getMimeType()
public int getLength()
public byte[] getBytes()
public int getPartIndex()
public java.lang.String getStorageType()
public java.lang.Object getStorageRef()
public boolean isLargePart()
public final void setPartName(java.lang.String partName)
public final void setMimeType(java.lang.String mimeType)
public final void setLength(int length)
public final void setBytes(byte[] bytes)
public final void setPartIndex(int partIndex)
public final void setStorageType(java.lang.String storageType)
storageType
- indicates the storage type. For large documents
storageType contains the value of constant STORAGE_TYPE_TSPACEpublic final void setStorageRef(java.lang.Object storageRef)
storageRef
- contains the storage reference. For large documents storageRef
is an object of com.wm.util.tspace.Reservationpublic void setLargePart(boolean largePart)
public final java.lang.Object getContent() throws java.io.IOException
java.io.IOException
public final java.lang.Object getContent(java.lang.String docId) throws java.io.IOException
java.io.IOException
public static BizDocContentPart[] addContentPart(BizDocContentPart[] ary, BizDocContentPart part)
public static BizDocContentPart[] arrayCast(java.lang.Object[] ary)
public static BizDocContentPart createLargeContentPart(java.lang.String partName, java.lang.String mimeType, int partIndex, java.io.InputStream contentStream, int contentLength) throws java.io.IOException, com.wm.util.tspace.ReservationException
java.io.IOException
com.wm.util.tspace.ReservationException
public static java.lang.String getFromMimeType(java.lang.String mimeType, java.lang.String key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |