Skip to content
Snippets Groups Projects
Commit e2a6b699 authored by Robert Butora's avatar Robert Butora
Browse files

config: renames Search-servlet config-file discovery.properties -> search.properties

parent 402cd807
No related branches found
No related tags found
No related merge requests found
......@@ -3,13 +3,13 @@ DBMS ?= localhost # localhost | pasquale | pasquale-devel
AUTH ?= # ia2token | garrtoken | <empty>
################################################################
all: formatresponsefilter.properties authpolicy.properties web.xml discovery.properties
all: formatresponsefilter.properties authpolicy.properties web.xml search.properties
web.xml:
cd web-xml && cat web.xml-begining web.xml-format-filter web.xml-$(AUTH)-filter web.xml-authorization-filter web.xml-servlets web.xml-ending > ../web.xml
discovery.properties: discovery.properties.in
cat dbms.conf-$(DBMS) discovery.properties.in > $@
search.properties: dbms.conf-$(DBMS)
cp dbms.conf-$(DBMS) $@
formatresponsefilter.properties: formatresponsefilter.properties.in
cat dbms.conf-$(DBMS) formatresponsefilter.properties.in > $@
......@@ -19,4 +19,4 @@ authpolicy.properties: dbms.conf-$(DBMS)
.PHONY:
clean:
-rm -f formatresponsefilter.properties authpolicy.properties discovery.properties web.xml
-rm -f formatresponsefilter.properties authpolicy.properties search.properties web.xml
# database with 'surveys' table of metadata used to write VLKB-legacy response.xml
#db_uri=jdbc:postgresql://localhost:5432/vialactea
#db_schema=datasets
#db_user_name=vialactea
#db_password=IA2lbt09
......@@ -23,7 +23,6 @@ import java.lang.ClassNotFoundException;
public class DbPSearch
{
private static final Logger LOGGER = Logger.getLogger(DbPSearch.class.getName());
//private static final SearchSettings.DBConn dbConn = SearchSettings.getInstance("discovery.properties").dbConn;
private DBConn dbConn;
//private static final String DB_DRIVER = "org.postgresql.Driver";
......
......@@ -21,7 +21,7 @@ import javax.servlet.http.HttpServletResponse;
public class SearchServlet extends javax.servlet.http.HttpServlet
{
private static final Logger LOGGER = Logger.getLogger("PSearch");
private static final SearchSettings settings = SearchSettings.getInstance("discovery.properties");
private static final SearchSettings settings = SearchSettings.getInstance("search.properties");
public void init() throws ServletException
......
......@@ -30,12 +30,12 @@ then
fi
echo "<Context docBase=\"$WEBAPP_DIR/vlkb-search\"/>" > /var/lib/tomcat9/conf/Catalina/localhost/$DISCOVERY_CONTEXT_ROOT.xml
echo "db_uri=$DISCOVERY_DB_URI" > $WEBAPP_DIR/vlkb-search/WEB-INF/classes/discovery.properties
echo "db_schema=datasets" >> $WEBAPP_DIR/vlkb-search/WEB-INF/classes/discovery.properties
echo "db_user_name=$DB_USERNAME" >> $WEBAPP_DIR/vlkb-search/WEB-INF/classes/discovery.properties
echo "db_password=$DB_PASSWORD" >> $WEBAPP_DIR/vlkb-search/WEB-INF/classes/discovery.properties
echo "db_uri=$DISCOVERY_DB_URI" > $WEBAPP_DIR/vlkb-search/WEB-INF/classes/search.properties
echo "db_schema=datasets" >> $WEBAPP_DIR/vlkb-search/WEB-INF/classes/search.properties
echo "db_user_name=$DB_USERNAME" >> $WEBAPP_DIR/vlkb-search/WEB-INF/classes/search.properties
echo "db_password=$DB_PASSWORD" >> $WEBAPP_DIR/vlkb-search/WEB-INF/classes/search.properties
# use the same DB for authz permissions (ObsCore with extensions)
cp $WEBAPP_DIR/vlkb-search/WEB-INF/classes/discovery.properties $WEBAPP_DIR/vlkb-search/WEB-INF/classes/authpolicy.properties
cp $WEBAPP_DIR/vlkb-search/WEB-INF/classes/search.properties $WEBAPP_DIR/vlkb-search/WEB-INF/classes/authpolicy.properties
if test -n "$RESPONSE_FORMAT"
then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment