Hershel wants to programmatically check if specific users have access to his company's new portlet application, in order to show a message in another portlet asking them to purchase a subscription. He is trying to do so with the least amount of performance overhead. What would be the best way for Hershel to accomplish this?
A. He should use the com.ibm.portal.ac.RoleData interface to verify explicit role assignments.
B. He should use the com.ibm.portal.ac.UserRoles interface to verify explicit role assignments.
C. He should read role assignments using the com.ibm.portal.ac.RoleData interface and ensure portlet caching is enabled.
D. He should use AccessControlRuntimeModel or AccessControlGlobalRuntimeModel to verify explicit role assignments.
The following code sample uses the PUMA SPI within a standard portlet.
Sunil needs to retrieve attributes on the current user. Which one of the following lines of code, if inserted at line 6, will provide the functions to retrieve attributes from the User object?
A. PumaProfile p = service.getProfile( (javax.portlet.ActionRequest) request);
B. PumaProfile p = service.getProfile( (javax.portlet.PortletRequest) request);
C. PumaController p = service getController( (javax.portlet.ActionRequest) request);
D. PumaController p = service getController( (javax.portlet.PortletRequest) request);
Which of the following statements is not a true statement about the Portlet Login service?
A. The login service can be used to trigger a form-based login to IBM WebSphere Portal from any portlet.
B. The login service can be used to retrieve a com.ibm.portal.um.User object representing the current user and providing the current user'sprofile attributes.
C. The login service can be used to propagate information to the WebSphere Portal login, for example, in the javax.security.auth.Subject objectpassed on to the JAAS login.
D. The login service can be used to change the default behavior in reaction to particular errors that might occur during the login, such asredirecting the user to a change password page if the user's password is expired.
Which of the following statements regarding the Controller model is false?
A. A developer must commit the controller to persist the modifications.
B. A developer can only modify one resource per controller before committing the modifications.
C. The Controller model enhances the read-only portal model SPI by adding writable aspects.
D. The Content Model Controller allows a developer to modify the content topology and the properties of content nodes, such as pages, labels,and content URLs.
What does the collaborative services API allow the portlet developer to do?
A. The API gives the user access to Microsoft Exchange and IBM Lotus Notes inboxes when developing custom portlets.
B. The API allows the user to connect to social services such as Twitter and Facebook for custom portlets.
C. The API provides person tags to custom portlets.
D. The API provides the IBM Connections business cards capability to a custom portlet.
Evan needs to share action URL parameters used in a portlet with another portlet. In the binding section of the WSDL files used for specifying a portlet's participation with the property broker, an action URL parameter can be bound to several scopes. Which one of the following options best describes the scopes that Evan can use to share the action URL parameters using the property broker?
A. Page attribute, Request attribute, Request parameter, Session attribute
B. Request attribute, Request parameter, or Session attribute
C. Request parameter or Session attribute
D. Session attribute only
When creating and registering a custom portlet service, it is possible to set initialization parameters. What code would Adrienne use to access a parameter with the name sample.portletservice.HelloServiceImpl2.message?
A. public void init(Preferences servicePreferences) { String message = servicePreferences.get("message", "Hello"); }
B. public void sayHello(RenderRequest request, RenderResponse response) { String message = request.getAttribute("message"); }
C. public void init(Preferences servicePreferences) { String message = servicePreferences.getInitParam("message", "Hello"); }
D. public void sayHello(RenderRequest request, RenderResponse response) { String message = request.getParameter("message"); }
The following code sample is an excerpt from an implementation of a custom ExplicitLoginFilter.
Evan needs to implement custom logic to check whether the user needs to accept an updated user agreement. Which one of the following lines of code allows the user to be sent the friendly IBM WebSphere Portal URL 'acceptAgreement,' if the checkUser method returns true?
A. resp.sendRedirect("/wps/myportal/acceptAgreement");
B. portalLoginContext.setRedirectURL("/wps/myportal/acceptAgreement");
C. RequestDispatcher rd = req.getRequestDispatcher("/wps/myportal/acceptAgreement"); rd.forward(req, resp);
D. RequestDispatcher rd = req.getRequestDispatcher("/wps/myportal/acceptAgreement"); rd.include(req, resp);
The XYZ company has a custom portlet that provides access to data from the company's mainframe. Twice a day, the mainframe performs a batch process to update the data. During the batch process, the portlet cannot access the data. Which one of the following options allows Sara to hide the portlet during the batch processing times?
A. Use the Policy editor to create a portlet availability policy, then use the Page Layout editor to assign the policy to the portlet.
B. Use the Policy editor to create a portlet availability policy and to assign the policy to the portlet.
C. Use the Personalization editor to create a portlet visibility rule, then use the Page Layout editor to assign the rule to the portlet.
D. Use the Personalization editor to create a portlet visibility rule and to assign the rule to the portlet.
Which one of the following statements is valid regarding credential objects?
A. Credential objects are serializable.
B. To create a slot for storing active credentials, set the active parameter of the CredentialVaultService.createSlot method to true.
C. Passive credential objects hide the credential's secret from the portlet.
D. Portlets that use active credential objects need to extract the secret from the credential to authenticate with the backend.
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only IBM exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your C2040-911 exam preparations and IBM certification application, do not hesitate to visit our Vcedump.com to find your solutions here.