public class CSSubsiteMultiple extends CSItemMultiple
The CSSubsiteMultiple
class provides a method that retrieves several subsites from the database. This
method requires that certain database and key information be specified via the set
methods provided,
prior to its invocation.
All database access/connectivity is handled internally by the CSSubsiteMultiple
class.
CSSubsite
,
Serialized FormLEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSSubsiteMultiple()
Creates an empty
CSSubsiteMultiple object. |
CSSubsiteMultiple(java.lang.String strPropertyFile)
Creates a new
CSSubsiteMultiple , specifying a properties file that contains all of the database
connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSSubsiteMultiple . |
boolean |
exist()
Not currently implemented for
CSSubsiteMultiple . |
void |
get()
Retrieves the details of several subsites from the database.
|
int |
getArticleID()
Gets the article ID specified as key information.
|
boolean |
getExtensionDataReqd()
Get the flag that requests that subsite extension data is returned
|
java.lang.String |
getSubsiteList()
Gets the list of subsite IDs specified as key information.
|
void |
setArticleID(int nArticleID)
Sets the article ID of the article whose containing subsites are to be retrieved.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setExtensionDataReqd(boolean extensionDataReqd)
Set the flag that requests that subsite extension data is returned
|
void |
setSortOrder(java.lang.String strSortOrderList)
Sets the order in which the subsites are to be retrieved.
|
void |
setSubsiteList(java.lang.String strSubsiteList)
Specifies IDs of the subsites whose details are to be retrieved.
|
java.lang.String |
toString()
Outputs the contents of this
CSSubsiteMultiple object to a String object in a
user-friendly format. |
void |
update()
Not currently implemented for
CSSubsiteMultiple . |
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 CSSubsiteMultiple()
CSSubsiteMultiple
object.
Use the various set
methods provided to initialise the CSSubsiteMultiple
object
prior to invoking any of its query methods.
public CSSubsiteMultiple(java.lang.String strPropertyFile)
CSSubsiteMultiple
, specifying a properties file that contains all of the database
connection details.
Use the various set methods provided to initialise the CSSubsiteMultiple
object prior to invoking
any of its query manipulation methods.
strPropertyFile
- the property file that contains the connection details.public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method.
Valid detail levels for a subsite are :
LEVEL_ID
Retrieves Subsite ID only.
LEVEL_ALL
Retrieves all subsite details.
setDetailLevel
in class CSDatabaseItem
nDetailLevel
- the detail level to be used.CSParameterException
- if an invalid detail level is specified.public void setArticleID(int nArticleID)
setArticleID
followed by a call to get
will return details of all subsites in which
the specified article resides. For example, an article that resides in SUBSITE2 which itself resides within
SUBSITE1 will retrieve SUBSITE1 and SUBSITE2 in that order.
nArticleID
- the ID of the article whose containing subsites are to be retrieved.public int getArticleID()
get
method.public void setSubsiteList(java.lang.String strSubsiteList)
setSubsiteList
followed by a call to get
returns details of the subsites specified
in the list.
strSubsiteList
- a comma-separated list of subsite IDs.public java.lang.String getSubsiteList()
public void setSortOrder(java.lang.String strSortOrderList) throws CSParameterException
This method should not be used if the setSubsiteList
or
setArticleID
key information is being supplied. For the former, the subsites will be
returned in the order in which the subsite IDs are supplied via the setSubsiteList
method. For the
latter, the subsites will be returned in hierarchical order.
For example, assuming an article that resides within SUBSITE4 of the following subsite hierarchy is specified as key information :
SUBSITE1
SUBSITE2
SUBSITE4
SUBSITE3
the returned subsites would be SUBSITE1, SUBSITE2, SUBSITE4, SUBSITE3 and in that order.
If neither a subsite list or an article ID are supplied, 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, SUBSITEID DESC
would order in descending subsite ID order.
The default sort order is NAME ASC
.
Available sort orders are :
SubsiteID - order by subsite's unique identifier
Name - order by the subsite 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 specified.public boolean getExtensionDataReqd()
public void setExtensionDataReqd(boolean extensionDataReqd)
extensionDataReqd
- true to request extension datapublic void update() throws CSException
CSSubsiteMultiple
.
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 subsites cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSSubsiteMultiple
.
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 subsites cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public boolean exist() throws CSException
CSSubsiteMultiple
.
exist
in class CSItemMultiple
true
if all subsites 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 setSubsiteList
followed by get
to populate this
CSSubsiteMultiple
object with the details of the subsites specified in the list. The retrieved
subsites will appear within CSSubsiteMultiple
in the order that their IDs appear within the
supplied list. Key information set using setSortOrder
,
setMaxRows
and setStartRow
, therefore, is not valid in this
instance.
Use setArticleID
followed by get
to populate this
CSSubsiteMultiple
object with the details of the subsites in which the specified article resides.
The retrieved subsites will be ordered hierarchically. For example, if SUBSITE1 contains SUBSITE2 and SUBSITE3,
and SUBSITE2 in turn contains SUBSITE4 the default ordering will be SUBSITE1, SUBSITE2, SUBSITE4 and SUBSITE3.
The setSortOrder
, setMaxRows
and setStartRow
methods may not be
used in conjunction with setArticleID
method.
If no key information is supplied via either the setSubsiteList
or setArticleID
methods, all subsites defined within iCM will be retrieved. By default, these subsites will be returned in NAME
ASC order. Use the setSortOrder
method to override this default ordering. Use the
setMaxRows
and setStartRow
methods to restrict the number and/or range of subsites
that are retrieved.
Each retrieved subsite is stored as a CSSubsite
object within the item ArrayList
member of
CSSubsiteMultiple
- use getItems
or iterator
to
access/navigate through them.
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 subsites cannot be found on the database.CSSecurityException
- if security has been breached.CSException
- the base class for exceptions thrown by this method.public java.lang.String toString()
CSSubsiteMultiple
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.