All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.QSYSObjectPathName

java.lang.Object
   |
   +----com.ibm.as400.access.QSYSObjectPathName

public class QSYSObjectPathName
extends Object
implements Serializable
The QSYSObjectPathName class provides an integrated file system path name that represents an object in the QSYS library file system.

QSYSObjectPathName objects generate the following events: PropertyChangeEvent.

This object can be used in two ways:

IllegalPathNameExceptions are thrown if errors are found.

Objects in the QSYS file system have integrated file system names with the following format for objects or members in a library other than QSYS:

/QSYS.LIB/library.LIB/object.type
/QSYS.LIB/library.LIB/object.FILE/member.MBR
For objects or members that reside in QSYS, this format is used:
/QSYS.LIB/object.type
/QSYS.LIB/object.FILE/member.MBR
For example:
/QSYS.LIB/QGPL.LIB/CRTLIB.CMD
/QSYS.LIB/QGPL.LIB/ACCOUNTS.FILE/PAYABLE.MBR
/QSYS.LIB/CRTLIB.CMD
/QSYS.LIB/ACCOUNTS.FILE/PAYABLE.MBR

In an integrated file system path name, special values, such as *ALL, that begin with an asterisk are not depicted with an asterisk but with leading and trailing percent signs (%ALL%). In the integrated file system, an asterisk is a wildcard character. The following special values are recognized by this class:

Library name: %ALL%(*ALL), %ALLUSR%(*ALLUSR), %CURLIB%(*CURLIB),
%LIBL%(*LIBL), %USRLIBL%(*USRLIBL)
Object name:  %ALL%(*ALL)
Member name:  %ALL%(*ALL), %FILE%(*FILE), %FIRST%(*FIRST), %LAST%(*LAST)
%NONE%(*NONE)

The path name will be in uppercase. If case needs to be preserved for a library, object, or member name, quotation marks should be used around the names. For example,

QSYSObjectPathName path = new
QSYSObjectPathName("/QSYS.LIB/\"MixedCase\".LIB/\"lowercase\".FILE");
Examples:


Constructor Index

 o QSYSObjectPathName()
Constructs an QSYSObjectPathName object.
 o QSYSObjectPathName(String)
Constructs an QSYSObjectPathName object.
 o QSYSObjectPathName(String, String, String)
Constructs an QSYSObjectPathName object.
 o QSYSObjectPathName(String, String, String, String)
Constructs an QSYSObjectPathName object.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener to be notified when the value of any bound property is changed.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a listener to be notified when the value of any constrained property is changed.
 o getLibraryName()
Returns the library in which the object resides.
 o getMemberName()
Returns the name of the member.
 o getObjectName()
Returns the name of the object this path name represents.
 o getObjectType()
Returns type of object this path name represents.
 o getPath()
Returns the fully qualified integrated file system path name.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener from the change list.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a listener from the veto list.
 o setLibraryName(String)
Sets the library in which the object resides.
 o setMemberName(String)
Sets the name of the member.
 o setObjectName(String)
Sets the name of the object this path name represents.
 o setObjectType(String)
Sets type of object this path name represents.
 o setPath(String)
Sets the integrated file system path name for this object.
 o toPath(String, String, String)
Builds an integrated file system path name to represent the object.
 o toPath(String, String, String, String)
Builds an integrated file system path name to represent the member.

Constructors

 o QSYSObjectPathName
 public QSYSObjectPathName()
Constructs an QSYSObjectPathName object. It creates an integrated file system path name for an object in the QSYS file system.

 o QSYSObjectPathName
 public QSYSObjectPathName(String path)
Constructs an QSYSObjectPathName object. It creates an integrated file system path name for an object in the QSYS file system.

Parameters:
path - The fully qualified integrated file system name of an object in the QSYS file system.
 o QSYSObjectPathName
 public QSYSObjectPathName(String library,
                           String object,
                           String type)
Constructs an QSYSObjectPathName object. It builds an integrated file system path name to represent the object.
QSYSObjectPathName ifsName = new
QSYSObjectPathName("library", "name", "type");
// This line will print "/QSYS.LIB/LIBRARY.LIB/NAME.TYPE".
System.out.println(ifsName.getPath());

Parameters:
library - The library in which the object exists. It must be 1-10 characters.
object - The name of the object. It must be 1-10 characters.
type - The type of the object. It must be 1-6 characters. This is the AS/400 abbreviation for the type of object, for example, LIB for library, or CMD for command. Types can be found by prompting for the OBJTYPE parameter on commands such as WRKOBJ.
 o QSYSObjectPathName
 public QSYSObjectPathName(String library,
                           String object,
                           String member,
                           String type)
Constructs an QSYSObjectPathName object. It builds an integrated file system path name to represent the member.
QSYSObjectPathName ifsName = new
QSYSObjectPathName("library", "name", "member", "MBR");
// This line will print "/QSYS.LIB/LIBRARY.LIB/NAME.FILE/MEMBER.MBR".
System.out.println(ifsName.getPath());

Parameters:
library - The library in which the object exists. It must be 1-10 characters.
object - The name of the object. It must be 1-10 characters.
member - The name of the member. It must be 1-10 characters.
type - The type of the object. This must be MBR.

Methods

 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener to be notified when the value of any bound property is changed. The propertyChange method will be called.

Parameters:
listener - The PropertyChangeListener.
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
 public void addVetoableChangeListener(VetoableChangeListener listener)
Adds a listener to be notified when the value of any constrained property is changed. The vetoableChange method will be called.

Parameters:
listener - The VetoableChangeListener.
See Also:
removeVetoableChangeListener
 o getLibraryName
 public String getLibraryName()
Returns the library in which the object resides.

Returns:
The name of the library.
 o getMemberName
 public String getMemberName()
Returns the name of the member. If this object does not represent a member, an empty string is returned.

Returns:
The name of the member.
 o getObjectName
 public String getObjectName()
Returns the name of the object this path name represents. If this object represents a member, the object name is the name of the file in which the member exists.

Returns:
The name of the object.
 o getObjectType
 public String getObjectType()
Returns type of object this path name represents. Type is the AS/400 abbreviation for the type of object, for example, LIB for library, or CMD for command. Types can be found by prompting for the OBJTYPE parameter on commands such as WRKOBJ.

Returns:
The type of the object.
 o getPath
 public String getPath()
Returns the fully qualified integrated file system path name.

Returns:
The fully qualified integrated file system path name.
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener from the change list. If the listener is not on the list, do nothing.

Parameters:
listener - The PropertyChangeListener.
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
 public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a listener from the veto list. If the listener is not on the list, do nothing.

Parameters:
listener - The VetoableChangeListener.
See Also:
addVetoableChangeListener
 o setLibraryName
 public void setLibraryName(String library) throws PropertyVetoException
Sets the library in which the object resides. This is a bound and constrained property. Note that changes to this property also affect the pathName property.

Parameters:
library - The library in which the object exists. It must be 1-10 characters.
Throws: PropertyVetoException
If the change was vetoed.
 o setMemberName
 public void setMemberName(String member) throws PropertyVetoException
Sets the name of the member. If a value other than an empty String ("") is specified, the object type is set to MBR. This is a bound and constrained property. Note that changes to this property also affect the objectType and pathName properties.

Parameters:
member - The name of the member. It must be 10 characters or less. An empty String ("") can be passed to indicate this object does not represent a member.
Throws: PropertyVetoException
If the change was vetoed.
 o setObjectName
 public void setObjectName(String object) throws PropertyVetoException
Sets the name of the object this path name represents. If this object represents a member, the object name is the name of the file that the member is in. This is a bound and constrained property. Note that changes to this property also affect the pathName property.

Parameters:
object - The name of the object. It must be 1-10 characters.
Throws: PropertyVetoException
If the change was vetoed.
 o setObjectType
 public void setObjectType(String type) throws PropertyVetoException
Sets type of object this path name represents. If the type is not MBR, the member name property will be set to an empty string. The value will be uppercased. This is a bound and constrained property. Note that changes to this property also affect the memberName and pathName properties.

Parameters:
type - The type of the object. It must be 1-6 characters. This is the AS/400 abbreviation for the type of object, for example, LIB for library, or CMD for command. Types can be found by prompting for the OBJTYPE parameter on commands such as WRKOBJ.
Throws: PropertyVetoException
If the change was vetoed.
 o setPath
 public void setPath(String path) throws PropertyVetoException
Sets the integrated file system path name for this object. This is a bound and constrained property. Note that changes to this property also affect the libraryName, memberName, objectName, and objectType properties.

Parameters:
path - The fully qualified integrated file system name of an object in the QSYS file system.
Throws: PropertyVetoException
If the change was vetoed.
 o toPath
 public static String toPath(String library,
                             String object,
                             String type)
Builds an integrated file system path name to represent the object.

Parameters:
library - The library the object is in. It must be 1-10 characters.
object - The name of the object. It must be 1-10 characters.
type - The type of the object. It must be 1-6 characters. This is the AS/400 abbreviation for the type of object, for example, LIB for library, or CMD for command. Types can be found by prompting for the OBJTYPE parameter on commands such as WRKOBJ.
Returns:
The integrated file system name for the object.
 o toPath
 public static String toPath(String library,
                             String object,
                             String member,
                             String type)
Builds an integrated file system path name to represent the member.

Parameters:
library - The library the object is in. It must be 1-10 characters.
object - The name of the object. It must be 1-10 characters.
member - The name of the member. It must be 1-10 characters.
type - The type of the object. This must be MBR.
Returns:
The integrated file system name for the object.

All Packages  Class Hierarchy  This Package  Previous  Next  Index