|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jcrom.AbstractJcrEntity
net.fortuna.mstor.connector.jcr.JcrFolder
public class JcrFolder
$Id$ Created on 22/01/2009
Field Summary |
---|
Fields inherited from class org.jcrom.AbstractJcrEntity |
---|
name, path |
Constructor Summary | |
---|---|
JcrFolder()
|
Method Summary | |
---|---|
long |
allocateUid(MessageDelegate message)
Allocates a new message UID for the folder. |
void |
appendMessages(javax.mail.Message[] messages)
Append the specified messages to this delegate. |
void |
close()
Close the folder delegate. |
boolean |
create(int type)
Initialise the delegate based on the specified folder type. |
boolean |
delete()
Delete the folder delegate. |
boolean |
exists()
Indicates whether the folder represented by this delegate exists. |
void |
expunge(javax.mail.Message[] deleted)
Permanently delete the specified messages from this delegate. |
int |
getDeletedMessageCount()
Optional support for more efficient implementation. |
FolderDelegate<JcrMessage> |
getFolder(java.lang.String name)
Returns a child folder delegate with the specified name. |
java.lang.String |
getFolderName()
|
java.lang.String |
getFullName()
|
long |
getLastModified()
Returns the last modification timestamp of this folder. |
long |
getLastUid()
Retrieves the last allocated message UID for the folder. |
JcrMessage |
getMessage(int messageNumber)
Returns message delegate corresponding to the specified message id. |
java.io.InputStream |
getMessageAsStream(int index)
Returns an input stream from which to read the specified message. |
int |
getMessageCount()
Returns the number of messages in the folder delegate. |
FolderDelegate<JcrMessage> |
getParent()
|
char |
getSeparator()
|
int |
getType()
|
long |
getUidValidity()
Returns the UID validity associated with the metadata. |
FolderDelegate<JcrMessage>[] |
list(java.lang.String pattern)
Returns a list of child folder delegates matching the specified pattern. |
void |
open(int mode)
Open the folder delegate. |
boolean |
renameTo(java.lang.String name)
Rename the folder delegate. |
Methods inherited from class org.jcrom.AbstractJcrEntity |
---|
getName, getPath, setName, setPath |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JcrFolder()
Method Detail |
---|
public long allocateUid(MessageDelegate message) throws java.lang.UnsupportedOperationException, DelegateException
allocateUid
in interface FolderDelegate<JcrMessage>
message
- the message to allocate a UID value to
java.lang.UnsupportedOperationException
- if this method is not supported by the folder implementation
DelegateException
- where an error occurs allocating a UIDpublic void appendMessages(javax.mail.Message[] messages) throws javax.mail.MessagingException
appendMessages
in interface FolderDelegate<JcrMessage>
messages
- an array of messages to append to the folder
javax.mail.MessagingException
- where an error occurs appending the messagespublic void close() throws javax.mail.MessagingException
close
in interface FolderDelegate<JcrMessage>
javax.mail.MessagingException
- where an unexpected error occurs closing the folderpublic boolean create(int type) throws javax.mail.MessagingException
create
in interface FolderDelegate<JcrMessage>
type
- a folder type
javax.mail.MessagingException
- where an unexpected error occurs creating the delegatepublic boolean delete()
delete
in interface FolderDelegate<JcrMessage>
public boolean exists()
exists
in interface FolderDelegate<JcrMessage>
public void expunge(javax.mail.Message[] deleted) throws javax.mail.MessagingException
expunge
in interface FolderDelegate<JcrMessage>
deleted
- an array of deleted messages to expunge
javax.mail.MessagingException
- where an error occurs expunging the messagespublic FolderDelegate<JcrMessage> getFolder(java.lang.String name) throws javax.mail.MessagingException
getFolder
in interface FolderDelegate<JcrMessage>
name
- a folder name
javax.mail.MessagingException
- where an unexpected error occurs retrieving the folderpublic java.lang.String getFullName()
getFullName
in interface FolderDelegate<JcrMessage>
public long getLastModified() throws java.lang.UnsupportedOperationException
getLastModified
in interface FolderDelegate<JcrMessage>
java.lang.UnsupportedOperationException
- if this method is not supported by the folder implementationpublic long getLastUid() throws java.lang.UnsupportedOperationException
getLastUid
in interface FolderDelegate<JcrMessage>
java.lang.UnsupportedOperationException
- if this method is not supported by the folder implementationpublic JcrMessage getMessage(int messageNumber) throws DelegateException
getMessage
in interface FolderDelegate<JcrMessage>
messageNumber
- the message number of the message to retrieve
DelegateException
- where an error occurs retrieving the messagepublic java.io.InputStream getMessageAsStream(int index) throws java.io.IOException
getMessageAsStream
in interface FolderDelegate<JcrMessage>
index
- the index of the message to return
java.io.IOException
- where an error occurspublic int getMessageCount() throws javax.mail.MessagingException
getMessageCount
in interface FolderDelegate<JcrMessage>
javax.mail.MessagingException
- where an unexpected error occurs retrieving the message countpublic int getDeletedMessageCount() throws javax.mail.MessagingException, java.lang.UnsupportedOperationException
getDeletedMessageCount
in interface FolderDelegate<JcrMessage>
javax.mail.MessagingException
- where an unexpected error occurs
java.lang.UnsupportedOperationException
- if this method is not supported by the folder implementationpublic FolderDelegate<JcrMessage> getParent()
getParent
in interface FolderDelegate<JcrMessage>
public char getSeparator()
getSeparator
in interface FolderDelegate<JcrMessage>
public int getType()
getType
in interface FolderDelegate<JcrMessage>
Folder.HOLDS_FOLDERS
,
Folder.HOLDS_MESSAGES
public long getUidValidity() throws java.lang.UnsupportedOperationException, javax.mail.MessagingException
getUidValidity
in interface FolderDelegate<JcrMessage>
java.lang.UnsupportedOperationException
- if this method is not supported by the folder implementation
javax.mail.MessagingException
- if an error occurs retrieving the validity valuepublic FolderDelegate<JcrMessage>[] list(java.lang.String pattern)
list
in interface FolderDelegate<JcrMessage>
pattern
- a pattern to match folders against
public void open(int mode)
open
in interface FolderDelegate<JcrMessage>
mode
- the mode to open the folderFolder.READ_ONLY
,
Folder.READ_WRITE
public boolean renameTo(java.lang.String name)
renameTo
in interface FolderDelegate<JcrMessage>
name
- the new folder name
public final java.lang.String getFolderName()
getFolderName
in interface FolderDelegate<JcrMessage>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |