public class CSPublishedEndpoint extends CSItem
The CSPublishedEndpoint
class includes methods for the retrieval of a particular endpoint worker's details.
All such methods require that certain database and key information (endpoint ID, for example) be specified via the
set
methods provided, prior to their invocation.
All database access/connectivity is handled internally by the CSPublishedEndpoint
class.
CSPublishedEndpointContent
,
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 |
---|
CSPublishedEndpoint()
Creates an empty
CSPublishedEndpoint object. |
CSPublishedEndpoint(java.lang.String strPropertyFile)
Creates a new
CSPublishedEndpoint object, specifying a property file that contains all of the required database
connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSPublishedEndpoint . |
void |
get()
Retrieves the details of an end point from the database.
|
java.util.Date |
getDateTimePublished()
Gets the date time the worker was published.
|
java.lang.String |
getDescription()
Gets the description of the endpoint worker.
|
boolean |
getDev()
Whether the endpoint is in development mode.
|
java.lang.String |
getDocumentation()
Gets the documentation of the endpoint worker.
|
int |
getEndpointID()
Gets the endpoint worker ID currently specified as key information.
|
boolean |
getInternalOnly()
Whether the endpoint is internal only.
|
java.lang.String |
getName()
Gets the name of the endpoint worker.
|
java.lang.String |
getNamespace()
Gets the namespace of the endpoint worker.
|
java.lang.String |
getParamsSchema()
Gets the params schema of the endpoint worker.
|
int |
getPublishedByID()
Gets the the ID of the user who last published the endpoint.
|
java.lang.String |
getReturnSchema()
Gets the return schema of the endpoint worker.
|
java.lang.String |
getSource()
Gets the source of the endpoint worker.
|
boolean |
getTracing()
Whether the endpoint has tracing enabled.
|
java.lang.String |
getUnitTestSource()
Gets the unit test source of the endpoint worker.
|
boolean |
getValidateParams()
Whether the endpoint should validate its parameters against a schema.
|
boolean |
getValidateReturn()
Sets whether the endpoint should validate its response against a schema.
|
int |
getVersionMajor()
Gets the major version of the endpoint.
|
int |
getVersionMinor()
Gets the minor version of the endpoint.
|
void |
setDateTimePublished(java.sql.Timestamp dateTimePublished)
Sets the date time the worker was published.
|
void |
setDescription(java.lang.String endpointDescription)
Sets the description of the endpoint worker.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setDev(boolean dev)
Sets whether the endpoint is in development mode.
|
void |
setDocumentation(java.lang.String documentation)
Sets the endpoint worker documentation.
|
void |
setEndpointID(int endpointID)
Sets the endpoint worker ID to be used as key information.
|
void |
setInternalOnly(boolean internalOnly)
Sets whether the endpoint is internal only.
|
void |
setName(java.lang.String endpointName)
Sets the name of the endpoint worker.
|
void |
setNamespace(java.lang.String namespace)
Sets the endpoint worker namespace.
|
void |
setParamsSchema(java.lang.String paramsSchema)
Sets the endpoint worker params schema.
|
void |
setPublishedByID(int publishedByID)
Sets the endpoint worker ID.
|
void |
setReturnSchema(java.lang.String returnSchema)
Sets the endpoint worker return schema.
|
void |
setSource(java.lang.String source)
Sets the endpoint worker source.
|
void |
setTracing(boolean tracing)
Sets whether the endpoint has tracing enabled.
|
void |
setUnitTestSource(java.lang.String unitTestSource)
Sets the endpoint worker unit test source.
|
void |
setValidateParams(boolean validateParams)
Sets whether the endpoint should validate its parameters against a schema.
|
void |
setValidateReturn(boolean validateReturn)
Sets whether the endpoint should validate its response against a schema.
|
void |
setVersionMajor(int versionMajor)
Sets the major version of the endpoint.
|
void |
setVersionMinor(int versionMinor)
Sets the minor version of the endpoint.
|
java.lang.String |
toString()
Provides debug information on the contents of the
CSPublishedEndpoint object. |
void |
update()
Not currently implemented for
CSPublishedEndpoint . |
equals, exist, getID, getStatus, hashCode, jsonString, serialiseWithTypes, setID, setStatus, 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 CSPublishedEndpoint()
CSPublishedEndpoint
object.
Use the various set
methods provided to initialise the CSPublishedEndpoint
object prior to
invoking any of its query methods.
public CSPublishedEndpoint(java.lang.String strPropertyFile)
CSPublishedEndpoint
object, specifying a property file that contains all of the required database
connection details.
Use the various set methods provided to initialise the CSPublishedEndpoint
object prior to invoking any of its
query manipulation methods.
strPropertyFile
- the property file that contains the connection details.public int getEndpointID()
public void setEndpointID(int endpointID)
setEndpointWorkerID
followed by a call to get
will return details of the
endpoint worker with the specified endpoint worker ID.
endpointID
- the integer ID of the endpoint worker to be retrieved.public java.lang.String getName()
String
object.public void setName(java.lang.String endpointName)
setName
followed by a call to get
will return details of the
endpoint worker with the specified endpoint worker name.
endpointName
- the endpoint worker's name as a String
object.public java.lang.String getDescription()
String
object.public void setDescription(java.lang.String endpointDescription)
endpointDescription
- the endpoint worker's description as a String
object.public int getPublishedByID()
public void setPublishedByID(int publishedByID)
publishedByID
- Sets the ID of the user who last published the endpoint.public int getVersionMinor()
public void setVersionMinor(int versionMinor)
versionMinor
- the minor version of the endpoint.public int getVersionMajor()
public void setVersionMajor(int versionMajor)
versionMajor
- The major version of the endpoint.public boolean getDev()
public void setDev(boolean dev)
dev
- Whether the endpoint is in development mode.public boolean getInternalOnly()
public void setInternalOnly(boolean internalOnly)
internalOnly
- Whether the endpoint is internal only.public boolean getTracing()
public void setTracing(boolean tracing)
tracing
- Whether the endpoint has tracing enabled.public boolean getValidateParams()
public void setValidateParams(boolean validateParams)
validateParams
- Whether the endpoint should validate its parameters against a schema.public boolean getValidateReturn()
public void setValidateReturn(boolean validateReturn)
validateReturn
- Whether the endpoint should validate its response against a schema.public java.lang.String getNamespace()
public void setNamespace(java.lang.String namespace)
setNamespace
followed by a call to get
will return details of the
endpoint worker with the specified endpoint worker name.
namespace
- the namespace of the endpoint worker.public java.lang.String getSource()
public void setSource(java.lang.String source)
source
- the source of the endpoint worker.public java.lang.String getDocumentation()
public void setDocumentation(java.lang.String documentation)
documentation
- the documentation of the endpoint worker.public java.lang.String getParamsSchema()
public void setParamsSchema(java.lang.String paramsSchema)
paramsSchema
- the params schema of the endpoint worker.public java.lang.String getReturnSchema()
public void setReturnSchema(java.lang.String returnSchema)
returnSchema
- the return schema of the endpoint worker.public java.lang.String getUnitTestSource()
public void setUnitTestSource(java.lang.String unitTestSource)
unitTestSource
- the unit test source of the endpoint worker.public java.util.Date getDateTimePublished()
public void setDateTimePublished(java.sql.Timestamp dateTimePublished)
dateTimePublished
- the date time the worker was published.public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method.
Valid detail levels for a published end point are:
LEVEL_ID
Retrieves only the EndpointID and the DateTimePublished.
LEVEL_SUMMARY
Retrieves everything in previous detail levels, plus metadata such as Name, Namespace, VersionMajor,
Description, Enabled, Dev, InternalOnly, Tracing, and PublishedByID.
LEVEL_DETAIL
Retrieves everything in previous detail levels, plus the Source, ParamsSchema, and ReturnSchema.
LEVEL_ALL
Retrieves all end point data, including Documentation and UnitTestSource.
setDetailLevel
in class CSDatabaseItem
nDetailLevel
- the detail level to be used.CSParameterException
- if an invalid detail level is specified.public void get() throws CSException
Use setEndpointWorkerID
or
setName
followed by get
to populate this CSPublishedEndpoint
object with the details of the endpoint worker identified by the specified ID or name.
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 attribute cannot be found on the database.CSSecurityException
- if security has been breached.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSPublishedEndpoint
.
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 attributes cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void update() throws CSException
CSPublishedEndpoint
.
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 attributes cannot be found on the database.CSException
- the base class for exceptions thrown by this method.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.