Search in sources :

Example 1 with RenameMailbox

use of com.zimbra.cs.redolog.op.RenameMailbox in project zm-mailbox by Zimbra.

the class Mailbox method renameMailbox.

public void renameMailbox(OperationContext octxt, String oldName, String newName) throws ServiceException {
    if (Strings.isNullOrEmpty(newName)) {
        throw ServiceException.INVALID_REQUEST("Cannot rename mailbox to empty name", null);
    }
    RenameMailbox redoRecorder = new RenameMailbox(mId, oldName, newName);
    boolean success = false;
    try {
        beginTransaction("renameMailbox", octxt, redoRecorder);
        DbMailbox.renameMailbox(this, newName);
        success = true;
    } finally {
        endTransaction(success);
    }
}
Also used : RenameMailbox(com.zimbra.cs.redolog.op.RenameMailbox)

Aggregations

RenameMailbox (com.zimbra.cs.redolog.op.RenameMailbox)1