User Management Guide
CHAPTER 10
This chapter provides reference information about the user management framework tags (FrameworkTag.jar).
For background information, see the chapter on using the exteNd Director tag libraries in Developing exteNd Director Applications.
Description
Adds a specified user to a group.
Wrapping This tag wraps the addMember() method on the EbiRealmGroupDelegate interface.
Syntax
<prefix:addUserToGroup id="ID" userid="userid" groupid="groupid" />
Example
<% taglib uri="/fw" prefix="fw" %>
...
<fw:addUserToGroup id="result" userid="User1" groupid="Group1" />
<%=pageContext.getAttribute("result")%>
Description
Creates a new group.
Wrapping This tag wraps the addGroup() method on the EboDirectoryManager interface.
Syntax
<prefix:createGroup id="ID" groupid="groupid" />
Example
<% taglib uri="/fw" prefix="fw" %>
...
<fw:createGroup id="result" groupid="Group1" />
<%=pageContext.getAttribute("result")%>
Description
Creates a new user and a new default profile for that user. This tag creates the new user in the realm that was specified in the configuration for the Directory subsystem.
Wrapping This tag wraps the createUser() method on the EbiUserDelegate interface.
Syntax
<prefix:createUser id="ID" userid="userid" password="password"firstname="firstname" lastname="lastname" emailaddress="emailaddress"/>
Example
<% taglib uri="/fw" prefix="fw" %>
...
<fw:createUser id="result" userid="User1" password="MyPassword" firstname="John" lastname="Smith"/>
<%=pageContext.getAttribute("result")%>
Description
Returns a list of groups for the framework. The objects returned are of type java.security.acl.Group. They can be cast to Group objects, or a more specific subclass if necessary.
Wrapping This tag wraps the getGroups() method on the EbiDirectoryManager interface.
Syntax
<prefix:getGroupList id="ID" iterate="iterate" />
Examples
This example shows how to use the getGroupList tag with the iterate attribute set to true:
<%@ taglib uri="/fw" prefix="fw" %>
<html>
<head>
</head>
<body>
<fw:login userid="admin" password="admin"/>
<fw:getGroupList iterate="true">
Group Name = <%=groupid%><br/>
<p/>
</fw:getGroupList>
<fw:logoff />
</body>
</html>
This example shows how to use the getGroupList tag with the iterate attribute set to false:
<%@ taglib uri="/fw" prefix="fw" %>
<html>
<head>
</head>
<body>
<fw:login userid="admin" password="admin"/>
<fw:getGroupList iterate="false"/>
<%= ((java.util.List)pageContext.getAttribute("grouplist")).size() %> = the size of the list...
<fw:logoff />
</body>
</html>
Description
Retrieves resource set objects by string path. If the id attribute is not set, the resource will be assumed to be a string and returned inline. If the id attribute is set, the returned object will be returned via the variable named in the id attribute.
Syntax
<prefix:getResource resourcePath="resourcePath" returnType="returnType"id="ID" />
Description
Retrieves the user ID for the current user. If the current user is not logged in, the tag returns anonymous.
Wrapping This tag wraps the getUserID() method on the EboDirectoryHelper class.
Syntax
<prefix:getUserID id="ID" />
Example
<% taglib uri="/fw" prefix="fw" %>
...
<fw:getUserID id="user" />
<%=pageContext.getAttribute("user")%>
Description
Retrieves information about a particular user. The object returned is of type EbiUserInfo. If you don't need the object, you can access some commonly used attributes directly from the page context.
Wrapping This tag wraps the getUserInfoByUserID() method on the EbiUserDelegate interface.
Syntax
<prefix:getUserID id="ID" userid="userid" />
Examples
This example shows how to get an attribute from the EbiUserInfo object:
<% taglib uri="/fw" prefix="fw" %> ... <fw:getUserInfo userid="User1" /> <%=pageContext.getAttribute("userinfo")%> Hello, <%= ((com.sssw.fw.usermgr.api.EbiUserInfo)pageContext.getAttribute("userinfo")).getUserFirstName() %>
This example shows how to access attributes from the context:
<% taglib uri="/fw" prefix="fw" %>
...
<fw:getUserInfo userid="User1" />
<%=pageContext.getAttribute("userid") %>
<%=pageContext.getAttribute("firstname") %>
<%=pageContext.getAttribute("lastname") %>
<%=pageContext.getAttribute("emailaddress") %>
Description
Returns a list of users for the framework. The objects returned are of type EbiUserInfo.
Wrapping This tag wraps the getUsers() method on the EbiDirectoryDelegate interface.
Syntax
<prefix:getUserList id="ID" iterate="iterate" />
Examples
This example shows how to use the getUserList tag with the iterate attribute set to true:
<%@ taglib uri="/fw" prefix="fw" %>
<html>
<head>
</head>
<body>
<fw:login userid="admin" password="admin"/>
<fw:getUserList iterate="true">
UserID = <%=userid%><br/>
UUID = <%=uuid%><br/>
<p/>
</fw:getUserList>
<fw:logoff />
</body>
</html>
This example shows how to use the getUserList tag with the iterate attribute set to false:
<%@ taglib uri="/fw" prefix="fw" %>
<html>
<head>
</head>
<body>
<fw:login userid="admin" password="admin"/>
<fw:getUserList iterate="false"/>
<%= ((java.util.List)pageContext.getAttribute("userlist")).size() %> = the size of the list...
<fw:logoff />
</body>
</html>
Description
Retrieves the user preference object for the ID passed in or the current user if no ID is provided. This tag is for getting and setting custom preferences. Preferences for portal objects should be done through the portal manager and the tags that support those functions such as getUserComponentInfoTag.
Wrapping This tag wraps the getUserPreference() method on the EbiUserPreferenceDelegate interface.
Syntax
<prefix:getUserProfile profilename="profilename" userid="userid"id="ID" />
Description
Logs a user in to exteNd Director.
Wrapping This tag wraps the authUserPassword() method on the EbiDirectoryDelegate interface.
Syntax
<prefix:login userid="userid" password="password" id="ID" />
Example
<% taglib uri="/fw" prefix="fw" %>
...
<fw:login userid="admin" password="admin" id="result" />
<%=pageContext.getAttribute("result")%> = the result of the login...
Description
Logs off the current exteNd Director user.
Wrapping This tag wraps the logoff() method on the EbiSession interface.
Syntax
<prefix:logoff id="ID" />
Example
<% taglib uri="/fw" prefix="fw" %>
...
<fw:logoff id="result" />
<%=pageContext.getAttribute("result")%> = the result of the logoff...
Description
Deletes a group.
Wrapping This tag wraps the removeGroup() method on the EbiDirectoryManager interface.
Syntax
<prefix:removeGroup groupid="groupid" id="ID" />
Example
This example shows how to use the removeGroup tag:
<%@ taglib uri="/fw" prefix="fw" %>
<html>
<head>
</head>
<body>
<fw:login userid="admin" password="admin"/>
<fw:removeGroup groupid="Group1"/>
<fw:logoff />
</body>
</html>
Description
Removes a specified user from a group.
Wrapping This tag wraps the removeMember() method on the EbiRealmGroupDelegate interface.
Syntax
<prefix:removeUserFromGroup id="ID" userid="userid" groupid="groupid" />
Example
<% taglib uri="/fw" prefix="fw" %>
...
<fw:removeUserFromGroup id="result" userid="User1" groupid="Group1" />
<%=pageContext.getAttribute("result")%>
Description
Changes the password for a specified user.
Wrapping This tag wraps the modifyUser() method on the EbiUserDelegate interface.
Syntax
<prefix:setUserPassword id="ID" userid="userid" passowrd="password" />
Example
<% taglib uri="/fw" prefix="fw" %>
...
<fw:setUserPassword id="result" userid="User1" password="MyPassword" />
<%=pageContext.getAttribute("result")%>
Description
Determines whether a specified user is in a particular group.
Wrapping This tag wraps the isMember() method on the EbiRealmGroupDelegate interface.
Syntax
<prefix:userInGroup groupid="groupid" userid="userid" id="ID" />
Example
<% taglib uri="/fw" prefix="fw" %>
...
Is in group...
<fw:userInGroup groupid="ContentAdmins" userid="JSmith" id="result" />
<%=pageContext.getAttribute("result")%>
Description
Determines whether the current user is logged in to the session.
Wrapping This tag wraps the isAnonymous() method on the EboDirectoryHelper class.
Syntax
<prefix:userLoggedIn id="ID" />
Example
<% taglib uri="/fw" prefix="fw" %>
...
Is logged in...
<fw:userLoggedIn />
<%=pageContext.getAttribute("loggedin")%>
Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved. more ...