Package com.emc.vipr.client.system

Source Code of com.emc.vipr.client.system.Licensing

package com.emc.vipr.client.system;

import static com.emc.vipr.client.system.impl.PathConstants.LICENSE_URL;

import com.emc.vipr.client.impl.RestClient;
import com.emc.vipr.model.sys.licensing.License;

public class Licensing {
     
  private RestClient client;
 
  public Licensing(RestClient client) {
        this.client = client;
    }
 
    /**
     * Return the license file as individual xml elements and also includes the
     * full license text.
     * <p>
     * API Call: GET /license
     *
     * @return The license
     */
    public License get() {
    return client.get(License.class, LICENSE_URL);
    }
   
    /**
     * Add a license to the system.
     * <p>
     * API Call: POST /license
     *
     * @param licenseText The text for the license file to upload.
     */
    public void set(String licenseText) {
        License license = new License();
        license.setLicenseText(licenseText);
      client.post(String.class, license, LICENSE_URL);
    }
}
TOP

Related Classes of com.emc.vipr.client.system.Licensing

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.