All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.ksu.canvas.interfaces.LoginWriter Maven / Gradle / Ivy

package edu.ksu.canvas.interfaces;

import java.io.IOException;
import java.util.Optional;

import edu.ksu.canvas.model.Login;
import edu.ksu.canvas.requestOptions.CreateLoginOptions;

public interface LoginWriter extends CanvasWriter {

    /**
     * Create a login in Canvas.
     * @param login The login to create. Must contain account ID.
     * @param options The options for the login creation
     * @return The created login object if create was successful
     * @throws IOException When there is an error communicating with Canvas
     */
    Optional createLogin(Login login, CreateLoginOptions options) throws IOException;

    /**
     * Write changes to a login to Canvas.
     * @param login The modified login to update. Must contain account ID and login ID.
     * @return The modified login object if update was successful
     * @throws IOException When there is an error communicating with Canvas
     */
    Optional updateLogin(Login login) throws IOException;

    /**
     * Delete a login from Canvas
     * @param login The login record to delete. Must contain User ID and login ID.
     * @return The now deleted login record
     * @throws IOException When there is an error communicating with Canvas
     */
    Optional deleteLogin(Login login) throws IOException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy