public class CSTemplateImage extends CSItem
The CSTemplateImage
class includes methods for the retrieval of a particular image's details. It also
provides a method that checks for the existence of an image for a particular template. All such methods require that
certain database and key information (template ID, for example) be specified via the set
methods
provided, prior to their invocation.
All database access/connectivity is handled internally by the CSTemplateImage
class.
CSTemplate
,
Serialized FormACCESS_GRANTED, DOES_NOT_EXIST, EMPTY, EXISTS, SECURE_ACCESS_DENIED, SECURE_ACCESS_GRANTED, UPDATE_ACTION_INSERTED, UPDATE_ACTION_UPDATED
LEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSTemplateImage()
Creates an empty
CSTemplateImage object. |
CSTemplateImage(java.lang.String strPropertyFile)
Creates an empty
CSTemplateImage 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
CSTemplateImage . |
boolean |
exist()
Checks to see whether a template image exists on the database.
|
void |
get()
Retrieves the details of a template image from the database.
|
java.lang.String |
getDescription()
Gets the image description.
|
int |
getDisplayOrder()
Gets the image display order position.
|
java.lang.String |
getFilename()
Gets the image filename.
|
int |
getSubsiteID()
Gets the ID of the subsite.
|
int |
getTemplateID()
Gets the ID of the template.
|
void |
setDescription(java.lang.String description)
Sets the image description.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setDisplayOrder(int displayOrder)
Sets the image display order position.
|
void |
setFilename(java.lang.String filename)
Sets the image filename.
|
void |
setSubsiteID(int nSubsiteID)
Sets the ID of the subsite to be used as key information.
|
void |
setTemplateID(int nTemplateID)
Sets the ID of the template to be used as key information.
|
void |
update()
Not currently implemented for
CSTemplateImage . |
equals, getID, getStatus, hashCode, jsonString, serialiseWithTypes, setID, setStatus, toString, unset
clearRecordedGatewayMessages, clone, count, getCache, getCachingEnabled, getDatabaseVersion, getDatabaseVersion, getDebugOutput, getDetailLevel, getPreview, getPropertyFile, getPropertyFileExtension, getPropertyFilePathname, getRecordedGatewayMessages, getRecordGatewayMessages, getSendGatewayMessages, getUseCache, setDebugOutput, setPreview, setPropertyFile, setRecordGatewayMessages, setSendGatewayMessages, setUseCache
public CSTemplateImage()
CSTemplateImage
object.
Use the various set methods provided to initialise the CSTemplateImage
object prior to invoking
any of its query methods.
public CSTemplateImage(java.lang.String strPropertyFile)
CSTemplateImage
object, specifying a property file that contains all of the
database connection details.
Use the various set methods provided to initialise the CSTemplateImage
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 final void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method.
Valid detail levels for an asset are :
LEVEL_ALL
- all details are processedsetDetailLevel
in class CSDatabaseItem
nDetailLevel
- the detail level to be used.CSParameterException
- if an invalid detail level is specified.public final void setTemplateID(int nTemplateID)
setTemplateID
, setSubsiteID
and setFilename
followed by a call to
exist
will determine whether a template image of that filename exists for the specified
template and subsite.
setTemplateID
, setSubsiteID
and setFilename
followed by a call to
get
will populate this CSTemplateImage
instance with details of
the specified image for the specified template and subsite.
nTemplateID
- the numeric identifier of the template.public final int getTemplateID()
public final void setSubsiteID(int nSubsiteID)
Use a subsite ID value greater than zero to identify a specific subsite. To identify the
enterprise site, specify a subsite ID value of zero. A subsite ID value of -1
may
be used to denote the default settings for all subsites.
setSubsiteID
, setTemplateID
and setFilename
followed by a call to
exist
will determine whether an image of that name exists for the specified
template and subsite.
setSubsiteID
, setTemplateID
and setFilename
followed by a call to
get
will populate this CSTemplateImage
instance with details of
the specified image for the specified template and subsite.
nSubsiteID
- the numeric identifier of the subsite.public final int getSubsiteID()
public java.lang.String getFilename()
/media/templateimages&0
folder.public void setFilename(java.lang.String filename)
/media/templateimages&0
folder.filename
- the image filename to setpublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- the image description to setpublic int getDisplayOrder()
public void setDisplayOrder(int displayOrder)
displayOrder
- the display order position to setpublic final boolean exist() throws CSException
Use setTemplateID
, setSubsiteID
and setFileame
followed by exist
to check for the existence of an image with a particular filename for the specified template.
exist
in class CSItem
true
if the image exists on the database, false
otherwise.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 final void get() throws CSException
Use setTemplateID
, setSubsiteID
and setFilename
followed by get
to populate this CSTemplateImage
instance with the details of a particular
template image.
Use the setDetailLevel
method to determine the exact information that is retrieved and stored within
this CSTemplateImage
instance.
get
in class CSItem
CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSNotFoundException
- if the specified template cannot be found on the database.CSSecurityException
- if security has been breached.CSException
- the base class for exceptions thrown by this method.public final void update() throws CSException
CSTemplateImage
.update
in class CSItem
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 items cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public final void delete() throws CSException
CSTemplateImage
.delete
in class CSItem
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 items cannot be found on the database.CSException
- the base class for exceptions thrown by this method.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.