tvaultapi/src/main/java/com/tmobile/cso/vault/api/controller/ControllerUtil.java
public static boolean areSDBInputsValidForUpdate(Map<String, Object> requestParams) {
		log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder().
				put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER).toString()).
				put(LogMessage.ACTION, "areSDBInputsValidForUpdate").
				put(LogMessage.MESSAGE, "Start validating input parameteres for safe updation").
				put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL).toString()).
				build()));
		LinkedHashMap<String, Object> map = (LinkedHashMap<String, Object>) requestParams.get("data");
		if (MapUtils.isEmpty(map)) {
			return false;
		}
		String sdbName = (String) map.get("name");
		String sdbOwner = (String) map.get("owner");
		String sdbDescription = (String) map.get("description");
		String sdbAppName = (String) map.get("appName");
		String path = (String) requestParams.get("path");
		if (StringUtils.isEmpty(sdbName) 
				|| StringUtils.isEmpty(sdbOwner) 
				|| StringUtils.isEmpty(sdbDescription) 
				|| StringUtils.isEmpty(path) 
				|| StringUtils.isEmpty(sdbAppName)
				) {
			return false;
		}
		if(sdbAppName != null ) {
			String applicationName=sdbAppName.trim();
			if(StringUtils.isEmpty(applicationName)) {
				return false;
			}
		}
		if (sdbName.length() > 40) {
			return false;
		}
		String safeName = getSafeName(path);
		if (!sdbName.equalsIgnoreCase(safeName)) {
			return false;
		}
		if (!EmailValidator.getInstance().isValid(sdbOwner)) {
			return false;
		}
		log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder().
				put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER).toString()).
				put(LogMessage.ACTION, "areSDBInputsValidForUpdate").
				put(LogMessage.MESSAGE,"Input parameter validation completed ").
				put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL).toString()).
				build()));
		return true;
	}
/**
	 * Validates inputs values required for SDB creation
	 * @param requestParams
	 * @return
	 */
Validates inputs values required for SDB creation
@param requestParams
@return
Validates inputs values required for SDB creation @param requestParams @return
public static boolean areSDBInputsValidForUpdate(Map<String, Object> requestParams) {
		log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder().
				put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER).toString()).
				put(LogMessage.ACTION, "areSDBInputsValidForUpdate").
				put(LogMessage.MESSAGE, "Start validating input parameteres for safe updation").
				put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL).toString()).
				build()));
		LinkedHashMap<String, Object> map = (LinkedHashMap<String, Object>) requestParams.get("data");
		if (MapUtils.isEmpty(map)) {
			return false;
		}
		String sdbName = (String) map.get("name");
		String sdbOwner = (String) map.get("owner");
		String sdbDescription = (String) map.get("description");
		String sdbAppName = (String) map.get("appName");
		String path = (String) requestParams.get("path");
		if (StringUtils.isEmpty(sdbName) 
				|| StringUtils.isEmpty(sdbOwner) 
				|| StringUtils.isEmpty(sdbDescription) 
				|| StringUtils.isEmpty(path) 
				|| StringUtils.isEmpty(sdbAppName)
				) {
			return false;
		}
		if(sdbAppName != null ) {
			String applicationName=sdbAppName.trim();
			if(StringUtils.isEmpty(applicationName)) {
				return false;
			}
		}
		if (sdbName.length() > 40) {
			return false;
		}
		String safeName = getSafeName(path);
		if (!sdbName.equalsIgnoreCase(safeName)) {
			return false;
		}
		if (!EmailValidator.getInstance().isValid(sdbOwner)) {
			return false;
		}
		log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder().
				put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER).toString()).
				put(LogMessage.ACTION, "areSDBInputsValidForUpdate").
				put(LogMessage.MESSAGE,"Input parameter validation completed ").
				put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL).toString()).
				build()));
		return true;
	}
public static boolean areSDBInputsValidForUpdate ( Map < String , Object > requestParams ) { log . debug ( JSONUtil . getJSON ( ImmutableMap . < String , String > builder ( ) . put ( LogMessage . USER , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . USER ) . toString ( ) ) . put ( LogMessage . ACTION , "areSDBInputsValidForUpdate" ) . put ( LogMessage . MESSAGE , "Start validating input parameteres for safe updation" ) . put ( LogMessage . APIURL , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . APIURL ) . toString ( ) ) . build ( ) ) ) ; LinkedHashMap < String , Object > map = ( LinkedHashMap < String , Object > ) requestParams . get ( "data" ) ; if ( MapUtils . isEmpty ( map ) ) { return false ; } String sdbName = ( String ) map . get ( "name" ) ; String sdbOwner = ( String ) map . get ( "owner" ) ; String sdbDescription = ( String ) map . get ( "description" ) ; String sdbAppName = ( String ) map . get ( "appName" ) ; String path = ( String ) requestParams . get ( "path" ) ; if ( StringUtils . isEmpty ( sdbName ) || StringUtils . isEmpty ( sdbOwner ) || StringUtils . isEmpty ( sdbDescription ) || StringUtils . isEmpty ( path ) || StringUtils . isEmpty ( sdbAppName ) ) { return false ; } if ( sdbAppName != null ) { String applicationName = sdbAppName . trim ( ) ; if ( StringUtils . isEmpty ( applicationName ) ) { return false ; } } if ( sdbName . length ( ) > 40 ) { return false ; } String safeName = getSafeName ( path ) ; if ( ! sdbName . equalsIgnoreCase ( safeName ) ) { return false ; } if ( ! EmailValidator . getInstance ( ) . isValid ( sdbOwner ) ) { return false ; } log . debug ( JSONUtil . getJSON ( ImmutableMap . < String , String > builder ( ) . put ( LogMessage . USER , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . USER ) . toString ( ) ) . put ( LogMessage . ACTION , "areSDBInputsValidForUpdate" ) . put ( LogMessage . MESSAGE , "Input parameter validation completed " ) . put ( LogMessage . APIURL , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . APIURL ) . toString ( ) ) . build ( ) ) ) ; return true ; }
Validates inputs values required for SDB creation
 @param requestParams
 @return
Validates inputs values required for SDB creation @param requestParams @return