Examples of WGCSSJSModule


Examples of de.innovationgate.webgate.api.WGCSSJSModule

        if (_origin != ORIGIN_SCRIPT_MODULE) {
            return true;
        }
       
        try {
            WGCSSJSModule mod = retrieveModule(context);
            if (mod != null) {
                return mod.getLastModified().equals(getModuleDate());
            }
            else {
                return false;
            }
        }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGCSSJSModule

            }
            if (!designDB.isSessionOpen()) {
                throw new TMLActionException("Could not open design db '" + designDB.getDbReference() + "' to load tmlscript action module, because  you have no access.");
            }
           
            WGCSSJSModule mod = designDB.getCSSJSModule(id, WGScriptModule.CODETYPE_TMLSCRIPT);
            if (mod == null) {
                return null;
            }
           
            TMLAction action =  TMLAction.buildActionFromScriptModule(mod);
View Full Code Here

Examples of de.innovationgate.webgate.api.WGCSSJSModule

            }
        }

        // Deploy script modules
        Iterator scripts = getDB().getCSSJSModules().iterator();
        WGCSSJSModule script;
        while (scripts.hasNext()) {
            script = (WGCSSJSModule) scripts.next();
            if (isValidDesignName(script.getName())) {
                initialDeployScriptModule(script);
            }
            else {
                _log.warn("Could not use '" + script.getDocumentKey() + "' for design deployment since the name contains invalid characters");
            }
        }

        // Create sync info and store it to directory
        _syncInfo = new DesignDefinition();
View Full Code Here

Examples of de.innovationgate.webgate.api.WGCSSJSModule

        }       
    }
   
   
    private WGCSSJSModule retrieveModule(WGHierarchicalDatabaseEvent event) throws WGAPIException {
        WGCSSJSModule module = event.getDb().getWrappedDB().getScriptModule(_moduleName, WGScriptModule.CODETYPE_TMLSCRIPT);
        if (module == null) {
            throw new WGIllegalArgumentException("Cannot find listener module '" + _moduleName + "'.");
        } else {
            return module;
        }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGCSSJSModule

       
       
        ScriptMetadata metaData = (ScriptMetadata) readMetaData();
        String code = readCode(metaData);
       
        WGCSSJSModule mod = (WGCSSJSModule) db.getDocumentByDocumentKey(getDocumentKey());
        if (mod == null) {
            WGDocumentKey key = new WGDocumentKey(getDocumentKey());
            mod = db.createCSSJSModule(key.getName(), getCodeType());
        }
        mod.setCode(code);
        metaData.writeToDocument(mod);
        doSaveDocument(mod);
       
        resetUpdateInformation();
View Full Code Here

Examples of de.innovationgate.webgate.api.WGCSSJSModule

        _syncStatus = new DesignSyncStatus(this, getBaseFolder().getURL().toString());
    }

    private boolean importSyncStatus() throws IOException, WGAPIException, WGDesignSyncException {
       
        WGCSSJSModule mod = _db.getMetadataModule(SYNCSTATUS_MODULE);
        if (mod == null) {
            return false;
        }
        
        _syncStatus = (DesignSyncStatus) _xstream.fromXML(mod.getCode());
        _syncStatus.setManager(this);
        if (_syncStatus.getBasePath().equals(getBaseFolder().getURL().toString())) {
            return true;
        }
        else {
View Full Code Here

Examples of de.innovationgate.webgate.api.WGCSSJSModule

       
        if (!getSyncMode().equals(MODE_FULL)) {
            return;
        }
       
        WGCSSJSModule mod = _db.getMetadataModule(SYNCSTATUS_MODULE);
        if (mod == null) {
            mod = _db.createMetadataModule(SYNCSTATUS_MODULE);
            mod.setDescription("Module used internally by WGA to store the current status of design synchronisation.");
        }    
   
        mod.setCode(_xstream.toXML(_syncStatus));
        mod.save();
        
    }
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.