org.bdware.doip.audit.AuditRuleSetResponseStatus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of doip-audit-tool Show documentation
Show all versions of doip-audit-tool Show documentation
doip audit tool developed by bdware
The newest version!
package org.bdware.doip.audit;
/**
* It defines all the response state when an audit rule is set.
*/
public enum AuditRuleSetResponseStatus {
/**
* The status represents the set is susscessful.
*/
SUCCESS(0),
/**
* The status represents the set is rejected.
*/
FAILED(1),
/**
* Unknown error
*/
UNKNOWN(2);
/**
* The status code for a status.
*/
int code;
AuditRuleSetResponseStatus(int code) {
this.code = code;
}
/**
* Gets the status code for a status.
* @param auditRuleSetResponseStatus The target status.
* @return The status code for the target status
*/
int getCode(AuditRuleSetResponseStatus auditRuleSetResponseStatus) {
for (AuditRuleSetResponseStatus item : AuditRuleSetResponseStatus.values()) {
if (item == auditRuleSetResponseStatus) {
return item.code;
}
}
return UNKNOWN.code;
}
}