public class CSFeatureGroups extends CSItemMultiple
The CSFeatureGroups
class provides a method that retrieves several feature groups from the database.
This method requires that certain database and key information (group IDs, for example) be specified via the
set
methods provided, prior to its invocation.
All database access/connectivity is handled internally by the CSFeatureGroups
class.
LEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSFeatureGroups()
Creates an empty
CSFeatureGroups object. |
CSFeatureGroups(java.lang.String strPropertyFile)
Creates an empty
CSFeatureGroups object, specifying a property file that contains all of the
database connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSFeatureGroups . |
boolean |
exist()
Not currently implemented for
CSFeatureGroups . |
void |
get()
Retrieves the details of several groups from the database.
|
java.lang.String |
getFilter()
Gets the group name filter currently specified as key information.
|
java.lang.String |
getGroupList()
Gets list of group IDs currently specified as key information.
|
java.lang.String |
getNameList()
Gets the list of group names currently specified as key information.
|
int |
getRelatedArticleID()
Gets the article ID currently specified as key information.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setFilter(java.lang.String strFilter)
Specifies the name filter to be used as key information.
|
void |
setGroupList(java.lang.String strGroupList)
Specifies a list of group IDs to be used as key information.
|
void |
setNameList(java.lang.String strNameList)
Specifies a list of group names to be used as key information.
|
void |
setRelatedArticleID(int nRelatedArticleID)
Specifies the article ID to be used as key information.
|
void |
setSortOrder(java.lang.String strSortOrderList)
Sets the order in which the groups are to be retrieved.
|
java.lang.String |
toString()
Outputs the contents of this
CSFeatureGroups object to a String object in a
user-friendly format. |
void |
update()
Not currently implemented for
CSFeatureGroups . |
equals, getItems, getMaxRows, getSortOrder, getStartRow, iterator, setItems, setMaxRows, setStartRow
clearRecordedGatewayMessages, clone, count, getCache, getCachingEnabled, getDatabaseVersion, getDatabaseVersion, getDebugOutput, getDetailLevel, getPreview, getPropertyFile, getPropertyFileExtension, getPropertyFilePathname, getRecordedGatewayMessages, getRecordGatewayMessages, getSendGatewayMessages, getUseCache, setDebugOutput, setPreview, setPropertyFile, setRecordGatewayMessages, setSendGatewayMessages, setUseCache
public CSFeatureGroups()
CSFeatureGroups
object.
Use the various set
methods provided to initialise the CSFeatureGroups
object prior
to invoking any of its query methods.
public CSFeatureGroups(java.lang.String strPropertyFile)
CSFeatureGroups
object, specifying a property file that contains all of the
database connection details.
Use the various set methods provided to initialise the CSFeatureGroups
object prior to invoking
any of its query methods.
strPropertyFile
- the name of the property file from which the database connection details are to be read.public void setSortOrder(java.lang.String strSortOrderList) throws CSParameterException
This method should not be used if the setGroupList
or
setNameList
key information is being supplied - in these instances the groups are
retrieved in the same order as the supplied IDs/Names. Otherwise, one or more of the available sort orders may be
specified as a comma-delimited list. Use ASC or DESC to indicate the direction of ordering for a sort order. For
example, "GROUPNAME DESC" would order in descending group name order. ASC is assumed if neither ASC or DESC are
specified. If using the setRelatedArticleID
method, the default sort order will
be as configured for the groups within iCM. If using the setFilter
method, the default
sort order will be GROUPID. In both cases, use the setSortOrder
method to override
the default ordering.
Available sort orders are :
GROUPID - order by group ID
GROUPNAME - order by group name
setSortOrder
in class CSItemMultiple
strSortOrderList
- a comma-separated list of one or more of the available sort orders.CSParameterException
- if an invalid sort order was specifiedpublic void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method.
Valid detail levels for a feature group are :
LEVEL_ID - the group ID
LEVEL_ALL - the group name and parent group ID
Each detail level processes the information specified alongside it in addition to the information specified for all detail levels listed above it. The default detail level is LEVEL_ALL.
setDetailLevel
in class CSDatabaseItem
nDetailLevel
- the detail level to be used.CSParameterException
- if an invalid detail level is specified.public void setGroupList(java.lang.String strGroupList)
setGroupList
followed by a call to get
will populate this
CSFeatureGroups
object with details of all the listed groups. Each group will be stored as a
CSFeatureGroup
object within the item ArrayList
member - use getItems
or iterator
to access/navigate through the groups. The groups will be stored in the
ArrayList
in the order that the IDs are specified in the supplied list.
strGroupList
- a String
object containing a comma-separated list of group IDs.public java.lang.String getGroupList()
String
object containing a comma-separated list of group IDs.public void setNameList(java.lang.String strNameList)
setNameList
followed by a call to get
will populate this
CSFeatureGroups
object with details of all the listed groups. Each group will be stored as a
CSFeatureGroup
object within the item ArrayList
member - use getItems
or iterator
to access/navigate through the groups. The groups will be stored in the
ArrayList
in the order that the names are specified in the supplied list.
strNameList
- a String
object containing a comma-separated list of group names.public java.lang.String getNameList()
String
object containing a comma-separated list of group names.public void setFilter(java.lang.String strFilter)
If a filter is specified and no % is included in the filter, % is placed at the beginning and end so that any group whose name is found to CONTAIN the specified text will be retrieved.
setFilter
followed by get
will result in this CSFeatureGroups
object
being populated with the details of all groups whose name matches the filter specified. Each group will be stored
as a CSFeatureGroup
object within the item ArrayList
member - use
getItems
or iterator
to access/navigate through the groups. By default,
the groups will be stored in the ArrayList
in group ID order. This can be overridden by using the
setSortOrder
method. Use the setStartRow
and
setMaxRows
methods to limit the number of groups retrieved.
strFilter
- the poll name filter.public java.lang.String getFilter()
public void setRelatedArticleID(int nRelatedArticleID)
setRelatedArticleID
followed by get
will result in this
CSFeatureGroups
object being populated with the details of all groups that are related to the
article specified. Each groups will be stored as a CSFeatureGroup
object within the item
ArrayList
member - use getItems
or iterator
to
access/navigate through the groups. By default, the groups will be stored in the ArrayList
in
display order configured via iCM. This can be overridden by using the setSortOrder
method. Use the setStartRow
and setMaxRows
methods to limit
the number of groups retrieved.
nRelatedArticleID
- the ID of the article whose related groups are required.public int getRelatedArticleID()
public boolean exist() throws CSException
CSFeatureGroups
.
exist
in class CSItemMultiple
true
if all groups exist on the database.CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSException
- the base class for exceptions thrown by this method.public void get() throws CSException
Use setGroupList
followed by get
to populate this
CSFeatureGroups
object with details of all the groups identified by the specified IDs. The
retrieved groups will appear within CSFeatureGroups
in the order that their IDs appear within the
supplied list - as such, setSortOrder
, setMaxRows
and
setStartRow
are not valid in this instance.
Use setNameList
followed by get
to populate this
CSFeatureGroups
object with the details of all the groups identified by the specified names. The
retrieved groups will appear within CSFeatureGroups
in the order that their names appear within
the supplied list - as such, setSortOrder
, setMaxRows
and
setStartRow
are not valid in this instance.
Use setFilter
followed by get()
to populate this
CSFeatureGroups
object with the details of all groups whose name matches the filter specified. By
default the groups will be retrieved in group ID order. This can be overridden if required by using the
setSortOrder
method. The setStartRow
and setMaxRows
methods can be
used to restrict the number of groups that are retrieved.
Use setRelatedArticleID
followed by get
to populate this
CSFeatureGroups
object with the details of all groups that are related to the specified article.
By default, the groups will be retrieved in the display order configured via iCM. This can be overridden if
required by using the setSortOrder
method. The setStartRow
and
setMaxRows
methods can be used to restrict the number of groups that are retrieved.
Each retrieved group will be stored as a CSFeatureGroup
object within the item ArrayList
member of this CSFeatureGroups
object - use getItems
or
iterator
to access/navigate through the groups.
get
in class CSItemMultiple
CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSNotFoundException
- if one of the specified groups cannot be found on the database.CSSecurityException
- if security has been breached.CSException
- the base class for exceptions thrown by this method.public void update() throws CSException
CSFeatureGroups
.
update
in class CSItemMultiple
CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSNotFoundException
- if one of the specified groups cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSFeatureGroups
.
delete
in class CSItemMultiple
CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSNotFoundException
- if one of the specified groups cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public java.lang.String toString()
CSFeatureGroups
object to a String
object in a
user-friendly format.
toString
in class CSItemMultiple
String
containing the user-friendly output.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.