Search in sources :

Example 1 with ReloadLocalConfigResponse

use of com.zimbra.soap.admin.message.ReloadLocalConfigResponse in project zm-mailbox by Zimbra.

the class ReloadLocalConfig method handle.

@Override
public Element handle(Element request, Map<String, Object> context) throws ServiceException {
    try {
        LC.reload();
    } catch (DocumentException e) {
        ZimbraLog.misc.error("Failed to reload LocalConfig", e);
        throw AdminServiceException.FAILURE("Failed to reload LocalConfig", e);
    } catch (ConfigException e) {
        ZimbraLog.misc.error("Failed to reload LocalConfig", e);
        throw AdminServiceException.FAILURE("Failed to reload LocalConfig", e);
    }
    ZimbraLog.misc.info("LocalConfig reloaded");
    reloadLCOnAllImapDaemons();
    ZimbraSoapContext zsc = getZimbraSoapContext(context);
    return zsc.jaxbToElement(new ReloadLocalConfigResponse());
}
Also used : ReloadLocalConfigResponse(com.zimbra.soap.admin.message.ReloadLocalConfigResponse) ZimbraSoapContext(com.zimbra.soap.ZimbraSoapContext) DocumentException(org.dom4j.DocumentException) ConfigException(com.zimbra.common.localconfig.ConfigException)

Example 2 with ReloadLocalConfigResponse

use of com.zimbra.soap.admin.message.ReloadLocalConfigResponse in project zm-mailbox by Zimbra.

the class TestUtil method setLCValue.

protected static void setLCValue(KnownKey key, String newValue) throws DocumentException, ConfigException, IOException, ServiceException {
    LocalConfig lc = new LocalConfig(null);
    if (newValue == null) {
        lc.remove(key.key());
    } else {
        lc.set(key.key(), newValue);
    }
    lc.save();
    SoapProvisioning prov = TestUtil.newSoapProvisioning();
    ReloadLocalConfigRequest req = new ReloadLocalConfigRequest();
    ReloadLocalConfigResponse resp = prov.invokeJaxb(req);
    assertNotNull("ReloadLocalConfigResponse", resp);
}
Also used : ReloadLocalConfigResponse(com.zimbra.soap.admin.message.ReloadLocalConfigResponse) SoapProvisioning(com.zimbra.cs.account.soap.SoapProvisioning) LocalConfig(com.zimbra.common.localconfig.LocalConfig) ReloadLocalConfigRequest(com.zimbra.soap.admin.message.ReloadLocalConfigRequest)

Example 3 with ReloadLocalConfigResponse

use of com.zimbra.soap.admin.message.ReloadLocalConfigResponse in project zm-mailbox by Zimbra.

the class SoapTest method modifyLocalconfigAndReload.

static void modifyLocalconfigAndReload(SoapTransport transport, KnownKey key, String value) throws Exception {
    LocalconfigTestUtil.modifyLocalConfig(key, value);
    // reload LC on server
    ReloadLocalConfigRequest req = new ReloadLocalConfigRequest();
    ReloadLocalConfigResponse resp = invokeJaxb(transport, req);
}
Also used : ReloadLocalConfigResponse(com.zimbra.soap.admin.message.ReloadLocalConfigResponse) ReloadLocalConfigRequest(com.zimbra.soap.admin.message.ReloadLocalConfigRequest)

Aggregations

ReloadLocalConfigResponse (com.zimbra.soap.admin.message.ReloadLocalConfigResponse)3 ReloadLocalConfigRequest (com.zimbra.soap.admin.message.ReloadLocalConfigRequest)2 ConfigException (com.zimbra.common.localconfig.ConfigException)1 LocalConfig (com.zimbra.common.localconfig.LocalConfig)1 SoapProvisioning (com.zimbra.cs.account.soap.SoapProvisioning)1 ZimbraSoapContext (com.zimbra.soap.ZimbraSoapContext)1 DocumentException (org.dom4j.DocumentException)1