/*
(non-Javadoc)
@see com.popbill.api.StatementService#updateEmailConfig(java.lang.String, java.lang.String, java.lang.Boolean)
551902
@Override
	public Response updateEmailConfig(String CorpNum, String EmailType, Boolean SendYN) throws PopbillException {
		return updateEmailConfig(CorpNum, EmailType, SendYN, null);
	}
1263898
@POST
  @Path("{id}/email")
  @RolesAllowed({"ROLE_ADMIN"})
  public Response changeEmail(@PathParam("id") Long userId, EmailRequest request) {
    checkNotNull(userId);
    checkEmailFormat(request.getEmail());

    boolean isSuccess = userService.changeEmailAddress(userId, request.getEmail());
    return isSuccess ? Response.noContent().build() : Response.status(Response.Status.BAD_REQUEST).build();
  }
53654
public OvhTask changeEmail_POST(String newEmail) throws IOException {
		String qPath = "/me/changeEmail";
		StringBuilder sb = path(qPath);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "newEmail", newEmail);
		String resp = exec(qPath, "POST", sb.toString(), o);
		return convertTo(resp, OvhTask.class);
	}
1226637
public void setMailTimeout(Integer timeout) throws SecurityException {
	checkWriteAccess();
	boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_MAIL);
	if (!hasAccess) throw new SecurityException("no access to update mail server settings");
	Element mail = _getRootElement("mail");
	mail.setAttribute("timeout", Caster.toString(timeout, ""));
	// config.setMailTimeout(timeout);
    }
1326557
@RequestMapping(value = "configurations/{name}/update", method = RequestMethod.PUT)
    public JenkinsConfiguration updateConfiguration(@PathVariable String name, @RequestBody JenkinsConfiguration configuration) {
        jenkinsService.updateConfiguration(name, configuration);
        return getConfiguration(name);
    }
1282892
public void updateProvider(ConsumerConfig config, String providerPath, ChildData data, List<ChildData> currentData)
        throws UnsupportedEncodingException {
        if (LOGGER.isInfoEnabled(config.getAppName())) {
            LOGGER.infoWithApp(config.getAppName(),
                "Receive update provider: path=[" + data.getPath() + "]" + ", data=[" +
                    StringSerializer.decode(data.getData()) + "]" + ", stat=[" + data.getStat() + "]" + ", list=[" +
                    currentData.size() + "]");
        }
        notifyListeners(config, providerPath, currentData, false);
    }
949398
public void set(final String name,
	                final String email,
	                final Map<String, Map<String, ConfigPropertyValue>> data,
	                final ConfigChangeMode changeMode,
	                final String message)
	{
		try
		{
			RepoHelper.write(repo, name, email, data, changeMode, message);
		}
		catch (Exception e)
		{
			try
			{
				RepoHelper.reset(repo);
			}
			catch (Exception ee)
			{
				throw new RuntimeException("Error writing updated repository, then could not reset work tree", e);
			}

			throw new RuntimeException("Error writing updated repository, work tree reset", e);
		}

		// Push the changes to the remote
		if (hasRemote)
		{
			try
			{
				RepoHelper.push(repo, "origin", credentials);
			}
			catch (Throwable t)
			{
				throw new RuntimeException("Saved changes to the local repository but push to remote failed!", t);
			}
		}
	}
1183206
@Override
	public void applyConfig(final ConfigSettings config)
	{
		Object o = config
				.getConfigParameter(ConfigurationKeys.VERIFICATION_DIFF);
		if (o != null) {
			controller.setEnableDiffVerification((Boolean) o);
		}
		else {
			controller.setEnableDiffVerification(false);
		}

		o = config.getConfigParameter(ConfigurationKeys.VERIFICATION_ENCODING);
		if (o != null) {
			controller.setEnableEncodingVerification((Boolean) o);
		}
		else {
			controller.setEnableEncodingVerification(false);
		}

		o = config
				.getConfigParameter(ConfigurationKeys.MODE_STATISTICAL_OUTPUT);
		if (o != null) {
			controller.setEnableStatsOutput((Boolean) o);
		}
		else {
			controller.setEnableStatsOutput(false);
		}

		o = config.getConfigParameter(ConfigurationKeys.LOGGING_PATH_DEBUG);
		if (o != null) {
			controller.setEnableDebugOutput(true);
			this.debugOutputField.setText((String) o);
		}
		else {
			controller.setEnableDebugOutput(false);
			this.debugOutputField.setText("");
		}
	}
1138611
private void doUpdateMailSetting() throws PageException {
	// admin.setMailLog(getString("admin",action,"logfile"),getString("loglevel","ERROR"));

	admin.setMailSpoolEnable(getBoolObject("admin", action, "spoolenable"));

	/*
	 * / spool interval String str=getString("admin",action,"maxThreads"); Integer i=null;
	 * if(!StringUtil.isEmpty(str))i=Caster.toInteger(maxThreads);
	 */

	// timeout
	String str = getString("admin", action, "timeout");
	Integer i = null;
	if (!StringUtil.isEmpty(str)) i = Caster.toInteger(str);
	admin.setMailTimeout(i);

	admin.setMailDefaultCharset(getString("admin", action, "defaultencoding"));
	store();
	adminSync.broadcast(attributes, config);
    }
