DLESE Tools
v1.6.0

org.dlese.dpc.suggest.comment
Class SuggestCommentHelper

java.lang.Object
  extended by org.dlese.dpc.suggest.SuggestHelper
      extended by org.dlese.dpc.suggest.comment.SuggestCommentHelper

public class SuggestCommentHelper
extends SuggestHelper

Provides services for SuggestComment Client.

Author:
Jonathan Ostwald

Field Summary
protected  WebServiceClient searchServiceClient
          NOT YET DOCUMENTED
protected  String searchServiceUrl
          NOT YET DOCUMENTED
 
Fields inherited from class org.dlese.dpc.suggest.SuggestHelper
dcsStatus, dcsStatusNote, recordTemplate, schemaHelper
 
Constructor Summary
SuggestCommentHelper(File recordTemplate, SchemaHelper schemaHelper)
          SuggestCommentHelper Constructor.
 
Method Summary
 Map getItemRecordProps(String id)
          Gets the itemRecordProps attribute of the SuggestCommentHelper object
 WebServiceClient getSearchServiceClient()
          Gets the searchServiceClient attribute of the SuggestCommentHelper object
 String getXmlFormat()
          Gets the xmlFormat attribute of the SuggestCommentHelper object
 CommentRecord newRecord()
          Creates a new ResourceRecord instance by reading from the recordTemplate.
 String putRecordToDCS(SuggestionRecord rec)
          Insert a suggested record into the DCS specified by client configuration.
static void setDebug(boolean db)
          Sets the debug attribute of the SuggestCommentHelper object
 void setSearchServiceClient(WebServiceClient wsc)
          Sets the searchServiceClient attribute of the SuggestCommentHelper object
 
Methods inherited from class org.dlese.dpc.suggest.SuggestHelper
getDateStamp, getDestCollection, getEmailFrom, getEmailTo, getMailServer, getRepositoryServiceClient, getSchemaHelper, getViewBaseUrl, prtlnErr, setDcsStatus, setDcsStatusNote, setDestCollection, setEmailFrom, setEmailTo, setMailServer, setRepositoryServiceClient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

searchServiceUrl

protected String searchServiceUrl
NOT YET DOCUMENTED


searchServiceClient

protected WebServiceClient searchServiceClient
NOT YET DOCUMENTED

Constructor Detail

SuggestCommentHelper

public SuggestCommentHelper(File recordTemplate,
                            SchemaHelper schemaHelper)
SuggestCommentHelper Constructor. The repositoryDir param points to a directory that contains a default record (used for making new records), and a records directory (where suggested urls are stored). This stuff is all hard coded for now, but properties can be used to supply defaults (see org.dlese.dpc.suggest.SuggestCommentHelper).

Parameters:
recordTemplate - NOT YET DOCUMENTED
schemaHelper - NOT YET DOCUMENTED
Method Detail

getXmlFormat

public String getXmlFormat()
Gets the xmlFormat attribute of the SuggestCommentHelper object

Specified by:
getXmlFormat in class SuggestHelper
Returns:
The xmlFormat value

newRecord

public CommentRecord newRecord()
                        throws Exception
Creates a new ResourceRecord instance by reading from the recordTemplate. We don't call readRecord (file) because we don't want the id to be set for the new record

Specified by:
newRecord in class SuggestHelper
Returns:
Description of the Return Value
Throws:
Exception - NOT YET DOCUMENTED

getItemRecordProps

public Map getItemRecordProps(String id)
                       throws Exception
Gets the itemRecordProps attribute of the SuggestCommentHelper object

Parameters:
id - NOT YET DOCUMENTED
Returns:
The itemRecordProps value
Throws:
Exception - NOT YET DOCUMENTED

putRecordToDCS

public String putRecordToDCS(SuggestionRecord rec)
                      throws Exception
Insert a suggested record into the DCS specified by client configuration.

Specified by:
putRecordToDCS in class SuggestHelper
Parameters:
rec - NOT YET DOCUMENTED
Returns:
ID of record in destination DCS
Throws:
Exception - Description of the Exception

getSearchServiceClient

public WebServiceClient getSearchServiceClient()
Gets the searchServiceClient attribute of the SuggestCommentHelper object

Returns:
The searchServiceClient value

setSearchServiceClient

public void setSearchServiceClient(WebServiceClient wsc)
Sets the searchServiceClient attribute of the SuggestCommentHelper object

Parameters:
wsc - The new searchServiceClient value

setDebug

public static void setDebug(boolean db)
Sets the debug attribute of the SuggestCommentHelper object

Parameters:
db - The new debug value

DLESE Tools
v1.6.0