|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.etools.iseries.comm.filters.ISeriesAbstractFilterString com.ibm.etools.iseries.comm.filters.ISeriesMemberFilterString
public class ISeriesMemberFilterString
A class representing an AS/400 Member filter string. This is a name pattern
for returning lists of AS/400 members when used as input to the
ISeriesListMembers
class (specifically the getList
methods in this class).
Getting a list of members requires the library and files names to list in, the name pattern for the members and optionally a member type to use in subsetting the returned list.
All this information can be specified by calling setLibrary(String)
,
setFile(String)
, setMember(String)
and the
setMemberType(String)
methods.
Alternatively, it can be set by passing in a filter string in the constructor.
Filter strings for objects are of the form:
mbr
is a scalar or generic member name, and
MBRTYPE
is used to refine the returned list. The type can be a single type
like RPGLE or a generic type like RPG*. Further it can be a single type or a
blank-delimited list of types.
MBRTYPE
clause is the same as MBRTYPE(*)
.
The library and file names can also be generic, if you desire a list of members from more than one file. If the file name is generic , then it is possible multiple files from the same library will match the generic file name, with some of the files being source files and some of the files being data files. By default, you will get back the members for all files that match the name pattern given for the file, and where the member type matches the member type or type pattern (generic name) given.
In this case of a generic file name, you may call the method setObjectType(String)
with either "*FILE:PF-SRC" or "*FILE:PF-DTA" as parameters to restrict the list to
source files or data files, respectively. NOTE: If you want to include DDM Files,
you should also include *FILE:DDMF
Alternatively, in the filter given in this class' constructor, specify the optional filter
keyword OBJTYPE. The valid forms of this are OBJTYPE(*FILE:PF-SRC)
or OBJTYPE(*FILE:PF-DTA)
.
For example, to get a list of all members in all source files whose name ends with "ACC"
in all libraries in the user part of the library list, specify this on the constructor:
*USRLIBL/*ACC(*) MBRTYPE(*) OBJTYPE(*FILE:PF-SRC)
.
Note that OBJTYPE syntax follows the rules of the ISeriesObjectFilterString
class,
and indeed generic file names result in a call to the getList method of
ISeriesListObjects
to resolve
the list of files, as part of the processing in the getList method of
ISeriesListMembers
.
Valid generic library names, file names and types are names with one or two asterisks
anywhere in the name, as in:
ABC*
or *ABC
or A*C
*ABC*
or *A*C
or A*C*
To get the actual filter string from objects of this class, just call toString()
.
ISeriesListMembers
Field Summary | |
---|---|
static String |
ALL
Default value for file name, member name and member type is * (meaning all). |
static String |
Copyright
|
static String |
DEFAULT_GENERIC_OBJTYPE
Default value for OBJTYPE when generic library name is *FILE:PF* *FILE:DDMF |
static String |
DEFAULT_LIBRARY
Default library name is *CURLIB |
static String |
DEFAULT_OBJTYPE
Default value for OBJTYPE is *FILE:PF* |
Fields inherited from class com.ibm.etools.iseries.comm.filters.ISeriesAbstractFilterString |
---|
QUOTE, WILDCARD |
Constructor Summary | |
---|---|
ISeriesMemberFilterString()
Constructor to use when there is no existing filter string. |
|
ISeriesMemberFilterString(String input)
Constructor to use when filter string already exists. |
Method Summary | |
---|---|
String |
getFile()
Return the file name part of this filter string. |
String |
getLibrary()
Return the library name part of this filter string. |
String |
getMember()
Return the member name part of this filter string. |
String |
getMemberType()
Return the member type part of this filter string as a blank delimited list of types. |
String[] |
getMemberTypeArray()
Return the member types part of this filter string as an array of Strings, with each String in the array representing a single type like RPGLE. |
String |
getObjectType()
Retrieve the object type as specified on the setObjectType(String) method. |
boolean |
isGeneric()
Returns true if current filter represents a generic name versus a scalar name. |
boolean |
isMultiGeneric()
Returns true if current filter represents a generic name that has more than one generic name part. |
void |
setFile(String obj)
Set the name of the file containing the members to list. |
void |
setLibrary(String lib)
Set the library name part of this filter string. |
void |
setMember(String mbr)
Set the member name part of this filter string. |
void |
setMemberType(String type)
Set the member type part of this filter string given a string of blank-delimited types. |
void |
setMemberTypes(String[] types)
Set the member type part of this filter string given an array of individual types. |
void |
setObjectType(String type)
Specify the type of files to list members in: source or data. |
String |
toString()
Convert this filter into a filter string. |
static boolean |
verifyMemberType(String type)
Verify a member type is valid. |
Methods inherited from class com.ibm.etools.iseries.comm.filters.ISeriesAbstractFilterString |
---|
addQuotes, clone, countHostOccurrencesOf, countOccurrencesOf, createFilterStringObject, equals, hashCode, hostIndexOf, hostIndexOf, isGenericLibraryName, isGenericName, isQuoted, stripQuotes, verifyGenericName, verifyGenericNameAdvanced, verifyGenericNameAdvancedQuoted, verifyGenericNameQuoted |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String Copyright
public static final String DEFAULT_LIBRARY
public static final String DEFAULT_OBJTYPE
public static final String DEFAULT_GENERIC_OBJTYPE
public static final String ALL
Constructor Detail |
---|
public ISeriesMemberFilterString()
*CURLIB/*(*) MBRTYPE(*) OBJTYPE(*FILE:PF*)
, which
means list all members in all source or data files in the current library. That could be a lot!
To change any of the default values, after instantiation call:
setLibrary(String)
to set the library name. Note this can be generic too,
but this will result in a call to retrieve files in every library matching the library name pattern,
and a subsequent call to retrieve members in every file found.
setFile(String)
to set the file name. This can be a simple or generic
name. If generic, you will get members from multiple files.
setMember(String)
to set the member name pattern.. This can be a simple
or generic name.
setMemberType(String)
to set the member type. This will result in a list of
members subsetted to only those which have this type. The type can be generic,
as in RPG* to get all members whose type starts with "RPG".
setObjectType(String)
to set the file type when the library or file name is generic.
public ISeriesMemberFilterString(String input)
lib/file(mbr) MBRTYPE(type) OBJTYPE(*FILE:attr)
where:
lib
is the library containing the file containing the members. This can
be a single library name or a generic library name like *ABC or *ROLL*.
Special values supported for library are *LIBL, *CURLIB, *USRLIBL and
*ALLUSR.
file
is the file containing the members. This can
be a single file name or a generic file name like *A* or *ROLL*.
mbr
is the name or generic name of the members to list.
MBRTYPE
specifies a single or generic member type to subset the
list, as in RPGLE or RPG* or * for no subsetting by type. You can specify only one
type or a list of blank-separated types. Only members whose type matches any one
of the given types will be returned in the list from ISeriesListMembers.
OBJTYPE
is optional and only used when the file name is generic.
This tells the list processor what type of files - source or data - to consider when
resolving the list of files. Members in all files matching the file name and object type
will be returned. The default is to consider both data and source files, but by
specifying *FILE:PF-SRC you can restrict it to source files, and by specifying
*FILE:PF-DTA you can restrict it to data files. If specified, OBJTYPE must appear
physically after the MBRTYPE keyword.
ABC*
or *ABC
or A*C
*ABC*
or *A*C
or A*C*
toString()
.
Method Detail |
---|
public String getLibrary()
public String getFile()
public String getMember()
public String getMemberType()
getMemberTypeArray()
which
returns each type as an array of String objects.
public String[] getMemberTypeArray()
public void setLibrary(String lib)
ISeriesListMembers
public void setFile(String obj)
public void setMember(String mbr)
public void setMemberType(String type)
setMemberTypes(String[])
public void setMemberTypes(String[] types)
setMemberType(String)
public void setObjectType(String type)
The default for this is *FILE:PF*
.
type
- The file type and file attribute to use when resolving a generic file
name as part of processing this member filter. The only valid values are
OBJTYPE(*FILE:PF-SRC)
,
OBJTYPE(*FILE:PF-DTA)
or
OBJTYPE(*FILE:PF*)
.
Other values will be allowed but will just result in an empty list of members if no files are found matching that type. If the type given is not *FILE, then you will probably also get an exception from the getList method when attempting to retrieve the list.
ISeriesListMembers
,
ISeriesListObjects
,
ISeriesObjectFilterString
public String getObjectType()
setObjectType(String)
method.
This is only used when processing lists of members where the file name is generic.
public String toString()
lib/file(mbr) MBRTYPE(type) OBJTYPE(*FILE:attr)
where:
lib
is the library containing the file containing the members. This can
be a single library name or a generic library name like *ABC or *ROLL*.
Special values supported for library are *LIBL, *CURLIB, *USRLIBL and
*ALLUSR.
file
is the file containing the members. This can
be a single file name or a generic file name like *A* or *ROLL*.
mbr
is the name or generic name of the members to list.
MBRTYPE
specifies a single or generic member type to subset the
list, as in RPGLE or RPG* or * for no subsetting by type. You can specify only one
type or a list of blank-separated types. Only members whose type matches any one
of the given types will be returned in the list from ISeriesListMembers.
OBJTYPE
is optional and only included when the file name is generic.
This tells the list processor what type of files - source or data - to consider when
resolving the list of files. Members in all files matching the file name and object type
will be returned.
toString
in class ISeriesAbstractFilterString
public boolean isGeneric()
isGeneric
in class ISeriesAbstractFilterString
public boolean isMultiGeneric()
isMultiGeneric
in class ISeriesAbstractFilterString
public static boolean verifyMemberType(String type)
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |