com.inrupt.client.accessgrant.AccessCredentialVerification Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of inrupt-client-accessgrant Show documentation
Show all versions of inrupt-client-accessgrant Show documentation
Access Grant support for the Inrupt Client Libraries.
/*
* Copyright Inrupt Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.inrupt.client.accessgrant;
import java.util.Collections;
import java.util.List;
/**
* The response from a verification operation.
* The response contains a list of performed checks, a list of errors and warning that might have occurred.
*
* @see Access Grant Service
*/
public class AccessCredentialVerification {
private List checks;
private List warnings;
private List errors;
/**
* Create an empty verification response.
*/
public AccessCredentialVerification() {
this.checks = Collections.emptyList();
this.warnings = Collections.emptyList();
this.errors = Collections.emptyList();
}
/**
* Create a verification response.
*
* @param checks the checks that were performed
* @param warnings any warnings from the verification operation
* @param errors any errors from the verification operation
*/
public AccessCredentialVerification(final List checks, final List warnings,
final List errors) {
this.checks = checks;
this.warnings = warnings;
this.errors = errors;
}
/**
* The verification checks that were performed.
*
* @return an unmodifiable list of any verification checks performed, never {@code null}
*/
public List getChecks() {
return checks;
}
/**
* The verification warnings that were discovered.
*
* @return an unmodifiable list of any verification warnings, never {@code null}
*/
public List getWarnings() {
return warnings;
}
/**
* The verification errors that were discovered.
*
* @return an unmodifiable list of any verification errors, never {@code null}
*/
public List getErrors() {
return errors;
}
/**
* Initialize the verification checks that were performed. This can only be called once, as the checks list is
* made unmodifiable.
*
* @param checks a list of any verification checks performed, never {@code null}
*/
public void setChecks(final List checks) {
this.checks = checks;
}
/**
* Initialize the verification warnings that were discovered. This can only be called once, as the warnings list is
* made unmodifiable.
* @param warnings a list of any verification warnings, never {@code null}
*/
public void setWarnings(final List warnings) {
this.warnings = warnings;
}
/**
* Initialize the verification errors that were discovered. This can only be called once, as the errors list is
* made unmodifiable.
* @param errors a list of any verification errors, never {@code null}
*/
public void setErrors(final List errors) {
this.errors = errors;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy