io.gravitee.repository.management.model.Application Maven / Gradle / Ivy
/**
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
*
* 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 io.gravitee.repository.management.model;
import java.util.Date;
import java.util.Objects;
import java.util.Set;
/**
* @author David BRASSELY (david.brassely at graviteesource.com)
* @author Nicolas GERAUD (nicolas.geraud at graviteesource.com)
* @author GraviteeSource Team
*/
public class Application {
public enum AuditEvent implements Audit.AuditEvent {
APPLICATION_CREATED, APPLICATION_UPDATED, APPLICATION_ARCHIVED
}
/**
* The application ID.
*/
private String id;
/**
* The application name
*/
private String name;
/**
* The application description
*/
private String description;
/**
* The application type.
*/
private String type;
/**
* The team creation date
*/
private Date createdAt;
/**
* The team last updated date
*/
private Date updatedAt;
/**
* the application group
*/
private Set groups;
private ApplicationStatus status;
/**
* The client_id.
*/
private String clientId;
public Application(){}
public Application(Application cloned) {
this.id = cloned.id;
this.name = cloned.name;
this.description = cloned.description;
this.type = cloned.type;
this.createdAt = cloned.createdAt;
this.updatedAt = cloned.updatedAt;
this.groups = cloned.groups;
this.status = cloned.status;
this.clientId = cloned.clientId;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Set getGroups() {
return groups;
}
public void setGroups(Set groups) {
this.groups = groups;
}
public ApplicationStatus getStatus() {
return status;
}
public void setStatus(ApplicationStatus status) {
this.status = status;
}
public String getClientId() {
return clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Application that = (Application) o;
return Objects.equals(id, that.id);
}
@Override
public int hashCode() {
return Objects.hash(id);
}
@Override
public String toString() {
return "Application{" +
"id='" + id + '\'' +
", name='" + name + '\'' +
", description='" + description + '\'' +
", type='" + type + '\'' +
", groups='" + groups + '\'' +
", status='" + status + '\'' +
", clientId='" + clientId + '\'' +
", createdAt=" + createdAt +
", updatedAt=" + updatedAt +
'}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy