public void setFileName(String fileName) {
this.fileName = fileName;
}
public void addResource(Resource resource) {
DispatcherHelper dispatcherHelper = resource.getDispatcherHelper();
if (dispatcherHelper != null) {
String mapping = dispatcherHelper.getString();
for (Resource r : resources.values()) {
DispatcherHelper helper = r.getDispatcherHelper();
if (helper != null && helper.getString().equals(mapping) &&
resourceMatches(resource, r)) {
handleException("Two resources cannot have the same path mapping and methods");
}
}
} else {
for (Resource r : resources.values()) {
DispatcherHelper helper = r.getDispatcherHelper();
if (helper == null) {
handleException("Only one resource can be designated as default");
}
}
}