public class MailboxesService extends java.lang.Object implements IMailboxes, IInCoreMailboxes
Modifier and Type | Class and Description |
---|---|
static class |
MailboxesService.Helper |
Constructor and Description |
---|
MailboxesService(BmContext context,
Container container,
ItemValue<Domain> domain) |
Modifier and Type | Method and Description |
---|---|
ItemValue<Mailbox> |
byEmail(java.lang.String email) |
ItemValue<Mailbox> |
byName(java.lang.String name) |
java.util.List<java.lang.String> |
byRouting(Mailbox.Routing routing) |
java.util.List<java.lang.String> |
byType(Mailbox.Type type) |
TaskRef |
check(java.lang.String uid)
|
TaskRef |
checkAll()
|
TaskRef |
checkAndRepair(java.lang.String uid)
|
TaskRef |
checkAndRepairAll()
|
void |
checkAndRepairAllTask(IServerTaskMonitor monitor)
Deprecated.
|
void |
checkAndRepairTask(java.lang.String uid,
DiagnosticReport report,
IServerTaskMonitor monitor,
boolean repair)
Deprecated.
|
void |
checkAndRepairTask(java.lang.String uid,
IServerTaskMonitor monitor)
Deprecated.
|
void |
checkAvailabilty(Mailbox mailbox) |
void |
create(java.lang.String uid,
Mailbox value)
Creates a new
Mailbox entry. |
void |
created(java.lang.String uid,
Mailbox mailbox) |
void |
delete(java.lang.String uid)
Delete
Mailbox entry |
void |
deleted(java.lang.String uid,
Mailbox mailbox) |
void |
deleteEmailByAlias(java.lang.String alias) |
ItemValue<Mailbox> |
getComplete(java.lang.String uid)
Fetch a
Mailbox from its unique uid |
MailFilter |
getDomainFilter() |
java.util.List<AccessControlEntry> |
getMailboxAccessControlList(java.lang.String mailboxUid) |
MailboxConfig |
getMailboxConfig(java.lang.String uid) |
MailFilter |
getMailboxFilter(java.lang.String mailboxUid) |
MailboxQuota |
getMailboxQuota(java.lang.String uid) |
java.lang.Integer |
getUnreadMessagesCount()
Get the unread mail messages count of the currently logged in user
|
java.util.List<ItemValue<Mailbox>> |
list() |
java.util.List<java.lang.String> |
listUids() |
java.util.List<ItemValue<Mailbox>> |
multipleGet(java.util.List<java.lang.String> uids) |
JobExitStatus |
refreshOutOfOffice(IScheduler sched,
IScheduledJobRunId rid)
Enable/disable out of office sieve script
|
void |
sanitize(Mailbox mailbox) |
void |
setDomainFilter(MailFilter filter) |
void |
setMailboxAccessControlList(java.lang.String mailboxUid,
java.util.List<AccessControlEntry> accessControlEntries) |
void |
setMailboxFilter(java.lang.String mailboxUid,
MailFilter filter) |
void |
update(java.lang.String uid,
Mailbox value)
Modifies an existing
Mailbox entry. |
void |
updated(java.lang.String uid,
Mailbox previous,
Mailbox value) |
void |
validate(java.lang.String uid,
Mailbox mailbox) |
public void create(java.lang.String uid, Mailbox value) throws ServerFault
IMailboxes
Mailbox
entry.create
in interface IMailboxes
uid
- uid of the entryvalue
- value of the entryServerFault
public void update(java.lang.String uid, Mailbox value) throws ServerFault
IMailboxes
Mailbox
entry.update
in interface IMailboxes
uid
- uid of the entryvalue
- value of the entryServerFault
public ItemValue<Mailbox> getComplete(java.lang.String uid) throws ServerFault
IMailboxes
Mailbox
from its unique uidgetComplete
in interface IMailboxes
ItemValue
ServerFault
public void delete(java.lang.String uid) throws ServerFault
IMailboxes
Mailbox
entrydelete
in interface IMailboxes
ServerFault
public ItemValue<Mailbox> byEmail(java.lang.String email) throws ServerFault
byEmail
in interface IMailboxes
ServerFault
public java.util.List<java.lang.String> byType(Mailbox.Type type) throws ServerFault
byType
in interface IMailboxes
ServerFault
public ItemValue<Mailbox> byName(java.lang.String name) throws ServerFault
byName
in interface IMailboxes
ServerFault
public MailFilter getDomainFilter() throws ServerFault
getDomainFilter
in interface IMailboxes
ServerFault
public void setDomainFilter(MailFilter filter) throws ServerFault
setDomainFilter
in interface IMailboxes
ServerFault
public MailFilter getMailboxFilter(java.lang.String mailboxUid) throws ServerFault
getMailboxFilter
in interface IMailboxes
ServerFault
public void setMailboxFilter(java.lang.String mailboxUid, MailFilter filter) throws ServerFault
setMailboxFilter
in interface IMailboxes
ServerFault
public java.util.List<AccessControlEntry> getMailboxAccessControlList(java.lang.String mailboxUid) throws ServerFault
getMailboxAccessControlList
in interface IMailboxes
ServerFault
public void setMailboxAccessControlList(java.lang.String mailboxUid, java.util.List<AccessControlEntry> accessControlEntries) throws ServerFault
setMailboxAccessControlList
in interface IMailboxes
ServerFault
public java.lang.Integer getUnreadMessagesCount() throws ServerFault
IMailboxes
getUnreadMessagesCount
in interface IMailboxes
ServerFault
public java.util.List<ItemValue<Mailbox>> list() throws ServerFault
list
in interface IMailboxes
ServerFault
public java.util.List<java.lang.String> listUids()
listUids
in interface IMailboxes
public java.util.List<java.lang.String> byRouting(Mailbox.Routing routing) throws ServerFault
byRouting
in interface IMailboxes
ServerFault
public TaskRef checkAndRepairAll() throws ServerFault
IMailboxes
IDirEntryMaintenance.repair(Set)
Set<String>
opsIds = IDirEntryMaintenance.getAvailableOperations()
.stream().map(mo -> mo.identifier)
.collect(Collectors.toSet());
for (String entryUid: IDirectory.search(
DirEntryQuery.filterKind(Kind.GROUP, Kind.MAILSHARE, Kind.RESOURCE, Kind.USER))
.values.stream()
.map(deiv -> deiv.uid)
.collect()Collectors.toSet()) {
IDirEntryMaintenance.repair(opsIds);
}
checkAndRepairAll
in interface IMailboxes
ServerFault
public TaskRef checkAll() throws ServerFault
IMailboxes
IDirEntryMaintenance.check(Set)
Set<String>
opsIds = IDirEntryMaintenance.getAvailableOperations()
.stream().map(mo -> mo.identifier)
.collect(Collectors.toSet());
for (String entryUid: IDirectory.search(
DirEntryQuery.filterKind(Kind.GROUP, Kind.MAILSHARE, Kind.RESOURCE, Kind.USER))
.values.stream()
.map(deiv -> deiv.uid)
.collect()Collectors.toSet()) {
IDirEntryMaintenance.check(opsIds);
}
checkAll
in interface IMailboxes
ServerFault
public TaskRef checkAndRepair(java.lang.String uid) throws ServerFault
IMailboxes
IDirEntryMaintenance.repair(Set)
Set<String>
opsIds = IDirEntryMaintenance.getAvailableOperations()
.stream().map(mo -> mo.identifier)
.collect(Collectors.toSet());
IDirEntryMaintenance.repair(opsIds);
checkAndRepair
in interface IMailboxes
ServerFault
public TaskRef check(java.lang.String uid) throws ServerFault
IMailboxes
IDirEntryMaintenance.check(Set)
Set<String>
opsIds = IDirEntryMaintenance.getAvailableOperations()
.stream().map(mo -> mo.identifier)
.collect(Collectors.toSet());
IDirEntryMaintenance.check(opsIds);
check
in interface IMailboxes
ServerFault
@Deprecated public void checkAndRepairAllTask(IServerTaskMonitor monitor) throws ServerFault
IDirEntryMaintenance.repair(Set)
Set<String>
opsIds = IDirEntryMaintenance.getAvailableOperations()
.stream().map(mo -> mo.identifier)
.collect(Collectors.toSet());
for (String entryUid: IDirectory.search(
DirEntryQuery.filterKind(Kind.GROUP, Kind.MAILSHARE, Kind.RESOURCE, Kind.USER))
.values.stream()
.map(deiv -> deiv.uid)
.collect()Collectors.toSet()) {
IDirEntryMaintenance.repair(opsIds);
}
checkAndRepairAllTask
in interface IInCoreMailboxes
ServerFault
@Deprecated public void checkAndRepairTask(java.lang.String uid, IServerTaskMonitor monitor) throws ServerFault
IDirEntryMaintenance.repair(Set)
Set<String>
opsIds = IDirEntryMaintenance.getAvailableOperations()
.stream().map(mo -> mo.identifier)
.collect(Collectors.toSet());
IDirEntryMaintenance.repair(opsIds);
checkAndRepairTask
in interface IInCoreMailboxes
ServerFault
@Deprecated public void checkAndRepairTask(java.lang.String uid, DiagnosticReport report, IServerTaskMonitor monitor, boolean repair) throws ServerFault
repair
, use IDirEntryMaintenance.check(Set)
If
repair
, use IDirEntryMaintenance.repair(Set)
Set<String>
opsIds = IDirEntryMaintenance.getAvailableOperations()
.stream().map(mo -> mo.identifier)
.collect(Collectors.toSet());
if (repair) {
IDirEntryMaintenance.repair(opsIds);
} else {
IDirEntryMaintenance.check(opsIds);
}
checkAndRepairTask
in interface IInCoreMailboxes
ServerFault
public void checkAvailabilty(Mailbox mailbox) throws ServerFault
checkAvailabilty
in interface IInCoreMailboxes
ServerFault
public MailboxQuota getMailboxQuota(java.lang.String uid) throws ServerFault
getMailboxQuota
in interface IMailboxes
ServerFault
public MailboxConfig getMailboxConfig(java.lang.String uid) throws ServerFault
getMailboxConfig
in interface IMailboxes
ServerFault
public JobExitStatus refreshOutOfOffice(IScheduler sched, IScheduledJobRunId rid) throws ServerFault
IInCoreMailboxes
refreshOutOfOffice
in interface IInCoreMailboxes
ServerFault
public void validate(java.lang.String uid, Mailbox mailbox) throws ServerFault
validate
in interface IInCoreMailboxes
ServerFault
public void sanitize(Mailbox mailbox) throws ServerFault
sanitize
in interface IInCoreMailboxes
ServerFault
public void created(java.lang.String uid, Mailbox mailbox) throws ServerFault
created
in interface IInCoreMailboxes
ServerFault
public void updated(java.lang.String uid, Mailbox previous, Mailbox value) throws ServerFault
updated
in interface IInCoreMailboxes
ServerFault
public void deleted(java.lang.String uid, Mailbox mailbox) throws ServerFault
deleted
in interface IInCoreMailboxes
ServerFault
public java.util.List<ItemValue<Mailbox>> multipleGet(java.util.List<java.lang.String> uids) throws ServerFault
multipleGet
in interface IMailboxes
ServerFault
public void deleteEmailByAlias(java.lang.String alias) throws ServerFault
deleteEmailByAlias
in interface IInCoreMailboxes
ServerFault
Copyright © 2021. All Rights Reserved.