Examples of WGDocument


Examples of de.innovationgate.webgate.api.WGDocument

        Set deletions = new HashSet();
        Iterator keys = documentKeys.iterator();
        while (keys.hasNext()) {
            String documentKey = (String) keys.next();
            // check if doc exists in db
            WGDocument document = getDb().getDocumentByDocumentKey(documentKey);
            if (document == null) {
                // document does not exists in db --> add to deletions
                deletions.add(documentKey);
            }
        }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGDocument

      TMLContext.MasterAction masterAction = new TMLContext.MasterAction(context, TMLAction.DEFAULTACTION_ATTACH, new ArrayList());
      masterAction.start();
      context.getdocument().getDatabase().reopenSession();
    }
    else {
      WGDocument doc = context.getdocument();

            tmlForm.attach(doc);

      doc.save();
    }
    
   
    return new Boolean(true);
  }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGDocument

    }

  public String getpath() throws WGAPIException {

    StringBuffer path = new StringBuffer();
    WGDocument doc = getdocument();
       
    path.append("db:" + doc.getDatabase().getAttribute(WGACore.DBATTRIB_DBKEY));

    switch (doc.getType()) {

      case WGDocument.TYPE_CONTENT :
        if (!getcontent().isDummy()) {
          path.append("/docid:" + getcontent().getContentKey().toString());
        }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGDocument

                    addwarning("Unknown design db: " + dbKey);
                    return null;
                }
               
                // first try - lookup file container of designDB or explicit given db
                WGDocument container = designDB.getFileContainer(containerName);
                if (container == null) {
                  // second try - lookup file container in current context db
                  container = db().getFileContainer(containerName);
                 
                  if (container == null) {
                    // third try - use container name as key and try to find a content document
                    container = WGPDispatcher.getContentByAnyKey(containerName, db(), new WebTMLLanguageChooser(db(), this), isbrowserinterface());
                  }
                }
               
                if (container != null) {
                fileIn = container.getFileData(fileName);
                fileSize = container.getFileSize(fileName);
                } else {
                  addwarning("No file container or content found for '" + containerName + "'.");
                    return null;
                }
               
View Full Code Here

Examples of de.innovationgate.webgate.api.WGDocument

        _log.info("Finished cloning areas, struct entries and contents");

    }

    private WGDocument createDumpClone(WGDocument doc, WGDocument ref) throws WGAPIException {
       WGDocument clone = doc.createClone(_to, ref);
       clone.saveWithGivenTimestamps(doc.getCreated(), doc.getLastModified());
       return clone;
       
    }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGDocument

    public String getDocumentKey() {
        return _documentKey;
    }

    public void performDeletion(WGDatabase db) throws WGException {
        WGDocument doc = getDocument(db);
        if (doc != null) {
            doc.remove();
        }
    }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGDocument

import de.innovationgate.wgpublisher.webtml.utils.TMLContext;

public class NativeExpressionEngine implements ExpressionEngine {
  public ExpressionResult evaluateExpression(String expression, TMLContext context, int type, Map objects) {
   
    WGDocument doc = context.getapiobject();
    if (!doc.getDatabase().hasFeature(WGDatabase.FEATURE_NATIVEEXPRESSIONS)) {
      return new ExpressionResult(null, false, false, new WGExpressionException("This database does not support native expressions", expression));
    }
   
    Object result = null;
   
    try {
      result = doc.evaluateExpression(expression);
    }        
        catch (WGExpressionException e) {
            return new ExpressionResult(null, false, true, e);
        }
        catch (WGAPIException e) {
            return new ExpressionResult(null, false, true, new WGExpressionException(e.getMessage(), expression, e));
        }
    return new ExpressionResult(result, doc.resultIsTrue(result), doc.resultIsFalse(result), null);
   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.