MailContentManager.@ParametersAreNonnullByDefault @Deprecated public class DefaultMailContentManager extends Object implements MailContentManager
ITERATE_ALL| Constructor and Description |
|---|
DefaultMailContentManager()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
int |
findMailTotal(Space space)
Deprecated.
|
ContentEntityObject |
getById(long id)
Deprecated.
|
Map<Long,ContributionStatus> |
getContributionStatusByUser(Collection<ContentId> contentIds,
com.atlassian.sal.api.user.UserKey userKey)
Deprecated.
Identifies the most recent contributions made to a set of content by the given user.
|
Mail |
getFirstMailAfter(String spaceKey,
long mailId)
Deprecated.
|
Mail |
getFirstMailBefore(String spaceKey,
long mailId)
Deprecated.
|
List<Mail> |
getMail(Space space,
boolean currentOnly)
Deprecated.
|
Mail |
getMailById(long id)
Deprecated.
Get a mail by its database id.
|
Mail |
getMailByMessageId(String messageId)
Deprecated.
Get a mail by its message-id.
|
List |
getMailsByMessageId(String messageId)
Deprecated.
Get all mails with the matching message-id.
|
ContentEntityObject |
getNextVersion(ContentEntityObject ceo)
Deprecated.
Get the next version of the entity in the sequence of
Versioned. |
ContentEntityObject |
getOtherVersion(ContentEntityObject ceo,
int version)
Deprecated.
|
PageResponse<AbstractPage> |
getPageAndBlogPostsVersionsLastEditedByUser(com.atlassian.sal.api.user.UserKey userKey,
LimitedRequest request)
Deprecated.
Retrieve a page of entities that have been modified by the user, in order of the user's most recent modification.
|
PageResponse<AbstractPage> |
getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts(com.atlassian.sal.api.user.UserKey userKey,
LimitedRequest request)
Deprecated.
Retrieve a page of entities that have been modified by the user, in order of the user's most recent modification.
|
ContentEntityObject |
getPreviousVersion(ContentEntityObject ceo)
Deprecated.
Get the previous version of the entity in the sequence of
Versioned. |
Iterator |
getRecentlyAddedEntities(String spaceKey,
int maxResults)
Deprecated.
Retrieve an iterator of recently added entities, in order of most recent to last.
|
Iterator |
getRecentlyModifiedEntities(String spaceKey,
int maxResults)
Deprecated.
Retrieve an iterator of recently modified entities, in order of most recent to last.
|
Iterator |
getRecentlyModifiedEntitiesForUser(String username)
Deprecated.
Retrieve an iterator of recently modified entities, in order of most recent to last.
|
List |
getRecentlyModifiedForChangeDigest(Date fromDate)
Deprecated.
Retrieves a list of
ContentEntityObjects that have been newly added or modified
since the date specified. |
List |
getSpaceMail(int firstResult,
int maxResults,
String spaceKey)
Deprecated.
|
Iterator |
getSpaceMailIterator(String spaceKey)
Deprecated.
|
Iterator |
getSpaceMailWithAttachmentsIterator(String spaceKey)
Deprecated.
|
List<VersionHistorySummary> |
getVersionHistorySummaries(ContentEntityObject ceo)
Deprecated.
Get a VersionHistorySummary for all previous versions of a ContentEntityObject, starting with the current
content.
|
Map<Long,ContentEntityObject> |
getVersionsLastEditedByUser(Collection<ContentId> contentIds,
com.atlassian.sal.api.user.UserKey userKey)
Deprecated.
Gets the
ContentEntityObject objects relating to the version of the given contentIds that were last
edited by the given user. |
void |
refreshContentEntity(ContentEntityObject obj)
Deprecated.
Refreshes the specified entity (including content) in the Hibernate session to ensure that subsequent retrievals are up-to-date.
|
void |
removeAllMail(Space space)
Deprecated.
|
void |
removeAttachmentsForMail(Mail mail)
Deprecated.
|
void |
removeContentEntity(ContentEntityObject obj)
Deprecated.
Removes given content entity object and all associated domain objects i.e.
|
void |
removeHistoricalVersion(ContentEntityObject historicalVersion)
Deprecated.
Removes a historical ContentEntityObject.
|
void |
removeMail(Mail mail)
Deprecated.
removes mail and its associated attachments
|
void |
revertContentEntityBackToVersion(ContentEntityObject obj,
int version,
String revertComment,
boolean revertTitle)
Deprecated.
Reverts a
ContentEntityObject back to its state at the version specified by version. |
void |
saveContentEntity(ContentEntityObject obj,
ContentEntityObject origObj,
SaveContext saveContext)
Deprecated.
In order to create a history for this object, we need to pass in the modified as well as the original version of the object.
|
void |
saveContentEntity(ContentEntityObject obj,
SaveContext saveContext)
Deprecated.
|
<T extends ContentEntityObject> |
saveNewVersion(T current,
Modification<T> modification)
Deprecated.
Applies the state changes supplied by modification and persists those changes to a new version.
|
<T extends ContentEntityObject> |
saveNewVersion(T current,
Modification<T> modification,
SaveContext saveContext)
Deprecated.
Applies the state changes supplied by modification and persists those changes to a new version.
|
boolean |
spaceHasMail(String spaceKey)
Deprecated.
|
Mail |
storeIncomingMail(Space space,
byte[] rawMessage)
Deprecated.
Create a new mail content object in the given space for the given raw RFC822 message.
|
Mail |
storeIncomingMail(Space space,
javax.mail.internet.MimeMessage mimeMessage)
Deprecated.
Create a new mail content object in the given space for the given mimeMessage.
|
void |
updateContentLinkingTo(SpaceContentEntityObject contentBeingRefactored,
String newSpaceKey,
String newTitle)
Deprecated.
Loops through all the content that currently links to 'contentBeingChanged' and renames all the links.
|
void |
updateOutgoingLinksInContent(SpaceContentEntityObject contentBeingRefactored,
String newSpaceKey)
Deprecated.
Update the links on the page itself.
|
void |
updateSingleContentLinkinTo(ContentEntityObject referringContent,
SpaceContentEntityObject contentBeingRefactored,
String newSpaceKey,
String newTitle)
Deprecated.
Renames all links contained in the 'referringContent' that currently links to 'contentBeingRefactored'.
|
void |
updateSingleContentLinkinTo(ContentEntityObject referringContent,
SpaceContentEntityObject contentBeingRefactored,
String newSpaceKey,
String newTitle,
SaveContext saveContext)
Deprecated.
|
public void refreshContentEntity(ContentEntityObject obj)
ContentEntityManagerrefreshContentEntity in interface ContentEntityManagerobj - the object to be refreshed in the Hibernate session.public void saveContentEntity(ContentEntityObject obj, @Nullable SaveContext saveContext)
saveContentEntity in interface ContentEntityManagerobj - - the ContentEntityObject to savesaveContext - - a SaveContext holding additional parameters for the manager to use when saving.public void saveContentEntity(ContentEntityObject obj, @Nullable ContentEntityObject origObj, @Nullable SaveContext saveContext)
ContentEntityManagersaveContentEntity in interface ContentEntityManagersaveContext - - a SaveContext holding additional parameters for the manager to use when saving.public <T extends ContentEntityObject> void saveNewVersion(T current, Modification<T> modification)
ContentEntityManager
manager.<Page>saveNewVersion(page, new Modification<Page>() {
public void modify(Page page) {
page.setTitle("foobar");
}
});
saveNewVersion in interface ContentEntityManagerT - the type content. This ensures that the type of current is the same as the type passed to the modificationcurrent - the current / latest versionmodification - an implementation of Modification which describes the state changes you requirepublic <T extends ContentEntityObject> void saveNewVersion(T current, Modification<T> modification, @Nullable SaveContext saveContext)
ContentEntityManager
manager.<Page>saveNewVersion(page, new Modification<Page>() {
public void modify(Page page) {
page.setTitle("foobar");
}
}, new DefaultSaveContext());
saveNewVersion in interface ContentEntityManagerT - the type content. This ensures that the type of current is the same as the type passed to the modificationcurrent - the current / latest versionmodification - an implementation of Modification which describes the state changes you requiresaveContext - the save context (null if you have no specific requirements - or just use ContentEntityManager.saveNewVersion(ContentEntityObject, Modification)).public void removeContentEntity(ContentEntityObject obj)
ContentEntityManagerremoveContentEntity in interface ContentEntityManagerpublic void revertContentEntityBackToVersion(ContentEntityObject obj, int version, @Nullable String revertComment, boolean revertTitle)
ContentEntityManager
Reverts a ContentEntityObject back to its state at the version specified by version.
Creates a new latest version that resembles the previous state.
Since Confluence 4.0 most ContentEntityObjects are assumed to be XHTML formatted. So in reverting a ContentEntityObject which
actually has a WIKI BodyType this will be migrated on the fly to XHTML.
revertContentEntityBackToVersion in interface ContentEntityManagerobj - The ContentEntityObject to revertversion - The version to revert torevertComment - A comment to be associated with the revertrevertTitle - If true, the ContentEntityObject title will be reverted to the old state@Nonnull public Iterator getRecentlyAddedEntities(@Nullable String spaceKey, int maxResults)
ContentEntityManagerFor performance reasons, it's a VERY bad idea to supply both a space key, and infinite results.
If you supply a space key, this WILL NOT RETURN ANY COMMENTS. There is currently no way around this, you have to retrieve comments separately and splice the results together. Sorry.
getRecentlyAddedEntities in interface ContentEntityManagerspaceKey - the space key to look up the entities for. If spaceKey is null, there
is assumed to be no space, and things like user info and space descriptions will
also be returned.maxResults - the maximum number of entities to return in the iterator. Any number
zero or less (Use the ITERATE_ALL constant) will cause the iterator to go over
every entity.@Nonnull public Iterator getRecentlyModifiedEntities(String spaceKey, int maxResults)
ContentEntityManagerFor performance reasons, it's a VERY bad idea to supply both a space key, and infinite results.
getRecentlyModifiedEntities in interface ContentEntityManagerspaceKey - the space key to look up the entities for.maxResults - the maximum number of entities to return in the iterator. Any number
zero or less (Use the ITERATE_ALL constant) will cause the iterator to go over
every entity.@Nonnull public List getRecentlyModifiedForChangeDigest(Date fromDate)
ContentEntityManagerContentEntityObjects that have been newly added or modified
since the date specified. This list excludes drafts, space descriptions and mail.getRecentlyModifiedForChangeDigest in interface ContentEntityManagerfromDate - content modified after this date will be returnedContentEntityObjects that have been newly added or modified
since the date specified@Nonnull public PageResponse<AbstractPage> getPageAndBlogPostsVersionsLastEditedByUser(com.atlassian.sal.api.user.UserKey userKey, LimitedRequest request)
ContentEntityManagergetPageAndBlogPostsVersionsLastEditedByUser in interface ContentEntityManageruserKey - the key for the user for whom to retrieve the modified contentrequest - the request@Nonnull public PageResponse<AbstractPage> getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts(@Nullable com.atlassian.sal.api.user.UserKey userKey, LimitedRequest request)
ContentEntityManagergetPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts in interface ContentEntityManageruserKey - the key for the user for whom to retrieve the modified contentrequest - the request@Nonnull public Iterator getRecentlyModifiedEntitiesForUser(String username)
ContentEntityManagergetRecentlyModifiedEntitiesForUser in interface ContentEntityManagerusername - the user for which to retrieve the modified content@Nullable public ContentEntityObject getById(long id)
getById in interface ContentEntityManagerpublic void updateContentLinkingTo(SpaceContentEntityObject contentBeingRefactored, String newSpaceKey, String newTitle)
ContentEntityManagerupdateContentLinkingTo in interface ContentEntityManagerpublic void updateOutgoingLinksInContent(SpaceContentEntityObject contentBeingRefactored, String newSpaceKey)
ContentEntityManagerupdateOutgoingLinksInContent in interface ContentEntityManagerpublic void updateSingleContentLinkinTo(ContentEntityObject referringContent, SpaceContentEntityObject contentBeingRefactored, String newSpaceKey, String newTitle)
ContentEntityManagerupdateSingleContentLinkinTo in interface ContentEntityManagerpublic void updateSingleContentLinkinTo(ContentEntityObject referringContent, SpaceContentEntityObject contentBeingRefactored, String newSpaceKey, String newTitle, @Nullable SaveContext saveContext)
updateSingleContentLinkinTo in interface ContentEntityManager@Nullable public ContentEntityObject getPreviousVersion(ContentEntityObject ceo)
ContentEntityManagerVersioned.
Returns null for ContentEntityObject.DRAFTs.
getPreviousVersion in interface ContentEntityManager@Nullable public ContentEntityObject getNextVersion(ContentEntityObject ceo)
ContentEntityManagerVersioned.
Returns null for ContentEntityObject.DRAFTs.
getNextVersion in interface ContentEntityManager@Nullable public ContentEntityObject getOtherVersion(ContentEntityObject ceo, int version)
getOtherVersion in interface ContentEntityManager@Nonnull public List<VersionHistorySummary> getVersionHistorySummaries(ContentEntityObject ceo)
ContentEntityManagergetVersionHistorySummaries in interface ContentEntityManagerceo - the entity object to return the version history ofpublic Mail getMailById(long id)
MailContentManagergetMailById in interface MailContentManagerpublic Mail getMailByMessageId(String messageId)
MailContentManagergetMailByMessageId in interface MailContentManagerpublic List getMailsByMessageId(String messageId)
MailContentManagergetMailsByMessageId in interface MailContentManagermessageId - the message id of the mails to retrievepublic Mail storeIncomingMail(Space space, javax.mail.internet.MimeMessage mimeMessage)
MailContentManagerstoreIncomingMail in interface MailContentManagerspace - the space to attach the message tomimeMessage - the message that has been receivedpublic Mail storeIncomingMail(Space space, byte[] rawMessage)
MailContentManager
We use a byte array because RFC822 messages are streams of bytes - character encoding happens after the header is parsed
storeIncomingMail in interface MailContentManagerspace - the space to attach the message torawMessage - the message that has been receivedpublic void removeMail(Mail mail)
MailContentManagerremoveMail in interface MailContentManagermail - the mail to removepublic void removeAttachmentsForMail(Mail mail)
removeAttachmentsForMail in interface MailContentManagerpublic Iterator getSpaceMailIterator(String spaceKey)
getSpaceMailIterator in interface MailContentManagerpublic Iterator getSpaceMailWithAttachmentsIterator(String spaceKey)
getSpaceMailWithAttachmentsIterator in interface MailContentManagerpublic List getSpaceMail(int firstResult, int maxResults, String spaceKey)
getSpaceMail in interface MailContentManagerpublic int findMailTotal(Space space)
findMailTotal in interface MailContentManagerpublic List<Mail> getMail(Space space, boolean currentOnly)
getMail in interface MailContentManagerpublic boolean spaceHasMail(String spaceKey)
spaceHasMail in interface MailContentManagerpublic Mail getFirstMailAfter(String spaceKey, long mailId)
getFirstMailAfter in interface MailContentManagerpublic Mail getFirstMailBefore(String spaceKey, long mailId)
getFirstMailBefore in interface MailContentManagerpublic void removeAllMail(Space space)
removeAllMail in interface MailContentManagerpublic void removeHistoricalVersion(ContentEntityObject historicalVersion)
ContentEntityManagerremoveHistoricalVersion in interface ContentEntityManagerhistoricalVersion - a historical entity object to remove@Nonnull public Map<Long,ContentEntityObject> getVersionsLastEditedByUser(Collection<ContentId> contentIds, com.atlassian.sal.api.user.UserKey userKey)
ContentEntityManagerContentEntityObject objects relating to the version of the given contentIds that were last
edited by the given user. Only content with a "current" status are returned.getVersionsLastEditedByUser in interface ContentEntityManagercontentIds - the ids of the content we're interested in. These *must* be ids of the latest version.userKey - the userKey of the user that we're interested inContentEntityObject objects relating to the version of the given contentIds that were last
edited by the given user.public Map<Long,ContributionStatus> getContributionStatusByUser(Collection<ContentId> contentIds, com.atlassian.sal.api.user.UserKey userKey)
ContentEntityManagerContributionStatus for a content ID if the user has never contributed to the content.getContributionStatusByUser in interface ContentEntityManagercontentIds - the IDs of the content we want to query. These *must* be IDs of the latest versionuserKey - the userKey of the user who's changes we are interested inContributionStatus of each contentCopyright © 2003–2017 Atlassian. All rights reserved.