EzSms

EzSms

SMS발신정보 관리 컴포넌트

Constructor

new EzSms()

Author:
  • 정민석(whitn86@gmail.com)

Members

action :string

Description:
  • 발신 등록시 사용할 Datasource 명칭

발신 등록시 사용할 Datasource 명칭

Type:
  • string
Example
var action = this.ezSms.action;
this.ezSms.action = "basic";

contents :string

Description:
  • 발신 내용

    • 발신내용 칼럼 명이 설정되어 있지 않은 경우, contents값의 내용이 모든 사용자에게 동일하게 발신됩니다.
    • 발신내용 칼럼 명이 설정되어 있을 경우, 치환기능을 사용하지 않는다면 contents값은 무시됩니다.
    • 치환기능을 사용 시, contents값이 사용자 별로 치환되어 해당 제목 칼럼 명으로 설정된 칼럼에 입력됩니다.

발신 내용

  • 발신내용 칼럼 명이 설정되어 있지 않은 경우, contents값의 내용이 모든 사용자에게 동일하게 발신됩니다.
  • 발신내용 칼럼 명이 설정되어 있을 경우, 치환기능을 사용하지 않는다면 contents값은 무시됩니다.
  • 치환기능을 사용 시, contents값이 사용자 별로 치환되어 해당 제목 칼럼 명으로 설정된 칼럼에 입력됩니다.
Type:
  • string
Example
var text = this.ezSms.contents;
this.ezSms.contents = "정기 결산 알림...";

contentsColumn :string

Description:
  • 내용 칼럼명

    • 내용 칼럼명을 설정할 경우 치환기능을 사용하지 않는다면 contents값은 무시됩니다.
    • 내용 칼럼명과 함께 치환기능을 사용 시 contents의 값이 치환되어 해당 칼럼에 입력됩니다.

내용 칼럼명

  • 내용 칼럼명을 설정할 경우 치환기능을 사용하지 않는다면 contents값은 무시됩니다.
  • 내용 칼럼명과 함께 치환기능을 사용 시 contents의 값이 치환되어 해당 칼럼에 입력됩니다.
Type:
  • string
Example
var colNm = this.ezSms.contentsColumn;
this.ezSms.contentsColumn = "CONTENTS";

encoding :string

Description:
  • 실제 Sms 문자 인코딩

    • 미설정시 기본값은 SMS 발신업체에 따라 다릅니다.
    • SMS 발신 업체에 따라 지원되지 않을 수 있습니다.

실제 Sms 문자 인코딩

  • 미설정시 기본값은 SMS 발신업체에 따라 다릅니다.
  • SMS 발신 업체에 따라 지원되지 않을 수 있습니다.
Type:
  • string
Example
var encoding = this.EzSms.encoding;
this.EzSms.encoding = "UTF-8";

messageOverflow :"cut"|"divide"|"modechange"

Description:
  • 메시지 길이 초과시 처리

    • cut : 자르기
    • divide : 분할해서 여러건,
    • modechange : lms 자동전환, lms 길이 초과시는 자르기

메시지 길이 초과시 처리

  • cut : 자르기
  • divide : 분할해서 여러건,
  • modechange : lms 자동전환, lms 길이 초과시는 자르기
Type:
  • "cut" | "divide" | "modechange"
Example
var option = this.ezSms.messageOverflow;
this.ezSms.messageOverflow = "divide"; 

outDataset :string

Description:
  • 발신 결과 수신용 데이터셋 명칭

    발신 결과 데이터셋에는 발신 요청성공 여부만 기록됩니다.
    요청 후 실제 발신 성공여부는 기록되지 않습니다.

    실제 데이터셋을 직접 설정하시려면 setOutDataset함수를 사용하세요 실제 설정된 데이터셋을 가져오시려면 getOutDataset함수를 사용하세요

발신 결과 수신용 데이터셋 명칭

발신 결과 데이터셋에는 발신 요청성공 여부만 기록됩니다.
요청 후 실제 발신 성공여부는 기록되지 않습니다.

