Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## portlets.compoze.groupware
Class AbstractItem

    java.lang.Object
      portlets.compoze.groupware.AbstractItem

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  Appointment, Contact, Message, Resource, Task

public abstract class AbstractItem
extends java.lang.Object
implements java.io.Serializable

This class represents the abstract item.

See Also:
  Serialized Form

Constructor Summary
`protected` | `AbstractItem()` Constructor.
`protected` | `AbstractItem(java.lang.String sID)` Constructor.

Method Summary
`int` | `getAttachmentCount()` Gets the number of attachments for the item.
`AttachmentInfo[]` | `getAttachmentInfoArray()` Gets the attachment info array for this item.
`java.lang.String` | `getBodyHtml()` Gets the body in HTML format.
`java.lang.String` | `getBodyText()` Gets the body of the item in plain text format.
`java.lang.String` | `getBodyTextAsHtml()` Gets the body text in HTML format.
`java.util.Date` | `getDateCreated()` Gets the date the item was created.
`java.lang.String` | `getID()` Gets the item ID.
`Importance` | `getImportance()` Gets the importance of the item.
`int` | `getIndex()` Gets the index of the item.
`ItemType` | `getItemType()` Gets the item type of this item.
`int` | `getSize()` Gets the size of the item in bytes.
`int` | `getSizeInKilobytes()` Gets the size of the item in kilobytes.
`java.lang.String` | `getSubject()` Gets the subject of the item.
`java.lang.String` | `getSubject(int iLength)` Gets the subject of the item truncated to the specified length.
`boolean` | `hasAttachment()` Checks if the item has an attachment.
`protected static java.lang.String` | `prettyTruncate(java.lang.String sStr, java.lang.String sPostfix, int iLength)` Truncates a string after a certain number of characters and append the specified string to it.
`void` | `setAttachmentCount(int iAttachmentCount)` Sets the number of attachments for the item.
`void` | `setAttachmentInfoArray(AttachmentInfo[] attachmentInfoArray)` Sets the attachment info array for this item.
`void` | `setBodyHtml(java.lang.String sBodyHtml)` Sets the body in HTML format.
`void` | `setBodyText(java.lang.String sBody)` Sets the body of the item in plain text format.
`void` | `setDateCreated(java.util.Date dateCreated)` Sets the item creation date.
`void` | `setHasAttachment(boolean bHasAttachment)` Sets the flag if the item has an attachment.
`void` | `setID(java.lang.String sID)` Sets the item ID.
`void` | `setImportance(Importance importance)` Sets the importance of the item.
`void` | `setIndex(int iIndex)` Sets the index of the item.
`void` | `setItemType(ItemType type)` Sets the item type of the item.
`void` | `setSize(int iSize)` Sets the size of the item in bytes.
`void` | `setSubject(java.lang.String sSubject)` Sets the subject of the item.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractItem

    protected AbstractItem()

  Constructor.

### AbstractItem

    protected AbstractItem(java.lang.String sID)

  Constructor.

Parameters:
  `sID` - the id of the item

Method Detail

### getID

    public java.lang.String getID()

  Gets the item ID.

  Returns:
    the item ID or `null` for none

### setID

    public void setID(java.lang.String sID)

  Sets the item ID.

  Parameters:
    `sID` - the item ID

### getDateCreated

    public java.util.Date getDateCreated()

  Gets the date the item was created.

  Returns:
    the date or `null` for none

### setDateCreated

    public void setDateCreated(java.util.Date dateCreated)

  Sets the item creation date.

  Parameters:
    `dateCreated` - the item creation date

### getSize

    public int getSize()

  Gets the size of the item in bytes.

  Returns:
    the size (in bytes)

### setSize

    public void setSize(int iSize)

  Sets the size of the item in bytes.

  Parameters:
    `iSize` - the size of the item

### hasAttachment

    public boolean hasAttachment()

  Checks if the item has an attachment.

  Returns:
    `true` if item has attachment or `false` otherwise

### setHasAttachment

    public void setHasAttachment(boolean bHasAttachment)

  Sets the flag if the item has an attachment.

  Parameters:
    `bHasAttachment` - `true` if item has attachment or `false` otherwise

### getAttachmentCount

    public int getAttachmentCount()

  Gets the number of attachments for the item.

  Returns:
    the number of attachments

### setAttachmentCount

    public void setAttachmentCount(int iAttachmentCount)

  Sets the number of attachments for the item.

  Parameters:
    `iAttachmentCount` - the attachment count of the item

### getItemType

    public ItemType getItemType()

  Gets the item type of this item.

  Returns:
    the item type

### setItemType

    public void setItemType(ItemType type)

  Sets the item type of the item.

  Parameters:
    `type` - the item type (may not be `null`)

### getAttachmentInfoArray

    public AttachmentInfo[] getAttachmentInfoArray()

  Gets the attachment info array for this item.

  Returns:
    an array of attachment info

### setAttachmentInfoArray

    public void setAttachmentInfoArray(AttachmentInfo[] attachmentInfoArray)

  Sets the attachment info array for this item.

  Parameters:
    `attachmentInfoArray` - the attachment info array (may not be `null`)

### getSubject

    public java.lang.String getSubject()

  Gets the subject of the item.

  Returns:
    the subject or `null` for none

### getSubject

    public java.lang.String getSubject(int iLength)

  Gets the subject of the item truncated to the specified length.

  Parameters:
    `iLength` - the length of the subject
  Returns:
    the subject or `null` for none

### setSubject

    public void setSubject(java.lang.String sSubject)

  Sets the subject of the item.

  Parameters:
    `sSubject` - the subject

### getSizeInKilobytes

    public int getSizeInKilobytes()

  Gets the size of the item in kilobytes.

  Returns:
    the size of the item (in kilobytes)

### getBodyText

    public java.lang.String getBodyText()

  Gets the body of the item in plain text format.

  Returns:
    the body text or `null` for none

### setBodyText

    public void setBodyText(java.lang.String sBody)

  Sets the body of the item in plain text format.

  Parameters:
    `sBody` - the body

### getBodyTextAsHtml

    public java.lang.String getBodyTextAsHtml()

  Gets the body text in HTML format.

  Returns:
    the body text in HTML format

### getImportance

    public Importance getImportance()

  Gets the importance of the item.

  Returns:
    the importance

### setImportance

    public void setImportance(Importance importance)

  Sets the importance of the item.

  Parameters:
    `importance` - the importance (may not be `null`)

### getBodyHtml

    public java.lang.String getBodyHtml()

  Gets the body in HTML format.

  Returns:
    the body in HTML format or `null for none`

### setBodyHtml

    public void setBodyHtml(java.lang.String sBodyHtml)

  Sets the body in HTML format.

  Parameters:
    `sBodyHtml` - the HTML body

### prettyTruncate

    protected static java.lang.String prettyTruncate(java.lang.String sStr,
                                                     java.lang.String sPostfix,
                                                     int iLength)

  Truncates a string after a certain number of characters and append the specified string to it. This is useful for taking a string and appending "..." if the string becomes too long.

  Parameters:
    `sStr` - the original string
    `sPostfix` - the string to put at the end of the original string
    `iLength` - the maximum length of the result (string plus postfix)

### getIndex

    public int getIndex()

  Gets the index of the item.

  Returns:
    the index (0 ordered)

### setIndex

    public void setIndex(int iIndex)

  Sets the index of the item.

  Parameters:
    `iIndex` - the index of the item

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.