Package com.dbxml.db.client.local

Examples of com.dbxml.db.client.local.CollectionClientImpl


      int idx = path.lastIndexOf('/');
      String colName = path.substring(0, idx);
      String docName = path.substring(idx + 1);

      try {
         CollectionClientImpl col = (CollectionClientImpl)client.getCollection(colName);
         if ( col == null )
            throw new CompilationException("Template Collection '" + colName + "' not found");

         RecordMetaData meta = col.getInternalCollection().getRecordMetaData(tx, new Key(docName));
         long lastModified = System.currentTimeMillis();
         if ( meta != null ) {
            Long lm = (Long)meta.getValue(RecordMetaData.MODIFIED);
            if ( lm != null )
               lastModified = lm.longValue();
         }

         TemplatesInfo info = (TemplatesInfo)cache.get(path);
         if ( info == null || info.lastModified != lastModified ) {
            Document doc = col.getDocument(docName);
            String systemID = URL_PREFIX+colName+"/"+docName;
            Source src = new DOMSource(doc, systemID);
            Templates t = tf.newTemplates(src);

            info = new TemplatesInfo(path, lastModified, t);
View Full Code Here

TOP

Related Classes of com.dbxml.db.client.local.CollectionClientImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.