실제 데이터셋을 직접 설정하시려면 setOutDataset함수를 사용하세요 실제 설정된 데이터셋을 가져오시려면 getOutDataset함수를 사용하세요

Type:
  • string
Example
var dsNm = this.ezSms.outDataset;
this.ezSms.outDataset = "ds_out";

popupOption :string

Description:
  • 팝업 호출 정보, 양식은 여기를 참조

    문자열 대신 Object로 설정에는 setPopupOption을 사용하세요

팝업 호출 정보, 양식은 여기를 참조

문자열 대신 Object로 설정에는 setPopupOption을 사용하세요

Type:
  • string
Example
var option = this.ezSms.popupOption;
this.ezSms.popupOption = '{ "id": "test", "url": "FORM::COMP/test.xfdl" }';

popupParam :string

Description:
  • 팝업 호출시 arg값(추가파라미터) 문자열 대신 Object로 값 설정 시 setPopupParam을 사용하세요

팝업 호출시 arg값(추가파라미터) 문자열 대신 Object로 값 설정 시 setPopupParam을 사용하세요

Type:
  • string
Example
var param = this.ezSms.popupParam;
this.ezSms.popupParam = '{ "code": "0001" }';

pushParam :string

Description:
  • 발신시 추가 파라미터
    Nexacro 파라미터 규칙에 따름

발신시 추가 파라미터
Nexacro 파라미터 규칙에 따름

Type:
  • string
Example
var param = this.ezSms.pushParam
this.ezSms.set_pushParam = "CD='0000' CD_NM='TEST'";

sendDateTime :string

Description:
  • 발신일시
    미입력시 즉시발신 처리함

발신일시
미입력시 즉시발신 처리함

Type:
  • string
Example
var dateStr = this.ezSms.sendDateTime;
this.ezSms.sendDateTime = "20200101"; 

sendMode :"sms"|"mms"|"push"|"pushandsms"

Description:
  • 발신 모드
    시스템에 따라 사용 가능한 모드가 상이할 수 있습니다.

발신 모드
시스템에 따라 사용 가능한 모드가 상이할 수 있습니다.

Type:
  • "sms" | "mms" | "push" | "pushandsms"
Example
var sendMode = this.ezSms.sendMode;
this.ezSms.sendMode = "CONTENTS";

senderId :string

Description:
  • 발신자 ID

발신자 ID

Type:
  • string
Example
var id = this.ezSms.ezSmssenderId;
this.ezSms.senderId = "cm01";

senderName :string

Description:
  • 발신자 명

발신자 명

Type:
  • string
Example
var name = this.ezSms.senderName;
this.ezSms.senderName = "이승갑";

senderTelNo :string

Description:
  • 발신자번호

발신자번호

Type:
  • string
Example
var telNo = this.ezSms.senderTelNo;
this.ezSms.senderTelNo = "010-0000-0000";

sqlId :string

Description:
  • 발신 등록시 사용할 SQL ID

발신 등록시 사용할 SQL ID

Type:
  • string
Example
var action = this.ezSms.sqlId;
this.ezSms.sqlId = "sms.p01";

substitution :boolean

Description:
  • 치환기능 사용여부

    • title, titleColumn property값이 모두 있을 경우 title의 내용을 치환해 titleColumn에 해당하는 칼럼에 입력됨
    • contents, contentsColumn property값이 모두 있을 경우 contents의 내용을 치환해 contentsColumn에 해당하는 칼럼에 입력됨

치환기능 사용여부

  • title, titleColumn property값이 모두 있을 경우 title의 내용을 치환해 titleColumn에 해당하는 칼럼에 입력됨
  • contents, contentsColumn property값이 모두 있을 경우 contents의 내용을 치환해 contentsColumn에 해당하는 칼럼에 입력됨
Type:
  • boolean
Example
var substitution = this.ezSms.substitution;
this.ezSms.substitution = true; 

title :string

Description:
  • 발신 제목

    • 제목 칼럼 명이 설정되어 있지 않은 경우, title값의 내용이 모든 사용자에게 동일하게 발신됩니다.
    • 제목 칼럼 명이 설정되어 있을 경우, 치환기능을 사용하지 않는다면 title값은 무시됩니다.
    • 치환기능을 사용 시, title값이 사용자 별로 치환되어 해당 제목 칼럼 명으로 설정된 칼럼에 입력됩니다.

발신 제목

  • 제목 칼럼 명이 설정되어 있지 않은 경우, title값의 내용이 모든 사용자에게 동일하게 발신됩니다.
  • 제목 칼럼 명이 설정되어 있을 경우, 치환기능을 사용하지 않는다면 title값은 무시됩니다.
  • 치환기능을 사용 시, title값이 사용자 별로 치환되어 해당 제목 칼럼 명으로 설정된 칼럼에 입력됩니다.
Type:
  • string
Example
var title = this.ezSms.title;
this.ezSms.title = "알려드립니다.";

Methods

getOutDataset() → {nexacro.Dataset}

Description:
  • 설정된 발신 결과 수신용 데이터셋을 가져옴

Example
var ds = this.ezSms.getOutDataset();
Returns:

발신 결과 수신용 데이터셋

Type
nexacro.Dataset
Description:
  • 현재 설정된 정보를 이용해 Sms 발신용 팝업을 호출합니다.

Example
this.ezSms.popup({ USER_ID:"사용자ID" }, this);
Parameters:
Name Type Attributes Description
columnMap Object <optional>

치환문자 정보 JSON
치환문자리스트에서 칼럼명 대신 표시할 정보, { 칼럼명: 표시명 } 형태

form Object <optional>

팝업 호출시 this값
미입력시, EzSms의 parent form이 사용됩니다.

push(formopt)

Description:
  • 현재 설정된 정보를 이용해 Sms발신등록을 처리합니다.

Example
this.ezSms.push(this);
Parameters:
Name Type Attributes Description
form Object <optional>

팝업 호출시 this값(미입력시, EzSms의 parent form)

setOutDataset(ds)

Description:
  • 발신 결과 수신용 데이터셋 설정

Example
this.ezSms.setOutDataset(this.ds_test);
Parameters:
Name Type Description
ds nexacro.Dataset

발신 결과 수신용 데이터셋

setPopupOption(popInfo)

Description:
  • 팝업 호출 정보 설정, 정보는 여기를 참조

Example
this.ezSms.setPopupOption({
	 id: "test",
  url: "FORM::COMP/test.xfdl",
});
Parameters:
Name Type Description
popInfo Object

팝업 호출 정보

setPopupParam()

Description:
  • 팝업 호출시 파라미터 값 설정

Example
this.ezSms.set_popupParam({
  code: "0001",
});

set_contents(contents)

Description:
  • 발신 내용 설정

    • 발신내용 칼럼 명이 설정되어 있지 않은 경우, contents값의 내용이 모든 사용자에게 동일하게 발신됩니다.
    • 발신내용 칼럼 명이 설정되어 있을 경우, 치환기능을 사용하지 않는다면 contents값은 무시됩니다.
    • 치환기능을 사용 시, contents값이 사용자 별로 치환되어 해당 제목 칼럼 명으로 설정된 칼럼에 입력됩니다.
Example
this.ezSms.set_contents("정기 결산 알림...");
Parameters:
Name Type Description
contents string

발신 내용

set_contentsColumn(contentsColumn)

Description:
  • 내용 칼럼명 설정

    • 내용 칼럼명을 설정할 경우 치환기능을 사용하지 않는다면 contents값은 무시됩니다.
    • 내용 칼럼명과 함께 치환기능을 사용 시 contents의 값이 치환되어 해당 칼럼에 입력됩니다.
Example
this.ezSms.set_contentsColumn("CONTENTS");
Parameters:
Name Type Description
contentsColumn string

내용 칼럼명

set_encoding(encoding)

Description:
  • 실제 SMS 문자 인코딩 설정

Example
this.esSms.set_encoding("UTF-8");
Parameters:
Name Type Description
encoding string

실제 SMS 문자 인코딩

set_messageOverflow(messageOverflow)

Description:
  • 메시지 길이 초과시 처리방법 설정

Example
this.ezSms.set_messageOverflow("divide"); 
Parameters:
Name Type Description
messageOverflow "cut" | "divide" | "modechange"

메시지 길이 초과시 처리

  • cut : 자르기
  • divide : 분할해서 여러건,
  • modechange : lms 자동전환, lms 길이 초과시는 자르기

set_popupOption(popupOption)

Description:
  • 팝업 호출 정보 설정

    문자열 대신 Object 사용시에는 setPopupOption을 사용하세요

Example
this.ezSms.set_popupOption('{ "id": "test", "url": "FORM::COMP/test.xfdl" }');
Parameters:
Name Type Description
popupOption string

팝업 호출 정보, 양식은 여기를 참조

set_popupParam(popupParam)

Description:
  • 팝업 호출시 arg값(추가파라미터) 설정
    문자열 대신 Object 사용시에는 setPopupParam을 사용하세요

Example
this.ezSms.set_popupParam('{ "code": "0001" }');
Parameters:
Name Type Description
popupParam string

팝업 호출시 arg값(추가파라미터)

set_pushParam(pushParam)

Description:
  • 발신시 추가 파라미터 설정

Example
this.ezSms.set_pushParam("CD='0000' CD_NM='TEST'");
Parameters:
Name Type Description
pushParam string

발신시 추가 파라미터
Nexacro 파라미터 규칙에 따름

set_sendDateTime(sendDateTime)

Description:
  • 발신일시 설정
    미입력시 즉시발신 처리함

Example
this.ezSms.set_sendDateTime("20200101"); 
Parameters:
Name Type Description
sendDateTime string

발신일시

set_sendMode(sendMode)

Description:
  • 발신 모드 설정

Example
this.ezSms.set_sendMode("CONTENTS");
Parameters:
Name Type Description
sendMode "sms" | "mms" | "push" | "pushandsms"

발신 모드
시스템에 따라 사용 가능한 모드가 상이할 수 있습니다.

set_senderId(senderId)

Description:
  • 발신자 ID 설정

Example
this.ezSms.set_senderId("cm01");
Parameters:
Name Type Description
senderId string

발신자 ID

set_senderName(senderName)

Description:
  • 발신자 명 설정

Example
this.ezSms.set_senderName("이승갑");
Parameters:
Name Type Description
senderName string

발신자 명

set_senderTelNo(senderTelNo)

Description:
  • 발신번호 설정

Example
this.ezSms.set_senderTelNo("010-0000-0000");
Parameters:
Name Type Description
senderTelNo string

발신번호

set_serverUrl(serverUrl)

Description:
  • SMS 발신 용 컨트롤러 호출 URL 설정

Example
this.ezSms.set_serverUrl("http://loacalhost:8080/sms/");
Parameters:
Name Type Description
serverUrl string

SMS 발신 용 컨트롤러 호출 URL
미설정시 tx.exec로 처리

set_sqlId(sqlId)

Description:
  • 발신 등록시 사용할 SQL ID 설정

Example
this.ezSms.set_sqlId("sms.p01");
Parameters:
Name Type Description
sqlId string

발신 등록시 사용할 SQL ID

set_substitution(substitution)

Description:
  • 치환기능 사용여부 설정

    • title, titleColumn property값이 모두 있을 경우 title의 내용을 치환해 titleColumn에 해당하는 칼럼에 입력됨
    • contents, contentsColumn property값이 모두 있을 경우 contents의 내용을 치환해 contentsColumn에 해당하는 칼럼에 입력됨
Example
this.ezSms.set_substitution(true); 
Parameters:
Name Type Description
substitution boolean

치환기능 사용여부

set_titleColumn()

Description:
  • 제목 칼럼명

    • 제목 칼럼명을 설정할 경우 치환기능을 사용하지 않는다면 title값은 무시됩니다.
    • 제목 칼럼명과 함께 치환기능을 사용 시 title의 값이 치환되어 해당 칼럼에 입력됩니다.
Example
this.ezSms.set_titleColumn("TITLE");