Esri Geoportal Server
1.0

com.esri.gpt.catalog.search
Class GptRepository

java.lang.Object
  extended by com.esri.gpt.framework.sql.BaseDao
      extended by com.esri.gpt.catalog.search.GptRepository
All Implemented Interfaces:
ISearchSaveRepository

public class GptRepository
extends BaseDao
implements ISearchSaveRepository

The Class GptRepository. Object that communicates with the Gpt repository for the search classes .


Constructor Summary
GptRepository()
           
 
Method Summary
 void delete(Object id, User user)
          Delete a search
protected  Connection getConnection()
          Gets the connection.
 RequestContext getRequestContext()
          Gets the request context
 SavedSearchCriterias getSavedList(User user)
          Gets the saved list.
 SearchCriteria getSearchCriteria(Object id, User user)
          Gets search criteria object
 HrRecord readHarvestRecord(String rid, RequestContext context)
          Read harvest record.
 Map<String,HrRecord> readHarvestRecords(StringSet rids, RequestContext context)
          Read harvest records.
 void save(SavedSearchCriteria savedCriteria)
          Saves the criteria
 void save(String name, String restCriteria, User user)
          Saves the criteria
 
Methods inherited from class com.esri.gpt.framework.sql.BaseDao
appendExpression, appendValueFilter, closeResultSet, closeStatement, getApplicationConfiguration, logExpression, returnConnection, setRequestContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GptRepository

public GptRepository()
Method Detail

delete

public void delete(Object id,
                   User user)
            throws SearchException
Delete a search

Specified by:
delete in interface ISearchSaveRepository
Parameters:
id - associated with the saved search
user - associated with the saved search
Throws:
SearchException

getSavedList

public SavedSearchCriterias getSavedList(User user)
                                  throws SearchException
Description copied from interface: ISearchSaveRepository
Gets the saved list.

Specified by:
getSavedList in interface ISearchSaveRepository
Parameters:
user - associated with the saved search
Returns:
List of criterias
Throws:
SearchException

getSearchCriteria

public SearchCriteria getSearchCriteria(Object id,
                                        User user)
                                 throws SearchException
Gets search criteria object

Specified by:
getSearchCriteria in interface ISearchSaveRepository
Parameters:
id - of the search criteria
user - associated with the saved search
Returns:
SearchCriteria queried
Throws:
SearchException

save

public void save(SavedSearchCriteria savedCriteria)
          throws SearchException
Saves the criteria

Specified by:
save in interface ISearchSaveRepository
Parameters:
savedCriteria - Object with the search to be saved
Throws:
SearchException

save

public void save(String name,
                 String restCriteria,
                 User user)
          throws SearchException
Saves the criteria

Specified by:
save in interface ISearchSaveRepository
Parameters:
savedCriteria - Object with the search to be saved
Throws:
SearchException

getConnection

protected Connection getConnection()
                            throws SearchException,
                                   SQLException
Gets the connection.

Returns:
the connection (never null)
Throws:
SearchException - the search exception
SQLException - the SQL exception

getRequestContext

public RequestContext getRequestContext()
Gets the request context

Overrides:
getRequestContext in class BaseDao
Returns:
RequestContext for this Request

readHarvestRecord

public HrRecord readHarvestRecord(String rid,
                                  RequestContext context)
                           throws SearchException
Read harvest record. Will update uuid, url, profile, protocol and name

Parameters:
rid - repository id
context - the request context
Returns:
the hr record
Throws:
SearchException - the search exception

readHarvestRecords

public Map<String,HrRecord> readHarvestRecords(StringSet rids,
                                               RequestContext context)
                                        throws SearchException
Read harvest records.

Parameters:
rids - the rids
context - the context
Returns:
the map between rid and hrRecord (never null)
Throws:
SearchException - the search exception

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.