레거시 플랫폼

매쉬업

매시업은 서버에서 XAPI를 호출하고 UI 계층으로 데이터를 리턴하는 데 사용됩니다.

매시업 XML 정의

다음 코드 스니펫은 샘플 매시업 XML을 정의합니다.
<?xml version="1.0" encoding="UTF-8"?>
	<mashups>
		<mashup description="Mashup description"
			endpoint="<mashup_endpoint>" id="mashup_id" mashuptype="XAPI"
			skipDataProvider="false" transactional="true">
			<classInformation name="<java class name with full package>" />
			<API Name="<api_name>">
				<Input>
					<!-- APi input goes here-->
				</Input>
				<Template>
					<!-- APi output template goes here -->
				</Template>
			</API>
			<APINamespace inputNS="<input_namespace>" outputNS="<output_namespace>" />
			<AlternateResourceIds>
				<AlternateResourceId altResourceId="resource id" />
			</AlternateResourceIds>
		</mashup>
	</mashups>

보기 또는 화면 제어기에서 mashupRefs 정의

보기 제어기 또는 화면 제어기에서 mashupref를 정의하려면 다음 코드 스니펫을 참조하십시오.
"mashupRefs":[
	{
	mashupRefId: '<mashuprefid>',// local mashup name
	mashupId: '<mashupid>',// mashup id defined in the mashup xmls
	modelName: '<model_name>',// model to which output of mashup to be set
	isPaginated:<true/false>,// flag to indicate whether mashup is calling a paginated XAPI
	pageSize: <number>,// indicates the page size. Default value is 5, if not specified.
	append:<true/false>,// flag to indicate whether mashup output should be appended to existing data. 
     //This is used only if isPaginated is set true
	handler:'<handlerMethodName>',//method to be called for massaging the mashup output.				
       }
	]

뷰 컨트롤러에서 매시업 호출

매시업을 호출하려면 뷰 제어기에 MashupRefs 를 정의해야 합니다. iscMashup 서비스를 사용하여 매시업을 호출하십시오. 자세한 정보는 애플리케이션에서 사용 가능한 Javascript 문서를 참조하십시오.
  • iscMashup.callMashup(this, mashupRefId, mashupInput, options); 를 사용하여 단일 매시업을 호출하십시오. 예를 들면 다음과 같습니다.
    iscMashup.callMashup(this, "getOrderDetails",{"Order":{"OrderHeaderKey":"Order1"}},{})
    .then(this.handleSuccessMethod.bind(this),this.handleErrorMethod.bind(this));
  • iscMashup.callMashups(this,mashupRefObjList,options) 를 사용하여 단일 네트워크 호출에서 여러 매시업을 호출하십시오. 예를 들면 다음과 같습니다.
    var mashupRefList = [];
    mashupRefList.push(iscMashup.getMashupRefObj(this,"getOrderDetails",
    {"Order":{"OrderHeaderKey":"Order1"}}));
    mashupRefList.push(iscMashup.getMashupRefObj(this,"getCustomerDetails",
    {"Customer":{"CustomerKey":"Customer1"}}));
    iscMashup.callMashups(this,mashupRefList,{})
    .then(this.handleSuccessMethod.bind(this),this.handleErrorMethod.bind(this));
  • iscMashup.callPaginatedMashup(this, mashupRefId, inputData,pageAction, options) 를 사용하여 페이지 번호 매쉬업을 호출하십시오. 예를 들면 다음과 같습니다.
    iscMashup.callPaginatedMashup(this, "getOrderLineList",{"Order":{"OrderHeaderKey":"OrderNo1"}},
    "NEXT",{}) 
    .then(this.handleSuccessMethod.bind(this),this.handleErrorMethod.bind(this));

지시문 제어기에서 매시업 호출

지시문의 경우 mashupRef 오브젝트가 정의되지 않습니다. 따라서 mashuprefidmashupRefs 배열 없이 매시업을 직접 호출할 수 있습니다.

callSimpleMashup, callSimpleMashupscallSimplePaginatedMashup를 사용하십시오. 사용법 및 예제는 애플리케이션과 함께 사용 가능한 javascript 문서를 참조하십시오.

.

기존 매시업 정의 사용자 정의

기존 매시업 정의 XML을 다르게 또는 완전히 재설정할 수 있습니다. 자세한 내용은 다음을 참조하십시오
참고:
  • AngularJS-based 컴포넌트는 Extensibility Workbench를 사용하여 커스터마이징할 수 없습니다.
  • 증분 및 대체 매시업을 로드하기 위한 init 서블릿은 애플리케이션과 함께 제공되며 서블릿은 <wscwar>/extn/ngstore 폴더에서 XML 파일에 대해서만 스캔합니다.

    매시업 XML은 <EXTN_WORKSPACE>의 각 기능 폴더에 배치되어야 합니다. 매시업에 대한 파일 이름 지정 규칙은 다음과 같습니다.
    • <feature/folder_name>_mashups.xml: 모든 기능에 대한 기본 매시업 파일입니다.
    • <feature/folder_name>_incrementalmashups.xml: 파일에는 기존 매시업에 대한 모든 증분 변경사항이 포함되어야 합니다.
    • <feature/folder_name>_overridemashups.xml: 파일은 기존 매시업에 대해 재설정된 모든 변경사항을 포함해야 합니다.
  • 변경사항을 적용하려면 Application Server를 다시 시작해야 합니다.

사용자 정의 매시업 클래스를 사용자 정의에 추가

사용자 정의 매시업 클래스를 사용자 정의의 일부로 추가하려면 다음을 수행하십시오.
  1. 사용자 정의 매시업 클래스에 대한 JAR 파일을 작성하십시오.
  2. JAR 파일을 다음 디렉토리 중 하나에 복사하십시오.
    • 소스 제어 프로젝트의 files/repository/eardata/wsc/extn/WEB-INF/lib 디렉토리
    • 개발자 툴킷 런타임의 repository/eardata/wsc/extn/WEB-INF/lib 디렉토리

사용자 정의 빌드 및 배치에 대한 자세한 정보는 사용자 정의 빌드 및 배치를 참조하십시오.