|
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.Objectcom.ibm.etools.iseries.comm.filters.ISeriesAbstractFilterString
com.ibm.etools.iseries.comm.filters.ISeriesObjectFilterString
public class ISeriesObjectFilterString
A class representing an AS/400 Object filter string. This is a name pattern
for returning lists of AS/400 objects when used as input to the
ISeriesListObjects
class (specifically the getList
methods in this class).
Getting a list of objects requires the library name to list in, the name pattern for the objects and optionally one or more object type and object attribute pairs to use in subsetting the list.
All this information can be specified by calling setLibrary(String)
,
setObject(String)
and the setObjectType(String)
methods.
Alternatively, it can be set by passing in a filter string in the constructor.
Filter strings for objects are of the form:
lib/obj OBJTYPE(type:attr type:attr ...)
where:
lib
is the library containing the objects to list (can be
generic to get list of objects in multiple libraries),
obj
is a generic object name, and
OBJTYPE
is optional and is used to specify one or more
space-delimited pairs of object type and object attribute (attribute can be generic)
used to subset the returned list. The type must be an iSeries object type such as *FILE,
while the attribute can be scalar (PF) or generic (PF* or * for all attributes).
Note that PDM-like attributes PF-SRC and PF-DTA are supported.
Valid generic library names, object names and attributes 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 back from objects of this class, just call toString()
.
Objects of this class are used in the ISeriesListObjects
class for returning a list of information about each object meeting the filter's criteria.
ISeriesListObjects
Field Summary | |
---|---|
static String |
ALL
Default value for object name is * |
static String |
Copyright
|
static String |
DEFAULT_LIBRARY
Default library name is *CURLIB |
static String |
DEFAULT_OBJTYPE
Default value for OBJTYPE is *:* |
Fields inherited from class com.ibm.etools.iseries.comm.filters.ISeriesAbstractFilterString |
---|
WILDCARD |
Constructor Summary | |
---|---|
ISeriesObjectFilterString()
Constructor to use when there is no existing filter string. |
|
ISeriesObjectFilterString(String input)
Constructor to use when filter string already exists. Filter strings for objects are of the form: lib/obj OBJTYPE(type:attr type:attr ...) . |
Method Summary | |
---|---|
String |
getLibrary()
Return the library name part of this filter string. |
String |
getObject()
Return the object name part of this filter string. |
String |
getObjectType()
Return the object type as a blank-delimited list of type:attr pairs. |
String[] |
getObjectTypeArray()
Return this filter string's type:attr values as an array of strings. |
ISeriesObjectTypeAttrList |
getObjectTypeAttrList()
Return this filter string's type:attr values as an ISeriesObjectTypeAttrList object. |
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. |
boolean |
isMultiTyped()
Return true if this is a multi-typed filter. |
boolean |
matchesType(String type)
Given an object type, attempt to determine if this type will match this filter, ignoring all other information such as attributes. |
void |
setLibrary(String lib)
Set the library name part of this filter string. |
void |
setObject(String obj)
Set the object name part of this filter string. |
void |
setObjectType(String type)
Set the object type part of this filter string. |
void |
setObjectTypeAttrList(ISeriesObjectTypeAttrList types)
Set the object type part of this filter string, given an ISeriesObjectTypeAttrList object. |
void |
setObjectTypes(String[] types)
Set the object type part of this filter string, given an array of type:attr strings. |
String |
toString()
Convert this filter into a filter string. |
String |
toStringFull()
Same as toString(), but allows one method that works consistently for us and our child class ISeriesLibraryFilterString. |
static boolean |
verifyObjectType(String type)
Utility method to ensure an object type is syntactically 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 ALL
Constructor Detail |
---|
public ISeriesObjectFilterString()
*CURLIB/* OBJTYPE(*:*)
.
To change any of the default values call:
setLibrary(String)
to set the library name. Note this can be generic too,
but this will result in a call to retrieve objects in every library matching the library name pattern.
setObject(String)
to set the object name. This can be a simple or generic
name. Valid generic names have one or two asterisks anywhere in the name.
setObjectType(String)
to set the object type and attribute pairs. This will result in a list of
objects subsetted to only those which match one of the given type and attribute pairs.
public ISeriesObjectFilterString(String input)
lib/obj OBJTYPE(type:attr type:attr ...)
.
lib
is the library containing the objects to list. 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.
obj
is the name or generic name of the objects to list.
TYPE
specifies a single or generic member type to subset the
list, as in RPGLE or RPG* or * for no subsetting by type.
OBJTYPE
is optional and used to refine the returned list. The parms to
OBJTYPE are one or more space-delimited type:attr
pairs identifying the
object type and attribute. Only items matching one of the
type:attr
pairs are returned.
The :attr
part is optional and if
omitted is the same as type:*
. Note the type must be a
valid AS/400 object type, while the attribute must be a
valid attribute for that type or a generic attribute as in PF-*
.
ABC*
or *ABC
or A*C
*ABC*
or *A*C
or A*C*
toString()
.
Method Detail |
---|
public boolean isMultiTyped()
OBJTYPE("*FILE:PF* *PGM:RPG* *PGM:CBLLE")
.
If multiple types are specified then OBJATTR is ignored.
public String getLibrary()
public String getObject()
public String getObjectType()
getObjectTypeArray()
.
setObjectType(String)
public String[] getObjectTypeArray()
type:attr
values as an array of strings.
public ISeriesObjectTypeAttrList getObjectTypeAttrList()
type:attr
values as an ISeriesObjectTypeAttrList object.
ISeriesObjectTypeAttrList
public void setLibrary(String lib)
ISeriesListObjects
public void setObject(String obj)
public void setObjectType(String type)
OBJTYPE("*FILE *PGM *MSGF")
.
Optionally, an attribute can be appended to some or all types, as in:
OBJTYPE("*FILE:PF* *PGM:RPG* *MSGF")
.
The attribute can be generic. The same type can also be specified
multiple times, each with a different attribute, as in:
OBJTYPE("*PGM:RPG* *PGM:CBL")
.
If multiple types are specified then OBJATTR is ignored.
Multiple types also must be enclosed in double quotes.
public void setObjectTypes(String[] types)
type:attr
strings.
public void setObjectTypeAttrList(ISeriesObjectTypeAttrList types)
ISeriesObjectTypeAttrList
public String toString()
lib/obj OBJTYPE(type) OBJATTR(attr)
lib/obj OBJTYPE(type:attr type:attr)
.
where
toString
in class ISeriesAbstractFilterString
public String toStringFull()
public boolean isGeneric()
isGeneric
in class ISeriesAbstractFilterString
public boolean isMultiGeneric()
Is *LIBL a generic library name? Well, for our purposes it is. It means list all objects meeting the object filter, in all libraries on the library list.
This returns true if the library name is generic, but not if it is *CURLIB.
isMultiGeneric
in class ISeriesAbstractFilterString
public static boolean verifyObjectType(String type)
public boolean matchesType(String type)
A
- non-generic object type as in "*FILE".
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |