com.imcode.imcms.api
Class TextDocument.Menu

java.lang.Object
  extended bycom.imcode.imcms.api.TextDocument.Menu
Enclosing class:
TextDocument

public static class TextDocument.Menu
extends java.lang.Object


Field Summary
static int SORT_BY_HEADLINE
          Menu sorted by headline.
static int SORT_BY_MANUAL_ORDER_DESCENDING
          Menu sorted by 'manual' order.
static int SORT_BY_MODIFIED_DATETIME_DESCENDING
          Menu sorted by datetime.
static int SORT_BY_TREE_ORDER_DESCENDING
          Menu sorted by tree sort order.
 
Method Summary
 void addDocument(Document documentToAdd)
          Add a internalTextDocument to the menu.
 Document[] getDocuments()
           
 TextDocument.MenuItem[] getMenuItems()
           
 int getSortOrder()
           
 Document[] getVisibleDocuments()
           
 TextDocument.MenuItem[] getVisibleMenuItems()
           
 void removeDocument(Document documentToRemove)
          Remove a internalTextDocument from the menu.
 void setSortOrder(int sortOrder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SORT_BY_HEADLINE

public static final int SORT_BY_HEADLINE
Menu sorted by headline.

See Also:
Constant Field Values

SORT_BY_MANUAL_ORDER_DESCENDING

public static final int SORT_BY_MANUAL_ORDER_DESCENDING
Menu sorted by 'manual' order.

See Also:
Constant Field Values

SORT_BY_MODIFIED_DATETIME_DESCENDING

public static final int SORT_BY_MODIFIED_DATETIME_DESCENDING
Menu sorted by datetime.

See Also:
Constant Field Values

SORT_BY_TREE_ORDER_DESCENDING

public static final int SORT_BY_TREE_ORDER_DESCENDING
Menu sorted by tree sort order.

See Also:
Constant Field Values
Method Detail

addDocument

public void addDocument(Document documentToAdd)
                 throws NoPermissionException,
                        DocumentAlreadyInMenuException
Add a internalTextDocument to the menu.

Parameters:
documentToAdd - the internalTextDocument to add
Throws:
NoPermissionException - If you lack permission to edit the menudocument or permission to add the owner.
DocumentAlreadyInMenuException - If the owner already is in the menu.

removeDocument

public void removeDocument(Document documentToRemove)
                    throws NoPermissionException
Remove a internalTextDocument from the menu.

Parameters:
documentToRemove - the internalTextDocument to remove
Throws:
NoPermissionException - If you lack permission to edit the menudocument.

setSortOrder

public void setSortOrder(int sortOrder)
Parameters:
sortOrder - One of SORT_BY_HEADLINE, SORT_BY_MANUAL_ORDER_DESCENDING, SORT_BY_MODIFIED_DATETIME_DESCENDING, or SORT_BY_TREE_ORDER_DESCENDING

getSortOrder

public int getSortOrder()

getVisibleMenuItems

public TextDocument.MenuItem[] getVisibleMenuItems()
Returns:
The visible menuitems in this menu.
Since:
2.0

getVisibleDocuments

public Document[] getVisibleDocuments()
Returns:
the documents returned by getVisibleMenuItems().
Since:
2.0

getMenuItems

public TextDocument.MenuItem[] getMenuItems()
Returns:
The menuitems in this menu.

getDocuments

public Document[] getDocuments()
Returns:
the documents returned by getMenuItems().