learning-api/orchestrator/src/main/java/org/sunbird/utils/RequestUtils.java
public static void restrictProperties(Request request) {
        String graphId = (String) request.getContext().get("graph_id");
        String version = (String) request.getContext().get("version");
        String objectType = (String) request.getContext().get("objectType");
        String schemaName = (String) request.getContext().get("schemaName");
        String operation = request.getOperation().toLowerCase().replace(objectType.toLowerCase(), "");
        List<String> restrictedProps = JavaConversions.seqAsJavaList(DefinitionNode.getRestrictedProperties(graphId, version, operation, schemaName));
        if (restrictedProps.stream().anyMatch(prop -> request.getRequest().containsKey(prop)))
            throw new ClientException("ERROR_RESTRICTED_PROP", "Properties in list " + restrictedProps + " are not allowed in request");
    }
/**
     * Method to restrict invalid properties sent in the request
     * @param request
     */
Method to restrict invalid properties sent in the request
@param request
Method to restrict invalid properties sent in the request @param request
public static void restrictProperties(Request request) {
        String graphId = (String) request.getContext().get("graph_id");
        String version = (String) request.getContext().get("version");
        String objectType = (String) request.getContext().get("objectType");
        String schemaName = (String) request.getContext().get("schemaName");
        String operation = request.getOperation().toLowerCase().replace(objectType.toLowerCase(), "");
        List<String> restrictedProps = JavaConversions.seqAsJavaList(DefinitionNode.getRestrictedProperties(graphId, version, operation, schemaName));
        if (restrictedProps.stream().anyMatch(prop -> request.getRequest().containsKey(prop)))
            throw new ClientException("ERROR_RESTRICTED_PROP", "Properties in list " + restrictedProps + " are not allowed in request");
    }
public static void restrictProperties ( Request request ) { String graphId = ( String ) request . getContext ( ) . get ( "graph_id" ) ; String version = ( String ) request . getContext ( ) . get ( "version" ) ; String objectType = ( String ) request . getContext ( ) . get ( "objectType" ) ; String schemaName = ( String ) request . getContext ( ) . get ( "schemaName" ) ; String operation = request . getOperation ( ) . toLowerCase ( ) . replace ( objectType . toLowerCase ( ) , "" ) ; List < String > restrictedProps = JavaConversions . seqAsJavaList ( DefinitionNode . getRestrictedProperties ( graphId , version , operation , schemaName ) ) ; if ( restrictedProps . stream ( ) . anyMatch ( prop -> request . getRequest ( ) . containsKey ( prop ) ) ) throw new ClientException ( "ERROR_RESTRICTED_PROP" , "Properties in list " + restrictedProps + " are not allowed in request" ) ; }
Method to restrict invalid properties sent in the request
 @param request
Method to restrict invalid properties sent in the request @param request