|
|
|
@ -8,41 +8,41 @@ import cokr.xit.foundation.data.DataObject;
|
|
|
|
|
|
|
|
|
|
public abstract class PDFFormat {
|
|
|
|
|
|
|
|
|
|
protected List<DefaultOtptStng> prototypeStngs = new ArrayList<DefaultOtptStng>();
|
|
|
|
|
protected List<DefaultOtptArtclStng> prototypeStngs = new ArrayList<DefaultOtptArtclStng>();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 포맷원형을 반환한다.
|
|
|
|
|
*/
|
|
|
|
|
public List<DefaultOtptStng> getPrototypeStngs(){
|
|
|
|
|
public List<DefaultOtptArtclStng> getPrototypeStngs(){
|
|
|
|
|
return this.prototypeStngs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 포맷원형을 반환한다.
|
|
|
|
|
*/
|
|
|
|
|
public List<DefaultOtptStng> getPrototypeStngs(boolean unique){
|
|
|
|
|
public List<DefaultOtptArtclStng> getPrototypeStngs(boolean unique){
|
|
|
|
|
return this.prototypeStngs.stream().filter(item -> item.isUnique() == unique).toList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 텍스트 출력요소를 정의한다.
|
|
|
|
|
*/
|
|
|
|
|
public DefaultOtptStng text(String otptArtclNm, String dscrp, String otptBscVl){
|
|
|
|
|
return new DefaultOtptStng("text", otptArtclNm, dscrp, otptBscVl);
|
|
|
|
|
public DefaultOtptArtclStng text(String otptArtclNm, String dscrp, String otptBscVl){
|
|
|
|
|
return new DefaultOtptArtclStng("text", otptArtclNm, dscrp, otptBscVl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 이미지 출력요소 정의한다.
|
|
|
|
|
*/
|
|
|
|
|
public DefaultOtptStng image(String otptArtclNm, String dscrp, String otptBscVl){
|
|
|
|
|
return new DefaultOtptStng("image", otptArtclNm, dscrp, otptBscVl);
|
|
|
|
|
public DefaultOtptArtclStng image(String otptArtclNm, String dscrp, String otptBscVl){
|
|
|
|
|
return new DefaultOtptArtclStng("image", otptArtclNm, dscrp, otptBscVl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 포맷원형에 출력요소를 추가한다.
|
|
|
|
|
*/
|
|
|
|
|
public void add(DefaultOtptStng... prototypeStngs){
|
|
|
|
|
for(DefaultOtptStng prototypeStng : prototypeStngs) {
|
|
|
|
|
public void add(DefaultOtptArtclStng... prototypeStngs){
|
|
|
|
|
for(DefaultOtptArtclStng prototypeStng : prototypeStngs) {
|
|
|
|
|
this.prototypeStngs.add(prototypeStng);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -50,8 +50,8 @@ public abstract class PDFFormat {
|
|
|
|
|
/**
|
|
|
|
|
* 포맷원형에 우편물 출력요소를 추가한다.
|
|
|
|
|
*/
|
|
|
|
|
public void addForPost(DefaultOtptStng... prototypeStngs){
|
|
|
|
|
for(DefaultOtptStng prototypeStng : prototypeStngs) {
|
|
|
|
|
public void addForPost(DefaultOtptArtclStng... prototypeStngs){
|
|
|
|
|
for(DefaultOtptArtclStng prototypeStng : prototypeStngs) {
|
|
|
|
|
this.prototypeStngs.add(prototypeStng.post());
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
@ -71,19 +71,19 @@ public abstract class PDFFormat {
|
|
|
|
|
/**
|
|
|
|
|
* 시군구별 출력설정요소에 속성(요소 유형, 출력설명, 출력물 내 유일 요소 여부, 우편물 관련 요소 여부, 기본값)을 추가한다.
|
|
|
|
|
*/
|
|
|
|
|
public void appendOtptAttribute(List<DataObject> otptStngList) {
|
|
|
|
|
public void appendOtptAttribute(List<DataObject> otptArtclStngList) {
|
|
|
|
|
|
|
|
|
|
List<DefaultOtptStng> prototypeStngs = this.getPrototypeStngs();
|
|
|
|
|
List<DefaultOtptArtclStng> prototypeStngs = this.getPrototypeStngs();
|
|
|
|
|
|
|
|
|
|
for(DataObject otptStng : otptStngList) {
|
|
|
|
|
String otptArtclNm = (String) otptStng.get("OTPT_ARTCL_NM");
|
|
|
|
|
DefaultOtptStng prototypeStng = prototypeStngs.stream()
|
|
|
|
|
for(DataObject otptArtclStng : otptArtclStngList) {
|
|
|
|
|
String otptArtclNm = (String) otptArtclStng.get("OTPT_ARTCL_NM");
|
|
|
|
|
DefaultOtptArtclStng prototypeStng = prototypeStngs.stream()
|
|
|
|
|
.filter(item -> item.getOtptArtclNm().equals(otptArtclNm)).toList().get(0);
|
|
|
|
|
|
|
|
|
|
otptStng.set("UNIQUE_YN", prototypeStng.isUnique() ? "Y" : "N");
|
|
|
|
|
otptStng.set("DSCRP", prototypeStng.getDscrp());
|
|
|
|
|
otptStng.set("COMPONENT_TYPE", prototypeStng.getComponentType());
|
|
|
|
|
otptStng.set("POST_YN", prototypeStng.isForPost() ? "Y" : "N");
|
|
|
|
|
otptArtclStng.set("UNIQUE_YN", prototypeStng.isUnique() ? "Y" : "N");
|
|
|
|
|
otptArtclStng.set("DSCRP", prototypeStng.getDscrp());
|
|
|
|
|
otptArtclStng.set("COMPONENT_TYPE", prototypeStng.getComponentType());
|
|
|
|
|
otptArtclStng.set("POST_YN", prototypeStng.isForPost() ? "Y" : "N");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|