public abstract class SuggestHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
dcsStatus
DcsStatus given to SuggestionRecords
|
protected java.lang.String |
dcsStatusNote
dcsStatusNote given to SuggestionRecords
|
protected java.io.File |
recordTemplate
XML File from which suggestionRecords are created
|
protected SchemaHelper |
schemaHelper
Helper providing schema-related functionalities for the framework of the
suggestions
|
| Constructor and Description |
|---|
SuggestHelper(java.io.File recordTemplate,
SchemaHelper schemaHelper)
SuggestHelper Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected static java.lang.String |
getDateStamp()
Return a string for the current time and date, sutiable for display in log
files and output to standout:
|
java.lang.String |
getDestCollection()
Gets the destCollection attribute of the SuggestHelper object
|
java.lang.String |
getEmailFrom()
Gets the emailFrom attribute of the SuggestHelper object
|
java.lang.String[] |
getEmailTo()
Gets the emailTo attribute of the SuggestHelper object
|
java.lang.String |
getMailServer()
Gets the mailServer attribute of the SuggestHelper object
|
WebServiceClient |
getRepositoryServiceClient()
Gets the repositoryServiceClient attribute of the SuggestHelper object,
used to place suggestions in a DCS instance.
|
SchemaHelper |
getSchemaHelper()
Gets the schemaHelper attribute of the SuggestHelper object
|
java.lang.String |
getViewBaseUrl()
Gets the baseUrl of the DCS instance in which suggestions are put.
|
abstract java.lang.String |
getXmlFormat()
Gets the native framework of the suggestionRecords produced by this
Suggestor.
|
abstract SuggestionRecord |
newRecord()
Creates a new
ResourceRecord instance from the recordTemplate
file. |
protected static void |
prtlnErr(java.lang.String s)
Output a line of text to error out, with datestamp.
|
abstract java.lang.String |
putRecordToDCS(SuggestionRecord rec)
Insert a suggested record into the DCS specified by Suggestor's
configuration.
|
void |
setDcsStatus(java.lang.String status)
The dcsStatus that is given to suggested records.
|
void |
setDcsStatusNote(java.lang.String statusNote)
The dcsStatusNote that is given to suggested records.
|
static void |
setDebug(boolean db)
Sets the debug attribute of the SuggestHelper object
|
void |
setDestCollection(java.lang.String collection)
The collection of the DCS in which suggestions are placed.
|
void |
setEmailFrom(java.lang.String address)
Sets the emailFrom attribute of the SuggestHelper object
|
void |
setEmailTo(java.lang.String[] addresses)
Sets the emailTo attribute of the SuggestHelper object
|
void |
setMailServer(java.lang.String mailServer)
Sets the mailServer attribute of the SuggestHelper object
|
void |
setRepositoryServiceClient(WebServiceClient wsc)
The repositoryServiceClient is used to place suggestions in a DCS instance.
|
protected SchemaHelper schemaHelper
protected java.io.File recordTemplate
protected java.lang.String dcsStatus
protected java.lang.String dcsStatusNote
public SuggestHelper(java.io.File recordTemplate,
SchemaHelper schemaHelper)
recordTemplate - template used to create new SuggestRecord instancesschemaHelper - schemaHelper instance for this SuggestHelper's
native frameworkpublic abstract java.lang.String getXmlFormat()
public SchemaHelper getSchemaHelper()
public void setDcsStatus(java.lang.String status)
status - The new dcsStatus valuepublic void setDcsStatusNote(java.lang.String statusNote)
statusNote - The new dcsStatusNote valuepublic void setDestCollection(java.lang.String collection)
collection - The new destCollection valuepublic java.lang.String getDestCollection()
public WebServiceClient getRepositoryServiceClient()
public void setRepositoryServiceClient(WebServiceClient wsc)
wsc - The new repositoryServiceClient valuepublic void setMailServer(java.lang.String mailServer)
mailServer - The new mailServer valuepublic java.lang.String getMailServer()
public void setEmailTo(java.lang.String[] addresses)
addresses - The new emailTo valuepublic java.lang.String[] getEmailTo()
public void setEmailFrom(java.lang.String address)
address - The new emailFrom valuepublic java.lang.String getEmailFrom()
public abstract SuggestionRecord newRecord() throws java.lang.Exception
ResourceRecord instance from the recordTemplate
file.java.lang.Exception - NOT YET DOCUMENTEDpublic abstract java.lang.String putRecordToDCS(SuggestionRecord rec) throws java.lang.Exception
rec - NOT YET DOCUMENTEDjava.lang.Exception - Description of the Exceptionpublic java.lang.String getViewBaseUrl()
public static void setDebug(boolean db)
db - The new debug valueprotected static java.lang.String getDateStamp()
protected static final void prtlnErr(java.lang.String s)
s - The text that will be output to error out.