Oracle® Fusion Middleware Identity Governance Framework ArisID API開発者ガイド 11g (11.1.1) B66695-01 |
|
![]() 前 |
次のサンプル・アプリケーションでは、IDXユーザー/ロールBeanを使用します。
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page import="org.openliberty.arisid.*"%> <%@page import="org.openliberty.arisidbeans.*"%> <%@page import="oracle.igf.userrole.*"%> <%@page import="java.util.*"%> <%@page import="java.net.URI"%> <%!public static UserManager uMgr = null; { try { uMgr = new UserManager(null); } catch (Exception e) { e.printStackTrace(); } } %> <html> <head> <title>Search Users</title> <% String firstname = request.getParameter("firstname"); String lastname = request.getParameter("lastname"); String telephone = request.getParameter("telephone"); List<PropertyFilterValue> attrFilters = new ArrayList<PropertyFilterValue>(); attrFilters.add(new PropertyFilterValue("firstname", firstname, AttributeFilter.OP_BGNSWITH)); attrFilters.add(new PropertyFilterValue("lastname", lastname, AttributeFilter.OP_BGNSWITH)); attrFilters.add(new PropertyFilterValue("telephone", telephone, AttributeFilter.OP_CONTAINS)); List<User> subjs = uMgr.searchUsers(attrFilters); %> </head> <body> <a href="SearchUsers.html">Home</a> <center>List of Users with FirstName starting with "<%=firstname%>", LastName starting with "<%=lastname%>" and TelephoneNumber containing "<%=telephone%>"</center> <% Iterator<User> sIter = subjs.iterator(); while (sIter.hasNext()) { User subj = sIter.next(); Map<String, IAttributeValue> vals = subj.getAllAttributes(); Iterator<IAttributeValue> iter = vals.values().iterator(); %> <table border="0"> <tr> <th>Item</th> <th>Value</th> </tr> <% while (iter.hasNext()) { IAttributeValue val = iter.next(); String name = val.getNameIdRef(); String value = null; if (val.size() > 0) value = val.get(0); if (value != null) { %> <tr> <td><%=name%></td> <td><%=value%></td> </tr> <% } } %> </table> <% } %> <br> <br> <br> <a href="SearchUsers.html">Home</a> </body> </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> <HEAD><TITLE>Search Users</TITLE></HEAD> <BODY> <FORM METHOD=POST ACTION="SearchUsers.jsp"> First Name Starting with <INPUT TYPE=TEXT NAME=firstname SIZE=30><BR><BR> Last Name Starting with <INPUT TYPE=TEXT NAME=lastname SIZE=30><BR><BR> Telephone Number containing <INPUT TYPE=TEXT NAME=telephone SIZE=15><BR><BR> <P><INPUT TYPE=SUBMIT> </FORM> </BODY> </HTML>