![JAR search and dependency download from the Maven repository](/logo.png)
smartrics.rest.test.fitnesse.fixture.Resource Maven / Gradle / Ivy
/* Copyright 2015 Andrew Ochsner and Fabrizio Cannizzo
*
* This file is part of RestFixture.
*
* RestFixture (http://code.google.com/p/rest-fixture/) is free software:
* you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
*
* RestFixture is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with RestFixture. If not, see .
*
* If you want to contact the author please leave a comment here
* http://smartrics.blogspot.com/2008/08/get-fitnesse-with-some-rest.html
*/
package smartrics.rest.test.fitnesse.fixture;
/**
* A sample rest resource.
*
* @author smartrics
*
*/
public class Resource {
private String payload;
private String id;
private boolean deleted;
public Resource(String id, String payload) {
this.payload = payload;
this.id = id;
}
public Resource(String xmlContent) {
this(null, xmlContent);
}
public void setPayload(String payload) {
this.payload = payload;
}
public String getPayload() {
return payload;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public boolean isDeleted() {
return deleted;
}
public void setDeleted(boolean deleted) {
this.deleted = deleted;
}
@Override
public String toString() {
if (getPayload() == null) {
return "";
}
return getPayload();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy