Ensurepass

 

QUESTION 31

Given the following code:

 

clip_image002

 

What will the alert(WL.Client.getUserPref(‘key1’)); show?

 

A.

The alert will not show since WL.Client.setUserPref cannot be called in the for loop since it is an asynchronous function.

B.

updatedValue1 since WL.Client.setUserPref({‘key1’ : ‘updatedValue1’}); will replace the value of key1 set in the for loop.

C.

value1, updatedValue1 or null since WL.Client.setUserPref is an asynchronous function and there is no guarantee which call, if any,will return first.

D.

value1 since WL.Client.setUserPref(‘key1’, ‘updatedValue1’); will fail because WL.Client.deleteUserPref(‘key1’) was notcalled before setting the new value.

 

Correct Answer: C

 

QUESTION 32

What namespace is used for the Worklight API?

 

A.

W

B.

WL

C.

Worklight

D.

WLite

 

Correct Answer: B

 

 

QUESTION 33

A Worklight mobile application needs to aggregate news about stock symbols in a portfolio using Worklight adapters and server-side JavaScript.

 

Given the following high-level schema for aggregation,

 

1.The application calls getPortfolioNews from the SQLPortfolioAdapter.

 

2.The SQLPortfolioAdapter retrieves a list of stock symbols in the portfolio from the adapter’s SQL datasource by calling getStockSymbolList.

 

a. For each of the stock symbols in the portfolio, The SQLPortfolioAdapter calls getStockNews from HTTPStockNewsAdapter with the stock symbol as parameter.

 

b. HTTPStockNewsAdapter retrieves news from the stock news HTTP API and returns it to SQLPortfolioAdapter.

 

3.SQLPortfolioAdapter returns portfolio news to the application.

 

Which procedure(s) must be declared in the SQLPortfolioAdapter.xml file?

 

A.

getPortfolioNews

B.

getPortfolioNews and getStockNews

C.

getPortfolioNews and getStockSymbolList

D.

getPortfolioNews, getStockSymbolList and getStockNews

 

Correct Answer: A

 

 

QUESTION 34

A banking company has deployed the Application Center for internal use. Before users can see the mobile client application in the list of available applications, which property of the mobile client application must be set to true?

 

A.

Label

B.

Package

C.

Installer

D.

Recommended

 

Correct Answer: C

 

 

 

QUESTION 35

A developer is debugging a form-based authentication and at a point the issue is narrowed down to the challengeHandler object. The following implementation describes the challenge handler:

 

clip_image004

 

What is the problem with this challenge handler?

 

A.

The user is not implementing the mandatory challenge handler functions submitFailure() and submitSuccess().

B.

The user credentials should be sent to the server using a secured protocol. The correct definition is:var reqURL = ‘https://myhost:80/worklight/j_security_check’;.

C.

The variable reqURL cannot include the hostname and port. The correct definition is:var reqURL = ‘/j_security_check’;.

D.

The function createChallengeHandler() is not properly invoked, it also takes the security test. The correct definition is:var cHandler = WL.Client.createChallengeHandler(‘test1’, ‘realm1’);.

 

Correct Answer: C

 

 

 

 

 

 

QUESTION 36

When should the Shell development approach be considered?

 

A.

There are only two developers

B.

The company wants to create a number of mobile applications sharing a common native code base and authentication mechanism

C.

The company wants to create a native iOS and Android application, but its resources are limited

D.

The company has distributed development teams situated on different continents that must share the source code

 

Correct Answer: B

 

 

QUESTION 37

What class must be extended to create a custom Java login module?

 

A.

com.worklight.Auth

B.

com.worklight.auth.ext.UserNamePasswordLoginModule

C.

com.worklight.auth.Login

D.

com.worklight.auth.api.UserIdentity

 

Correct Answer: D

 

 

QUESTION 38

How can SQL statements can be invoked?

 

A.

Only by using SQL statement query

B.

Only by using SQL stored procedure

C.

Only by having a separate file with SQL queries

D.

Both by using SQL statement query and SQL stored procedures

 

Correct Answer: D

 

 

QUESTION 39

Which SQL servers are supported by theWorklight SQL adapter?

 

A.

MySQL

B.

Oracle 11g

C.

DB2

D.

All of the above

 

Correct Answer: D

 

 

QUESTION 40

What is messages.js file used for?

 

A.

This file contains the texts of application pop-up prompts

B.

This file contains the texts of error messages that application may show

C.

This is an internal framework file. It is used to store system messages for debugging purposes

D.

This file contains strings that can be used for application elements

Correct Answer: D

 

Free VCE & PDF File for IBM C2180-279 Real Exam

Instant Access to Free VCE Files: CompTIA | VMware | SAP …
Instant Access to Free PDF Files: CompTIA | VMware | SAP …

Comments are closed.