Project

General

Profile

« Previous | Next » 

Revision 4173

Added by daigle over 16 years ago

Use qualified properties

View differences:

lib/style/common/ClientViewHelper.jspx
24 24
        if (contentType != null && (contentType.indexOf("multipart/form-data") > -1)) {
25 25
            //*** Process request here if a file update.
26 26
            //*** Init the MultipartParser.
27
            sizeLimit = (new Integer(PropertyService.getProperty("datafilesizelimit"))).intValue();
27
            sizeLimit = (new Integer(PropertyService.getProperty("replication.datafilesizelimit"))).intValue();
28 28
            multipartParser = new MultipartParser(request, sizeLimit * 1024 * 1024);
29 29
            message = clientHelper.handleFileUpdate(multipartParser);
30 30
        } else {
lib/style/common/fgdc/ClientViewHelper.jspx
20 20
    </jsp:declaration>
21 21
    
22 22
    <jsp:scriptlet>
23
        sizeLimit = (new Integer(PropertyService.getProperty("datafilesizelimit"))).intValue();
23
        sizeLimit = (new Integer(PropertyService.getProperty("replication.datafilesizelimit"))).intValue();
24 24
        clientHelper = ClientViewHelper.clientViewHelperInstance(request);
25 25
        
26 26
        contentType = request.getContentType();
src/edu/ucsb/nceas/metacat/MetacatReplication.java
73 73
  public void init(ServletConfig config) throws ServletException
74 74
  {
75 75
     //initialize db connections to handle any update requests
76
    //deltaT = util.getProperty("deltaT");
76
    //deltaT = util.getProperty("replication.deltaT");
77 77
    //the default deltaT can be set from metacat.properties
78 78
    //create a thread to do the delta-T check but don't execute it yet
79 79
    replicationDaemon = new Timer(true);
......
1280 1280
                doclist.append("</docid><rev>").append(rs.getInt(2));
1281 1281
                doclist.append("</rev>");
1282 1282
                doclist.append("<datafile>");
1283
                doclist.append(PropertyService.getProperty("datafileflag"));
1283
                doclist.append(PropertyService.getProperty("replication.datafileflag"));
1284 1284
                doclist.append("</datafile>");
1285 1285
                doclist.append("</updatedDocument>");
1286 1286
              }//else
......
1427 1427
            if (recordDoctype.equals("BIN"))
1428 1428
            {
1429 1429
                revDocList.append("<datafile>");
1430
                revDocList.append(PropertyService.getProperty("datafileflag"));
1430
                revDocList.append(PropertyService.getProperty("replication.datafileflag"));
1431 1431
                revDocList.append("</datafile>");
1432 1432
            }
1433 1433
            revDocList.append("</revisionDocument>");
......
1891 1891
	public static void replLog(String message) {
1892 1892
		try {
1893 1893
			FileOutputStream fos = 
1894
				new FileOutputStream(PropertyService.getProperty("application.tomcatDir")
1895
					+ "/logs/metacatreplication.log", true);
1894
				new FileOutputStream(PropertyService.getProperty("replication.logdir")
1895
					+ "/metacatreplication.log", true);
1896 1896
			PrintWriter pw = new PrintWriter(fos);
1897 1897
			SimpleDateFormat formatter = new SimpleDateFormat("yy-MM-dd HH:mm:ss");
1898 1898
			java.util.Date localtime = new java.util.Date();
src/edu/ucsb/nceas/metacat/MetaCatServlet.java
2900 2900
        int sizeLimit = 1000;
2901 2901
        try {
2902 2902
        	sizeLimit = 
2903
        		(new Integer(PropertyService.getProperty("datafilesizelimit"))).intValue();
2903
        		(new Integer(PropertyService.getProperty("replication.datafilesizelimit"))).intValue();
2904 2904
        } catch (PropertyNotFoundException pnfe) {
2905 2905
        	logMetacat.error("Could not determine data file size limit.  Using 1000. " 
2906 2906
        			+ pnfe.getMessage());
src/edu/ucsb/nceas/metacat/ContentTypeProvider.java
78 78
  private static String DEFAULTCONTENTTYPE;
79 79
  static {
80 80
		try {
81
			DEFAULTCONTENTTYPE = PropertyService.getProperty("defaultcontenttype");
81
			DEFAULTCONTENTTYPE = PropertyService.getProperty("replication.defaultcontenttype");
82 82
		} catch (PropertyNotFoundException pnfe) {
83 83
			System.err.println("Could not get property DEFAULTCONTENTTYPE:" 
84 84
					+ pnfe.getMessage());
src/edu/ucsb/nceas/metacat/DocumentImpl.java
2053 2053
                }
2054 2054
                logMetacat.info("final revsion is: " + thisrev);
2055 2055
                boolean useXMLIndex = (new Boolean(PropertyService
2056
                        .getProperty("usexmlindex"))).booleanValue();
2056
                        .getProperty("database.usexmlindex"))).booleanValue();
2057 2057
                if (useXMLIndex) {
2058 2058
                    logMetacat.info("before delete");
2059 2059
                    double start = System.currentTimeMillis()/1000;
......
2440 2440
    
2441 2441
    private static void addDocidToIndexingQueue(String docid, String rev) throws PropertyNotFoundException {
2442 2442
        boolean useXMLIndex =
2443
            (new Boolean(PropertyService.getProperty("usexmlindex"))).booleanValue();
2443
            (new Boolean(PropertyService.getProperty("database.usexmlindex"))).booleanValue();
2444 2444
        if (useXMLIndex) {
2445 2445
            	IndexingQueue.getInstance().add(docid, rev);
2446 2446
        }
......
2816 2816
            logMetacat.info("The time for archiveDocAndNodesRevision is "+(afterArchiveDocAndNode - start));
2817 2817
            // Now delete it from the xml_index table
2818 2818
            boolean useXMLIndex = (new Boolean(PropertyService
2819
                    .getProperty("usexmlindex"))).booleanValue();
2819
                    .getProperty("database.usexmlindex"))).booleanValue();
2820 2820

  
2821 2821

  
2822 2822

  
src/edu/ucsb/nceas/metacat/ReplicationHandler.java
1014 1014
			// Check if the vector w contain "datafile"
1015 1015
			// If it has, this document is data file
1016 1016
			try {
1017
				if (w.contains((String) PropertyService.getProperty("datafileflag"))) {
1017
				if (w.contains((String) PropertyService.getProperty("replication.datafileflag"))) {
1018 1018
					dataFile = true;
1019 1019
				}
1020 1020
			} catch (PropertyNotFoundException pnfe) {
src/edu/ucsb/nceas/metacat/DBQuery.java
286 286
                                       String user, String[] groups,
287 287
                                       String sessionid) throws PropertyNotFoundException
288 288
  {
289
    boolean useXMLIndex = (new Boolean(PropertyService.getProperty("usexmlindex")))
289
    boolean useXMLIndex = (new Boolean(PropertyService.getProperty("database.usexmlindex")))
290 290
               .booleanValue();
291 291
    findDocuments(response, out, params, user, groups, sessionid, useXMLIndex);
292 292

  
......
1594 1594
            // Also ignore parameters listed in the properties file
1595 1595
            // so that they can be passed through to stylesheets
1596 1596
            String paramsToIgnore = PropertyService
1597
                    .getProperty("query.ignored.params");
1597
                    .getProperty("database.queryignoredparams");
1598 1598
            StringTokenizer st = new StringTokenizer(paramsToIgnore, ",");
1599 1599
            while (st.hasMoreTokens()) {
1600 1600
                ignoredParams.add(st.nextToken());

Also available in: Unified diff