com.identityx.clientSDK.queryHolders.AuthenticationRequestQueryHolder Maven / Gradle / Ivy
/*
* Copyright Daon.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.identityx.clientSDK.queryHolders;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.TimeZone;
import com.daon.identityx.rest.model.def.AuthenticationRequestStatusEnum;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.identityx.clientSDK.expandSpecs.AuthenticationRequestExpandSpecForList;
public class AuthenticationRequestQueryHolder extends QueryHolder {
public AuthenticationRequestQueryHolder() {
setSensitiveDataSpec(new SensitiveDataSpec());
}
public class AuthenticationRequestSearchSpec extends SearchSpec {
private AuthenticationRequestStatusEnum status;
private List statuses = null;
private String userId = null;
private String authenticationRequestId = null;
private String type = null;
private String start;
private String end;
private String tag;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId= userId;
}
public String getAuthenticationRequestId() {
return authenticationRequestId;
}
public void setAuthenticationRequestId(String authenticationRequestId) {
this.authenticationRequestId = authenticationRequestId;
}
public AuthenticationRequestStatusEnum getStatus() {
return status;
}
public void setStatus(AuthenticationRequestStatusEnum status) {
this.status = status;
}
public List getStatuses() {
return statuses;
}
public void setStatuses(List statuses) {
this.statuses = statuses;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@JsonIgnore
public Date getStartDate() throws ParseException {
return convertString(start);
}
@JsonIgnore
public void setStartDate(Date start) {
this.start = convertDate(start);
}
@JsonIgnore
public Date getEndDate() throws ParseException {
return convertString(end);
}
@JsonIgnore
public void setEndDate(Date end) {
this.end = convertDate(end);
}
public String getStart() {
return start;
}
public void setStart(String start) {
this.start = start;
}
public String getEnd() {
return end;
}
public void setEnd(String end) {
this.end = end;
}
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
protected String convertDate(Date date) {
TimeZone tz = TimeZone.getTimeZone("UTC");
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
df.setTimeZone(tz);
return df.format(date);
}
protected Date convertString(String date) throws ParseException {
TimeZone tz = TimeZone.getTimeZone("UTC");
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
df.setTimeZone(tz);
return df.parse(date);
}
}
private AuthenticationRequestSearchSpec searchSpec = new AuthenticationRequestSearchSpec();
private AuthenticationRequestExpandSpecForList expandSpec = new AuthenticationRequestExpandSpecForList();
@Override
public AuthenticationRequestExpandSpecForList getExpandSpec() {
return expandSpec;
}
@Override
public AuthenticationRequestSearchSpec getSearchSpec() {
return searchSpec;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy