com.ibm.as400.access
Class UserObjectsOwnedList

java.lang.Object
  extended bycom.ibm.as400.access.UserObjectsOwnedList

public class UserObjectsOwnedList
extends Object

Allows you to retrieve a list of i5/OS objects that a user is authorized to and/or list of i5/OS objects that the user owns.
Refer to the QSYLOBJA API for additional information.

The list of authorized objects only includes objects the user is specifically authorized to. The list does not include objects the user is solely authorized to because:

Example code:

See Also:
User.getObjectsOwned()

Field Summary
static int SELECTION_FILE_SYSTEM_DIRECTORY
          Selection value indicating to select i5/OS objects that reside in a directory (non-QSYS) based file system.
static int SELECTION_FILE_SYSTEM_LIBRARY
          Selection value indicating to select i5/OS objects that reside in the QSYS library based file system.
static int SELECTION_OBJECT_RELATION_AUTHORIZED
          Selection value indicating to select the list of objects the user is authorized to
static int SELECTION_OBJECT_RELATION_OWNED
          Selection value indicating to select the list of objects the user owns.
static int SELECTION_OBJECT_RELATION_OWNED_OR_AUTHORIZED
          Selection value indicating to select the both list of objects the user is authorized to and the list of objects the user owns.
 
Constructor Summary
UserObjectsOwnedList(AS400 system, String userName)
          Constructs a UserObjectsOwnedList object.
UserObjectsOwnedList(AS400 system, String userName, int selectionFileSystem, int selectionObjectRelation)
          Constructs a UserObjectsOwnedList object.
 
Method Summary
 UserObjectsOwnedListEntry[] getObjectList()
          Returns a list of all UserObjectsOwnedListEntry i5/OS objects based on the current selection criteria for the file system and object relation.
 int getSelectionFileSystem()
          Returns the current selection criteria for the file system from which to retrieve the list of objects that a user is authorized to or list of objects the user owns.
 int getSelectionObjectRelation()
          Returns the returned objects setting indicating that objects to be returned are objects that the user is authorized to, objects owned, or both.
 AS400 getSystem()
          Returns the system from which to retrieve the list of objects that a user is authorized to and the list of objects the user owns.
 String getUserName()
          Returns the user name for which to retrieve the list of objects that a user is authorized to and list of objects the user owns.
 void setSelectionFileSystem(int selectionFileSystem)
          Sets the selection criteria for the file system from which to retrieve the list of objects that the user is authorized to or the list of objects the user owns.
 void setSelectionObjectRelation(int selectionObjectRelation)
          Sets which objects are to be selected (indicating objects authorized to, objects owned, or both).
 void setSystem(AS400 system)
          Sets the system from which to retrieve the list of objects that a user is authorized to and the list of objects the user owns.
 void setUserName(String userName)
          Sets the user name for which to retrieve the list of objects that the user is authorized to and/or the list of objects the user owns.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SELECTION_FILE_SYSTEM_LIBRARY

public static final int SELECTION_FILE_SYSTEM_LIBRARY
Selection value indicating to select i5/OS objects that reside in the QSYS library based file system.

See Also:
Constant Field Values

SELECTION_FILE_SYSTEM_DIRECTORY

public static final int SELECTION_FILE_SYSTEM_DIRECTORY
Selection value indicating to select i5/OS objects that reside in a directory (non-QSYS) based file system.

See Also:
Constant Field Values

SELECTION_OBJECT_RELATION_AUTHORIZED

public static final int SELECTION_OBJECT_RELATION_AUTHORIZED
Selection value indicating to select the list of objects the user is authorized to

See Also:
Constant Field Values

SELECTION_OBJECT_RELATION_OWNED

public static final int SELECTION_OBJECT_RELATION_OWNED
Selection value indicating to select the list of objects the user owns.

See Also:
Constant Field Values

SELECTION_OBJECT_RELATION_OWNED_OR_AUTHORIZED

public static final int SELECTION_OBJECT_RELATION_OWNED_OR_AUTHORIZED
Selection value indicating to select the both list of objects the user is authorized to and the list of objects the user owns.

See Also:
Constant Field Values
Constructor Detail

UserObjectsOwnedList

public UserObjectsOwnedList(AS400 system,
                            String userName)
Constructs a UserObjectsOwnedList object.
You must call getObjectList() method to retrieve the object list.
Default values are set to select library based objects which the user owns.
The selectionFileSystem parameter defaults to SELECTION_FILE_SYSTEM_LIBRARY, the selectionObjectRelation parameter defaults to SELECTION_OBJECT_RELATION_OWNED.

Parameters:
system - The system upon which the user resides.
userName - The user name which owns the objects to be returned.

UserObjectsOwnedList

public UserObjectsOwnedList(AS400 system,
                            String userName,
                            int selectionFileSystem,
                            int selectionObjectRelation)
Constructs a UserObjectsOwnedList object.
You must call getObjectList() method to retrieve the object list.

Parameters:
system - The system upon which the user resides.
userName - The user name which owns (or is authorized to) the objects to be returned.
selectionFileSystem - The format name. Possible values are:
selectionObjectRelation - The objects to return. Possible values are:
Method Detail

getObjectList

public UserObjectsOwnedListEntry[] getObjectList()
                                          throws AS400Exception,
                                                 AS400SecurityException,
                                                 ErrorCompletingRequestException,
                                                 InterruptedException,
                                                 IOException,
                                                 ObjectDoesNotExistException
Returns a list of all UserObjectsOwnedListEntry i5/OS objects based on the current selection criteria for the file system and object relation.

This method retrieves the list of objects from the system based on the selection critera set via the constructor or modified by any of the set methods.

Returns:
The array of objects retrieved from the system.
Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException
ObjectDoesNotExistException

setSystem

public void setSystem(AS400 system)
Sets the system from which to retrieve the list of objects that a user is authorized to and the list of objects the user owns.

This method changes the value set via the constructor, allowing subsequent calls to getObjectList() method to retrieve a different list of objects.

Parameters:
system - The system upon which the user resides.

getSystem

public AS400 getSystem()
Returns the system from which to retrieve the list of objects that a user is authorized to and the list of objects the user owns.

Returns:
The system upon which the user resides.

setUserName

public void setUserName(String userName)
Sets the user name for which to retrieve the list of objects that the user is authorized to and/or the list of objects the user owns.

This method changes the value set via the constructor, allowing subsequent calls to getObjectList() method to retrieve a different list of objects.

Parameters:
userName - The user name which owns (or is authorized to) the objects to be returned.

getUserName

public String getUserName()
Returns the user name for which to retrieve the list of objects that a user is authorized to and list of objects the user owns.

Returns:
The user name which owns (or is authorized to) the objects to be returned.

setSelectionFileSystem

public void setSelectionFileSystem(int selectionFileSystem)
Sets the selection criteria for the file system from which to retrieve the list of objects that the user is authorized to or the list of objects the user owns.

This method changes the value set via the constructor, allowing subsequent calls to getObjectList() method to retrieve a different list of objects.

Parameters:
selectionFileSystem - The format name. Valid values:

getSelectionFileSystem

public int getSelectionFileSystem()
Returns the current selection criteria for the file system from which to retrieve the list of objects that a user is authorized to or list of objects the user owns.

Returns:
the selection file system. Possible values:

setSelectionObjectRelation

public void setSelectionObjectRelation(int selectionObjectRelation)
Sets which objects are to be selected (indicating objects authorized to, objects owned, or both).

This method changes the value set via the constructor, allowing subsequent calls to getObjectList() method to retrieve a different list of objects.

Parameters:
selectionObjectRelation - Which objects are to be selected . Valid values:

getSelectionObjectRelation

public int getSelectionObjectRelation()
Returns the returned objects setting indicating that objects to be returned are objects that the user is authorized to, objects owned, or both.

Returns:
the selection object relation. Possible values:

toString

public String toString()
Returns a string representation of this object.

Returns:
a string with the system, userName, selectionFileSystem, and selectionObjectRelation