ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/vugrp.htm

133 lines
7.3 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="Vaccess users and groups classes" />
<meta name="abstract" content="" />
<meta name="description" content="" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="vugrp" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Vaccess users and groups classes</title>
</head>
<body id="vugrp"><a name="vugrp"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Vaccess users and groups classes</h1>
<div><p></p>
<div class="section"><p>The users and groups components in the vaccess package allow you
to present lists of server users and groups through the <a href="javadoc/com/ibm/as400/vaccess/VUser.html">VUser class</a>.</p>
</div>
<div class="section"><p>The following components are available:</p>
</div>
<div class="section"><ul><li><a href="vpanes.htm#vpanes">AS400Panes</a> are GUI components that
present and allow manipulation of one or more server resources.</li>
<li>A <a href="javadoc/com/ibm/as400/vaccess/VUserList.html#NAVBAR_TOP"> VUserList</a> object is a resource that represents a list
of server users and groups for use in AS400Panes.</li>
<li>A <a href="javadoc/com/ibm/as400/vaccess/VUserAndGroup.html"> VUserAndGroup</a> object is a resource for use in AS400Panes
that represents groups of server users. It allows a Java™ program
to list all users, list all groups, or list users who are not in groups.</li>
</ul>
</div>
<div class="section"><p>AS400Pane and VUserList objects can be used together to present
many views of the list. They can also be used to allow the user to select
users and groups.</p>
</div>
<div class="section"><p>To use a VUserList, you must first set the system property. Set
this property by using a constructor or through the <a href="javadoc/com/ibm/as400/vaccess/VUserList.html#SETSYSTEM(COM.IBM.AS400.ACCESS.AS400)"> setSystem()</a> method. The VUserList object is then "plugged"
into the AS400Pane as the root, using the constructor or setRoot() method
of the AS400Pane.</p>
</div>
<div class="section"><p>VUserList has some other useful properties for defining the set
of users and groups that are presented in AS400Panes:</p>
</div>
<div class="section"><ul><li>Use the <a href="javadoc/com/ibm/as400/vaccess/VUserList.html#SETUSERINFO(JAVA.LANG.STRING)"> setUserInfo()</a> method to specify the types of users that
should appear.</li>
<li>Use the <a href="javadoc/com/ibm/as400/vaccess/VUserList.html#SETGROUPINFO(JAVA.LANG.STRING)"> setGroupInfo()</a> method to specify a group name.</li>
</ul>
</div>
<div class="section"><p>You can use the <a href="javadoc/com/ibm/as400/vaccess/VUserAndGroup.html"> VUserAndGroup</a> object to get information about the Users
and Groups on the system. Before you can get information about a particular
object, you need to <a href="javadoc/com/ibm/as400/vaccess/VUserAndGroup.html#LOAD()">load</a> the information so that it can be accessed. You
can display the server in which the information is found by using the <a href="javadoc/com/ibm/as400/vaccess/VUserAndGroup.html#GETSYSTEM()"> getSystem</a> method.</p>
</div>
<div class="section"><p>When AS400Pane objects and VUserList or VUserAndGroup objects
are created, they are initialized to a default state. The list of users and
groups has not been loaded. To load the contents, the Java program
must explicitly call the load() method on either object to initiate communication
to the server to gather the contents of the list.</p>
</div>
<div class="section"><p>At run-time, right-click a user, user list, or group to display
the shortcut menu. Select <strong>Properties</strong> from the shortcut menu to perform
actions on the selected object:</p>
</div>
<div class="section"><ul><li>User - Display a list of user information including the description, user
class, status, job description, output information, message information, international
information, security information, and group information.</li>
<li>User list - Work with user information and group information properties.
You can also change the contents of the list.</li>
<li>Users and groups - Display properties, such as the user name and description.</li>
</ul>
</div>
<div class="section"><p>Users can only access users and groups to which they are authorized.
In addition, the Java program can prevent the user from performing actions
by using the setAllowActions() method on the pane.</p>
</div>
<div class="section"><p><span class="synph" id="vugrp__vgrpex1"><a name="vugrp__vgrpex1"><!-- --></a><span class="kwd"></span></span>The following example creates
a VUserList and presents it in an AS400DetailsPane:</p>
</div>
<div class="section"><div class="p"><pre> // Create the VUserList object.
// Assume that "system" is an AS400
// object created and initialized
// elsewhere.
VUserList root = new VUserList (system);
// Create and load an
// AS400DetailsPane object.
AS400DetailsPane detailsPane = new AS400DetailsPane (root);
detailsPane.load ();
// Add the details pane to a frame.
// Assume that "frame" is a JFrame
// created elsewhere.
frame.getContentPane ().add (detailsPane);</pre>
The following example
shows how to use the VUserAndGroup object: <pre> // Create the VUserAndGroup object.
// Assume that "system" is an AS400 object created and initialized elsewhere.
VUserAndGroup root = new VUserAndGroup(system);
// Create and Load an AS400ExplorerPane
AS400ExplorerPane explorerPane = new AS400ExplorerPane(root);
explorerPane.load();
// Add the explorer pane to a frame
// Assume that "frame" is a JFrame created elsewhere
frame.getContentPane().add(explorerPane);</pre>
<strong><span class="synph" id="vugrp__vugrpexample"><a name="vugrp__vugrpexample"><!-- --></a><span class="kwd"></span></span>Other
Examples</strong></div>
</div>
<div class="section"><p>Present a list of users on the system using an AS400ListPane with
a <a href="vuserlistexample.htm#vuserlistexample">VUserList</a> object.</p>
</div>
<div class="section"><p>The following image shows the VUserList graphical user interface
component:</p>
</div>
<div class="section"><p><img src="rzahh092.gif" alt="VUserList graphical user interface component" /></p>
</div>
</div>
</body>
</html>