tvaultapi/src/main/java/com/tmobile/cso/vault/api/controller/ControllerUtil.java
public static boolean areSafeAppRoleInputsValid(Map<String,Object> requestMap) {
		log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder().
				put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER)).
				put(LogMessage.ACTION,"areSafeAppRoleInputsValid").
				put(LogMessage.MESSAGE, "Start validating input parameters").
				put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL)).
				build()));
		if (MapUtils.isEmpty(requestMap)) {
			return false;
		}
		if (ObjectUtils.isEmpty(requestMap.get("role_name"))
				|| ObjectUtils.isEmpty(requestMap.get("path"))
				|| ObjectUtils.isEmpty(requestMap.get(ACCESSTR))
				) {
			return false;
		}
		String path = (String) requestMap.get("path");
		if (!isPathValid(path)) {
			return false;
		}
		String access = (String) requestMap.get(ACCESSTR);
		if (!ArrayUtils.contains(permissions, access)) {
			return false;
		}
		log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder().
				put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER)).
				put(LogMessage.ACTION,"areSafeAppRoleInputsValid").
				put(LogMessage.MESSAGE, "Input parameter validation completed").
				put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL)).
				build()));
		return true;
	}
/**
	 * Validates Safe User inputs for AppRole association
	 * @param requestMap
	 * @return
	 */
Validates Safe User inputs for AppRole association
@param requestMap
@return
Validates Safe User inputs for AppRole association @param requestMap @return
public static boolean areSafeAppRoleInputsValid(Map<String,Object> requestMap) {
		log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder().
				put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER)).
				put(LogMessage.ACTION,"areSafeAppRoleInputsValid").
				put(LogMessage.MESSAGE, "Start validating input parameters").
				put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL)).
				build()));
		if (MapUtils.isEmpty(requestMap)) {
			return false;
		}
		if (ObjectUtils.isEmpty(requestMap.get("role_name"))
				|| ObjectUtils.isEmpty(requestMap.get("path"))
				|| ObjectUtils.isEmpty(requestMap.get(ACCESSTR))
				) {
			return false;
		}
		String path = (String) requestMap.get("path");
		if (!isPathValid(path)) {
			return false;
		}
		String access = (String) requestMap.get(ACCESSTR);
		if (!ArrayUtils.contains(permissions, access)) {
			return false;
		}
		log.debug(JSONUtil.getJSON(ImmutableMap.<String, String>builder().
				put(LogMessage.USER, ThreadLocalContext.getCurrentMap().get(LogMessage.USER)).
				put(LogMessage.ACTION,"areSafeAppRoleInputsValid").
				put(LogMessage.MESSAGE, "Input parameter validation completed").
				put(LogMessage.APIURL, ThreadLocalContext.getCurrentMap().get(LogMessage.APIURL)).
				build()));
		return true;
	}
public static boolean areSafeAppRoleInputsValid ( Map < String , Object > requestMap ) { log . debug ( JSONUtil . getJSON ( ImmutableMap . < String , String > builder ( ) . put ( LogMessage . USER , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . USER ) ) . put ( LogMessage . ACTION , "areSafeAppRoleInputsValid" ) . put ( LogMessage . MESSAGE , "Start validating input parameters" ) . put ( LogMessage . APIURL , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . APIURL ) ) . build ( ) ) ) ; if ( MapUtils . isEmpty ( requestMap ) ) { return false ; } if ( ObjectUtils . isEmpty ( requestMap . get ( "role_name" ) ) || ObjectUtils . isEmpty ( requestMap . get ( "path" ) ) || ObjectUtils . isEmpty ( requestMap . get ( ACCESSTR ) ) ) { return false ; } String path = ( String ) requestMap . get ( "path" ) ; if ( ! isPathValid ( path ) ) { return false ; } String access = ( String ) requestMap . get ( ACCESSTR ) ; if ( ! ArrayUtils . contains ( permissions , access ) ) { return false ; } log . debug ( JSONUtil . getJSON ( ImmutableMap . < String , String > builder ( ) . put ( LogMessage . USER , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . USER ) ) . put ( LogMessage . ACTION , "areSafeAppRoleInputsValid" ) . put ( LogMessage . MESSAGE , "Input parameter validation completed" ) . put ( LogMessage . APIURL , ThreadLocalContext . getCurrentMap ( ) . get ( LogMessage . APIURL ) ) . build ( ) ) ) ; return true ; }
Validates Safe User inputs for AppRole association
 @param requestMap
 @return
Validates Safe User inputs for AppRole association @param requestMap @return