com.alogic.idnote.loader.XmlResourceLoader Maven / Gradle / Ivy
package com.alogic.idnote.loader;
import com.alogic.idnote.IdNote;
import com.alogic.idnote.IdNoteGroup;
import com.alogic.load.Loader;
/**
* XMLResource
* @author yyduan
* @since 1.6.12.13 [20181213 duanyy]
*/
public class XmlResourceLoader extends Loader.XmlResource implements IdNoteGroup{
@Override
protected String getObjectXmlTag() {
return "note";
}
@Override
protected String getObjectDftClass() {
return IdNote.Default.class.getName();
}
@Override
public String getNote(String id, String dft) {
IdNote note = getNote(id);
return note != null ? note.getNote() : dft;
}
@Override
public IdNote getNote(String id) {
return load(id, true);
}
}