com.moyosoft.connector.ms.outlook.folder
Class OutlookFolder

java.lang.Object
  |
  +--com.moyosoft.connector.ms.outlook.folder.OutlookFolder

public class OutlookFolder
extends java.lang.Object


Field Summary
static int PERMISSION_CREATE_ASSOCIATED
           
static int PERMISSION_CREATE_CONTENTS
           
static int PERMISSION_CREATE_HIERARCHY
           
static int PERMISSION_DELETE
           
static int PERMISSION_MODIFY
           
static int PERMISSION_READ
           
 
Constructor Summary
OutlookFolder(com.moyosoft.connector.com.Dispatch dispatch)
           
OutlookFolder(OutlookFolder parentFolder, java.lang.String newFolderName)
          Creates a new folder with the specified name
OutlookFolder(OutlookFolder parentFolder, java.lang.String newFolderName, FolderType folderType)
          Creates a new folder with the specified name and type
 
Method Summary
 void addToFavorites()
           
 void addToFavorites(boolean dontDisplayAddFavoriteDialog)
           
 void addToFavorites(boolean dontDisplayAddFavoriteDialog, java.lang.String favoriteName)
           
 void addToPFFavorites()
           
 boolean canCreateItems()
          Returns true if the current user has permission to create new items in this folder; false otherwise.
 boolean canCreateSubfolders()
          Returns true if the current user has permission to create sub-folders in this folder; false otherwise.
 boolean canDeleteItems()
          Returns true if the current user has permission to delete items in this folder; false otherwise.
 boolean canReadItems()
          Returns true if the current user has permission to read items in this folder; false otherwise.
 OutlookFolder copyTo(OutlookFolder destinationFolder)
           
 OutlookFolder createFolder(java.lang.String pNewFolderName, FolderType pFolderType)
          Create a new folder in this folder.
 OutlookItem createItem()
          Create a new item in this folder.
 OutlookItem createItem(ItemType pType)
          Create a new item in this folder.
 void delete()
           
 void display()
           
 void dispose()
           
 java.lang.String getAddressBookName()
           
 View getCurrentView()
           
 ItemType getDefaultItemType()
           
 java.lang.String getDescription()
           
 com.moyosoft.connector.com.Dispatch getDispatch()
           
 Explorer getExplorer()
           
 Explorer getExplorer(FolderDisplayMode displayMode)
           
 OutlookFolder getFolder(java.lang.String folderPath)
          Returns a sub-folder for the specified name or path.
 OutlookFolderID getFolderId()
           
 java.lang.String getFolderPath()
           
 FoldersCollection getFolders()
          Retrieve information about Outlook folders.
 int getFoldersCount()
           
 java.lang.String getFullFolderPath()
           
 ItemsCollection getItems()
          Return items in this folders as a collection.
 java.lang.String getName()
           
 OutlookFolder getParentFolder()
           
 int getPermissions()
          Returns the permissions of the folder.
 ShowItemCount getShowItemCount()
           
 java.lang.String getStorePath()
           
 FolderStoreType getStoreType()
           
 int getUnReadItemCount()
           
 ViewsCollection getViews()
           
 java.lang.String getWebViewURL()
           
 boolean hasChildren()
           
 boolean isCustomViewsOnly()
           
 boolean isInAppFolderSyncObject()
           
 boolean isSharePointFolder()
           
 boolean isShowAsOutlookAB()
           
 boolean isWebViewAllowNavigation()
           
 boolean isWebViewOn()
           
 void moveTo(OutlookFolder destinationFolder)
           
 void setAddressBookName(java.lang.String value)
           
 void setCustomViewsOnly(boolean value)
           
 void setDescription(java.lang.String value)
           
 void setInAppFolderSyncObject(boolean value)
           
 void setName(java.lang.String value)
           
 void setShowAsOutlookAB(boolean value)
           
 void setShowItemCount(ShowItemCount value)
           
 void setWebViewAllowNavigation(boolean value)
           
 void setWebViewOn(boolean value)
           
 void setWebViewURL(java.lang.String value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERMISSION_MODIFY

public static final int PERMISSION_MODIFY
See Also:
Constant Field Values

PERMISSION_READ

public static final int PERMISSION_READ
See Also:
Constant Field Values

PERMISSION_DELETE

public static final int PERMISSION_DELETE
See Also:
Constant Field Values

PERMISSION_CREATE_HIERARCHY

public static final int PERMISSION_CREATE_HIERARCHY
See Also:
Constant Field Values

PERMISSION_CREATE_CONTENTS

public static final int PERMISSION_CREATE_CONTENTS
See Also:
Constant Field Values

PERMISSION_CREATE_ASSOCIATED

public static final int PERMISSION_CREATE_ASSOCIATED
See Also:
Constant Field Values
Constructor Detail

OutlookFolder

public OutlookFolder(com.moyosoft.connector.com.Dispatch dispatch)

OutlookFolder

public OutlookFolder(OutlookFolder parentFolder,
                     java.lang.String newFolderName)
Creates a new folder with the specified name

Parameters:
parentFolder - the parent folder where the new folder will be created
newFolderName - new folder's name
Throws:
com.moyosoft.connector.com.ComponentObjectModelException - if a COM error occurs.

OutlookFolder

public OutlookFolder(OutlookFolder parentFolder,
                     java.lang.String newFolderName,
                     FolderType folderType)
Creates a new folder with the specified name and type

Parameters:
parentFolder - the parent folder where the new folder will be created
newFolderName - new folder's name
folderType - new folder's type
Throws:
com.moyosoft.connector.com.ComponentObjectModelException - if a COM error occurs.
Method Detail

getDispatch

public com.moyosoft.connector.com.Dispatch getDispatch()

getDefaultItemType

public ItemType getDefaultItemType()

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String value)

