org.drools.grid.api.impl.ResourceDescriptorImpl Maven / Gradle / Ivy
/*
* Copyright 2012 JBoss by Red Hat.
*
* 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 org.drools.grid.api.impl;
import java.io.Serializable;
import java.net.URL;
import java.util.Date;
import java.util.Set;
import org.drools.builder.ResourceType;
import org.drools.grid.api.ResourceDescriptor;
/**
* Agnostic description of a Resource
*/
public class ResourceDescriptorImpl implements ResourceDescriptor, Serializable {
private ResourceType type;
private URL resourceURL;
private String version;
private String status;
private String name;
private String description;
private String id;
private URL documentation;
private Set categories;
private String author;
private Date creationTime;
private Date lastModificationTime;
private boolean loaded;
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public Set getCategories() {
return categories;
}
public void setCategories(Set categories) {
this.categories = categories;
}
public Date getCreationTime() {
return creationTime;
}
public void setCreationTime(Date creationTime) {
this.creationTime = creationTime;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public URL getDocumentation() {
return documentation;
}
public void setDocumentation(URL documentation) {
this.documentation = documentation;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Date getLastModificationTime() {
return lastModificationTime;
}
public void setLastModificationTime(Date lastModificationTime) {
this.lastModificationTime = lastModificationTime;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public URL getResourceURL() {
return resourceURL;
}
public void setResourceURL(URL resourceURL) {
this.resourceURL = resourceURL;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public ResourceType getType() {
return type;
}
public void setType( ResourceType type ) {
this.type = type;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public boolean isLoaded() {
return loaded;
}
public void setLoaded(boolean loaded) {
this.loaded = loaded;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final ResourceDescriptorImpl other = (ResourceDescriptorImpl) obj;
if ((this.id == null) ? (other.id != null) : !this.id.equals(other.id)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int hash = 7;
hash = 19 * hash + (this.id != null ? this.id.hashCode() : 0);
return hash;
}
public boolean isComposite() {
return false;
}
@Override
public String toString() {
return "ResourceDescriptorImpl{" +
"type=" + type +
", resourceURL=" + resourceURL +
", version='" + version + '\'' +
", status='" + status + '\'' +
", name='" + name + '\'' +
", description='" + description + '\'' +
", id='" + id + '\'' +
", documentation=" + documentation +
", categories=" + categories +
", author='" + author + '\'' +
", creationTime=" + creationTime +
", lastModificationTime=" + lastModificationTime +
", loaded=" + loaded +
'}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy