Package de.innovationgate.wgpublisher.expressions.tmlscript.VarArgParser

Examples of de.innovationgate.wgpublisher.expressions.tmlscript.VarArgParser.Arguments


        return Design.db(cx, design, args, funObj);
    }
   
    public static String localLabel(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) throws JavaScriptException, WGException {
        TMLContext context = WGAGlobal.fetchInitialContext(cx);
        Arguments parsedArgs = _localLabelVarargs.parse(args);
        WGDatabase localDB = localDB(cx, thisObj, new Object[] {parsedArgs.get("currentObject")}, funObj);
        return context.label(localDB, (String) parsedArgs.get("container"), (String) parsedArgs.get("file"), (String) parsedArgs.get("key"), (List) parsedArgs.get("params"));

    }
View Full Code Here


   
    public static Object scoped(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) {
        try {
           
            Arguments varargs = _scopedVarargs.parse(args);
           
            String str = (String) varargs.get("value");
           
            TMLContext context = fetchInitialContext(cx);
            if (varargs.has("scope")) {
                String scope = (String) varargs.get("scope");
                return context.getScopedString(str, scope);
            }
            else {
                if (!context.iswebenvironment()) {
                    return str;
View Full Code Here

   
    }
   
    public static List<String> buildOptions(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) throws JavaScriptException, FormattingException, WGAPIException, IOException {
       
        Arguments parsedArgs = _buildOptionsVarargs.parse(args);
       
        Iterable<WGContent> contents = (Iterable<WGContent>) parsedArgs.get("contents");
        String titleExpr = (String) parsedArgs.get("title");
        TMLContext context = fetchInitialContext(cx);
        RhinoExpressionEngineImpl runtime = fetchRuntime(cx);
       
        List<String> options = new ArrayList<String>();
        if (parsedArgs.has("emptyTitle")) {
            options.add(String.valueOf(parsedArgs.get("emptyTitle")) + "|" + TMLForm.RELATION_NULLPLACE_HOLDER);
        }
       
        for (WGContent content : contents) {
            String title = content.getTitle();
            if (titleExpr != null) {
View Full Code Here

        return options;
       
    }
   
    public static Date dateOnly(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) throws JavaScriptException, FormattingException, WGAPIException, IOException {
        Arguments arguments = _singleDateParam.parse(args);
        Date date = (Date) arguments.get("date");
        return fetchInitialContext(cx).dateonly(date);
    }
View Full Code Here

        Date date = (Date) arguments.get("date");
        return fetchInitialContext(cx).dateonly(date);
    }
   
    public static Date timeOnly(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) throws JavaScriptException, FormattingException, WGAPIException, IOException {
        Arguments arguments = _singleDateParam.parse(args);
        Date date = (Date) arguments.get("date");
        return fetchInitialContext(cx).timeonly(date);
    }
View Full Code Here

        Date date = (Date) arguments.get("date");
        return fetchInitialContext(cx).timeonly(date);
    }
   
    public static Calendar createCalendar(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) throws JavaScriptException, FormattingException, WGAPIException, IOException {
        Arguments arguments = _singleDateParam.parse(args);
        Date date = (Date) arguments.get("date");
        return fetchInitialContext(cx).createcalendar(date);
    }
View Full Code Here

        Date date = (Date) arguments.get("date");
        return fetchInitialContext(cx).createcalendar(date);
    }
   
    public static Design design(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) throws JavaScriptException, FormattingException, IOException, WGException {
        Arguments arguments = _designVarargs.parse(args);
        return new Design(arguments.get("ref"));
    }
View Full Code Here

        return new Design(arguments.get("ref"));
    }
   
    public static Cookie createCookie(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) throws JavaScriptException, FormattingException, IOException, WGException {
       
        Arguments arguments = _createCookieVarargs.parse(args);
        return new Cookie((String) arguments.get("name"), (String) arguments.get("value"));
       
    }
View Full Code Here

   
    public static Object getGlobal(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) throws JavaScriptException, WGAPIException {

        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

    public static String label(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) throws JavaScriptException, WGAPIException {
       
        Design design = unwrapThisObj(thisObj);
        TMLContext context = WGAGlobal.fetchInitialContext(cx);
        Arguments parsedArgs = WGAGlobal._localLabelVarargs.parse(args);
       
        return context.label(design._designContext.getDesignDB(), (String) parsedArgs.get("container"), (String) parsedArgs.get("file"), (String) parsedArgs.get("key"), (List) parsedArgs.get("params"));
       
    }
View Full Code Here

TOP

Related Classes of de.innovationgate.wgpublisher.expressions.tmlscript.VarArgParser.Arguments

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.