Package de.innovationgate.wgpublisher.expressions.tmlscript

Examples of de.innovationgate.wgpublisher.expressions.tmlscript.TMLScriptGlobal


        }
   
        core.getLog().info("Initializing HDB model for database " + db.getDbReference());
        HDBModel model = new HDBModel(core, db, system);
        db.setAttribute(WGACore.DBATTRIB_HDBMODEL, model);
        core.getTmlscriptGlobalRegistry().registerDBGlobal(new TMLScriptGlobal(HDBMODEL_GLOBAL, TMLScriptGlobal.TYPE_OBJECT, model), db);
       
   
    }
View Full Code Here


        Design design = unwrapThisObj(thisObj);
       
        Arguments arguments = _getGlobalArgs.parse(args);
       
        TMLContext context = WGAGlobal.fetchInitialContext(cx);
        TMLScriptGlobal global =  context.getwgacore().getTmlscriptGlobalRegistry().getGlobal((String) arguments.get("global"), design._designContext.getDesignDB());
        if (global != null) {
            return TMLScriptRootScope.provideGlobal(global, thisObj);
        }
        else {
            return null;
View Full Code Here

        String name = (String) parsedArgs.get("name");
        Object ref = parsedArgs.get("ref");
       
        // Register name against package or class name
        if (ref instanceof String) {
            context.getwgacore().getTmlscriptGlobalRegistry().registerGlobal(new TMLScriptGlobal(name, TMLScriptGlobal.TYPE_PACKAGE_OR_CLASS, ref));
        }
        else {
            context.getwgacore().getTmlscriptGlobalRegistry().registerGlobal(new TMLScriptGlobal(name, TMLScriptGlobal.TYPE_OBJECT, ref));
        }
       
       
    }
View Full Code Here

       
       
        // Register name against package or class name
       
        if (ref instanceof String) {
            context.getwgacore().getTmlscriptGlobalRegistry().registerDBGlobal(new TMLScriptGlobal(name, TMLScriptGlobal.TYPE_PACKAGE_OR_CLASS, ref), design._designContext.getDesignDB());
        }
        else {
            context.getwgacore().getTmlscriptGlobalRegistry().registerDBGlobal(new TMLScriptGlobal(name, TMLScriptGlobal.TYPE_OBJECT, ref), design._designContext.getDesignDB());
        }
       
       
    }
View Full Code Here

       
        private Map<String, TMLScriptGlobal> _tmlscriptGlobals = WGUtils.createSynchronizedMap();
       
        public boolean registerGlobal(TMLScriptGlobal scriptGlobal) {
            getLog().info("Registering TMLScript Global \"" + scriptGlobal.getName() + "\"");
            TMLScriptGlobal previousGlobal = _tmlscriptGlobals.get(scriptGlobal.getName());
            _tmlscriptGlobals.put(scriptGlobal.getName(), scriptGlobal);
            return true;
        }
View Full Code Here

        }
       
        public boolean registerDBGlobal(TMLScriptGlobal scriptGlobal, WGDatabase db) {
            getLog().info("Registering TMLScript DB Global \"" + scriptGlobal.getName() + "\" for database " + db.getDbReference());
            Map<String, TMLScriptGlobal> globals = (Map<String, TMLScriptGlobal>) db.getAttribute(WGACore.DBATTRIB_DBGlOBALS);
            TMLScriptGlobal previousGlobal = globals.get(scriptGlobal.getName());
            globals.put(scriptGlobal.getName(), scriptGlobal);
            return true;
        }
View Full Code Here

        }
       
        public TMLScriptGlobal getGlobal(String name,  WGDatabase db) {
           
            Map globals = (Map) db.getAttribute(WGACore.DBATTRIB_DBGlOBALS);
            TMLScriptGlobal global = (TMLScriptGlobal) globals.get(name);
            if (global != null) {
                return global;
            }
           
            return _tmlscriptGlobals.get(name);
View Full Code Here

                de.innovationgate.wga.common.beans.csconfig.v2.CSConfig v2 = (de.innovationgate.wga.common.beans.csconfig.v2.CSConfig) csConfig;
                Iterator shortcuts = v2.getShortcuts().iterator();
                while (shortcuts.hasNext()) {
                    Shortcut shortcut = (Shortcut) shortcuts.next();
                    if (shortcut.getType() == Shortcut.TYPE_TMLSCRIPT_GLOBAL) {
                        getTmlscriptGlobalRegistry().registerGlobal(new TMLScriptGlobal(shortcut.getShortcut(), TMLScriptGlobal.TYPE_PACKAGE_OR_CLASS, shortcut.getReference()));
                    }
                }
               
            }
           
View Full Code Here

TOP

Related Classes of de.innovationgate.wgpublisher.expressions.tmlscript.TMLScriptGlobal

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.