getFolderId

public OutlookFolderID getFolderId()

getFolders

public FoldersCollection getFolders()
                             throws com.moyosoft.connector.com.ComponentObjectModelException
Retrieve information about Outlook folders.

Returns:
The collection of OutlookFolder objects.
Throws:
com.moyosoft.connector.com.ComponentObjectModelException - if a COM error occurs.

getFolder

public OutlookFolder getFolder(java.lang.String folderPath)
Returns a sub-folder for the specified name or path. Accepted path separators are '\' or '/'.


getItems

public ItemsCollection getItems()
                         throws com.moyosoft.connector.com.ComponentObjectModelException
Return items in this folders as a collection.

Returns:
Throws:
com.moyosoft.connector.com.ComponentObjectModelException

getName

public java.lang.String getName()

setName

public void setName(java.lang.String value)

getParentFolder

public OutlookFolder getParentFolder()

getStoreType

public FolderStoreType getStoreType()

getStorePath

public java.lang.String getStorePath()

getUnReadItemCount

public int getUnReadItemCount()

copyTo

public OutlookFolder copyTo(OutlookFolder destinationFolder)

delete

public void delete()

display

public void display()

getExplorer

public Explorer getExplorer()

getExplorer

public Explorer getExplorer(FolderDisplayMode displayMode)

moveTo

public void moveTo(OutlookFolder destinationFolder)

isWebViewOn

public boolean isWebViewOn()

setWebViewOn

public void setWebViewOn(boolean value)

getWebViewURL

public java.lang.String getWebViewURL()

setWebViewURL

public void setWebViewURL(java.lang.String value)

isWebViewAllowNavigation

public boolean isWebViewAllowNavigation()

setWebViewAllowNavigation

public void setWebViewAllowNavigation(boolean value)

addToPFFavorites

public void addToPFFavorites()

getAddressBookName

public java.lang.String getAddressBookName()

setAddressBookName

public void setAddressBookName(java.lang.String value)

isShowAsOutlookAB

public boolean isShowAsOutlookAB()

setShowAsOutlookAB

public void setShowAsOutlookAB(boolean value)

getFolderPath

public java.lang.String getFolderPath()

addToFavorites

public void addToFavorites()

addToFavorites

public void addToFavorites(boolean dontDisplayAddFavoriteDialog)

addToFavorites

public void addToFavorites(boolean dontDisplayAddFavoriteDialog,
                           java.lang.String favoriteName)

isInAppFolderSyncObject

public boolean isInAppFolderSyncObject()

setInAppFolderSyncObject

public void setInAppFolderSyncObject(boolean value)

getCurrentView

public View getCurrentView()

isCustomViewsOnly

public boolean isCustomViewsOnly()

setCustomViewsOnly

public void setCustomViewsOnly(boolean value)

getViews

public ViewsCollection getViews()

getFullFolderPath

public java.lang.String getFullFolderPath()

isSharePointFolder

public boolean isSharePointFolder()

getShowItemCount

public ShowItemCount getShowItemCount()

setShowItemCount

public void setShowItemCount(ShowItemCount value)

createFolder

public OutlookFolder createFolder(java.lang.String pNewFolderName,
                                  FolderType pFolderType)
                           throws com.moyosoft.connector.com.ComponentObjectModelException
Create a new folder in this folder. Returns the new folder's object.

Parameters:
pNewFolderName - new folder's name
pFolderType - new folder's type
Throws:
com.moyosoft.connector.com.ComponentObjectModelException

createItem

public OutlookItem createItem()
                       throws com.moyosoft.connector.com.ComponentObjectModelException
Create a new item in this folder.

Returns:
the created item
Throws:
com.moyosoft.connector.com.ComponentObjectModelException

createItem

public OutlookItem createItem(ItemType pType)
                       throws com.moyosoft.connector.com.ComponentObjectModelException
Create a new item in this folder.

Parameters:
pType - new item's type
Returns:
the created item
Throws:
com.moyosoft.connector.com.ComponentObjectModelException

getFoldersCount

public int getFoldersCount()

hasChildren

public boolean hasChildren()

getPermissions

public int getPermissions()
Returns the permissions of the folder.
This method is only available in the Professional edition of Java Outlook Connector.

Example:
 int permissions = folder.getPermissions();
 if((permissions & OutlookFolder.PERMISSION_READ) != 0)
 {
   // Permission to read items
 }
 if((permissions & OutlookFolder.PERMISSION_DELETE) != 0)
 {
   // Permission to delete items
 }
 if((permissions & OutlookFolder.PERMISSION_CREATE_CONTENTS) != 0)
 {
   // Permission to create items
 }
 if((permissions & OutlookFolder.PERMISSION_CREATE_HIERARCHY) != 0)
 {
   // Permission to create subfolders
 }
 


canReadItems

public boolean canReadItems()
Returns true if the current user has permission to read items in this folder; false otherwise.
This method is only available in the Professional edition of Java Outlook Connector.


canDeleteItems

public boolean canDeleteItems()
Returns true if the current user has permission to delete items in this folder; false otherwise.
This method is only available in the Professional edition of Java Outlook Connector.


canCreateItems

public boolean canCreateItems()
Returns true if the current user has permission to create new items in this folder; false otherwise.
This method is only available in the Professional edition of Java Outlook Connector.


canCreateSubfolders

public boolean canCreateSubfolders()
Returns true if the current user has permission to create sub-folders in this folder; false otherwise.
This method is only available in the Professional edition of Java Outlook Connector.


dispose

public void dispose()