735277
public UpdateResponse updateFlowConfig(FlowId flowId, FlowConfig flowConfig, boolean triggerListener) {
    log.info("[GAAS-REST] Update called with flowGroup {} flowName {}", flowId.getFlowGroup(), flowId.getFlowName());

    if (!flowId.getFlowGroup().equals(flowConfig.getId().getFlowGroup()) || !flowId.getFlowName().equals(flowConfig.getId().getFlowName())) {
      throw new FlowConfigLoggedException(HttpStatus.S_400_BAD_REQUEST,
          "flowName and flowGroup cannot be changed in update", null);
    }
    if (isUnscheduleRequest(flowConfig)) {
      // flow config is not changed if it is just a request to un-schedule
      FlowConfig originalFlowConfig = getFlowConfig(flowId);
      originalFlowConfig.setSchedule(NEVER_RUN_CRON_SCHEDULE);
      flowConfig = originalFlowConfig;
    }

    this.flowCatalog.put(createFlowSpecForConfig(flowConfig), triggerListener);
    return new UpdateResponse(HttpStatus.S_200_OK);
  }
806065
public void updateErrorTemplate(int statusCode, String template) throws SecurityException {
	checkWriteAccess();
	boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_DEBUGGING);
	if (!hasAccess) throw new SecurityException("no access to change error settings");

	Element error = _getRootElement("error");
	// if(template.trim().length()>0)
	error.setAttribute("template-" + statusCode, template);
    }
243615
public static void updateParameter(final HierarchicalConfiguration config, final String subKey, final String nameKey, final String valueKey,
		final Map<String, String> parameters) {
		for (HierarchicalConfiguration subConfig : config.configurationsAt(subKey)) {
			subConfig.clear();
		}
		String newNameKey = subKey + "(-1)." + nameKey;
		String newValueKey = subKey + '.' + valueKey;
		for (Map.Entry<String, String> parameter : parameters.entrySet()) {
			config.addProperty(newNameKey, parameter.getKey());
			config.addProperty(newValueKey, parameter.getValue());
		}
	}
1267658
@Override
    protected void updateHTTPResponseHandlerConfiguration(Map<String,String> configuration)
    {
        //get property part
        String propertyPart=this.getPropertyPart();

        //modify configuration
        configuration.put(MessageFormat.format(JSONHTTPResponseHandlerConfigurationConstants.SUBMIT_JSON_OUTPUT_PROPERTY_KEY.toString(),propertyPart),"txn_ref");
        configuration.put(MessageFormat.format(JSONHTTPResponseHandlerConfigurationConstants.ERROR_DETECTION_PATH_PROPERTY_KEY.toString(),propertyPart),"status");
        configuration.put(MessageFormat.format(JSONHTTPResponseHandlerConfigurationConstants.ERROR_DETECTION_VALUE_PROPERTY_KEY.toString(),propertyPart),"error_");
        configuration.put(MessageFormat.format(JSONHTTPResponseHandlerConfigurationConstants.GET_STATUS_JSON_OUTPUT_PROPERTY_KEY.toString(),propertyPart),"fax_status");
        configuration.put(MessageFormat.format(JSONHTTPResponseHandlerConfigurationConstants.IN_PROGRESS_STATUS_MAPPING_PROPERTY_KEY.toString(),propertyPart),"ongoing");
        configuration.put(MessageFormat.format(JSONHTTPResponseHandlerConfigurationConstants.ERROR_STATUS_MAPPING_PROPERTY_KEY.toString(),propertyPart),"unanswered;failed;busy");
    }
371563
@Override
    public Response update(String CorpNum, MgtKeyType KeyType, String MgtKey,
                           Taxinvoice taxinvoice) throws PopbillException {
        return update(CorpNum, KeyType, MgtKey, taxinvoice, null);

    }
949646
@Override
	public void applyConfig(final ConfigSettings config)
	{

		Object o = config
				.getConfigParameter(ConfigurationKeys.LOGGING_PATH_DIFFTOOL);
		if (o != null) {
			this.diffToolField.setText((String) o);
		}
		else {
			this.diffToolField.setText("");
		}

		o = config
				.getConfigParameter(ConfigurationKeys.LOGGING_LOGLEVEL_DIFFTOOL);
		if (o != null) {
			this.diffToolLogLevelComboBox.setSelectedItem(o);
		}

	}
241071
@Override
    public void update(AddressTemplate addressTemplate, List<Property> model) {
        switch (addressTemplate.getResourceType()) {
            case WebServicesStore.ENDPOINT_CONFIG:
                endpointConfigEditor.updateMaster(model);
                break;
            case WebServicesStore.CLIENT_CONFIG:
                clientConfigEditor.updateMaster(model);
                break;
        }
    }
338659
public final void update (final SettingsMap response) throws NoSuchSessionException {

        configuration.update(referenceSession.getTargetName(), connectionID, response);
    }