public static BoxLegalHoldPolicy.Info createOngoing(BoxAPIConnection api, String name, String description) {
        URL url = ALL_LEGAL_HOLD_URL_TEMPLATE.build(api.getBaseURL());
        BoxJSONRequest request = new BoxJSONRequest(api, url, "POST");
        JsonObject requestJSON = new JsonObject()
                .add("policy_name", name)
                .add("is_ongoing", true);
        if (description != null) {
            requestJSON.add("description", description);
        }
        request.setBody(requestJSON.toString());
        BoxJSONResponse response = (BoxJSONResponse) request.send();
        JsonObject responseJSON = JsonObject.readFrom(response.getJSON());
        BoxLegalHoldPolicy createdPolicy = new BoxLegalHoldPolicy(api, responseJSON.get("id").asString());
        return createdPolicy.new Info(responseJSON);
    }
public static BoxLegalHoldPolicy . Info createOngoing ( BoxAPIConnection api , String name , String description ) { URL url = ALL_LEGAL_HOLD_URL_TEMPLATE . build ( api . getBaseURL ( ) ) ; BoxJSONRequest request = new BoxJSONRequest ( api , url , "POST" ) ; JsonObject requestJSON = new JsonObject ( ) . add ( "policy_name" , name ) . add ( "is_ongoing" , true ) ; if ( description != null ) { requestJSON . add ( "description" , description ) ; } request . setBody ( requestJSON . toString ( ) ) ; BoxJSONResponse response = ( BoxJSONResponse ) request . send ( ) ; JsonObject responseJSON = JsonObject . readFrom ( response . getJSON ( ) ) ; BoxLegalHoldPolicy createdPolicy = new BoxLegalHoldPolicy ( api , responseJSON . get ( "id" ) . asString ( ) ) ; return createdPolicy . new Info ( responseJSON ) ; }
Creates a new ongoing Legal Hold Policy.
@param api               the API connection to be used by the resource.
@param name              the name of Legal Hold Policy.
@param description       the description of Legal Hold Policy.
@return                  information about the Legal Hold Policy created.