Package org.directwebremoting.extend

Examples of org.directwebremoting.extend.Creator


                    String scriptName = entry.getKey();
                    CreatorConfig creatorConfig = entry.getValue();

                    if (creatorConfig.getCreator() != null)
                    {
                        Creator creator = creatorConfig.getCreator();
                        creatorManager.addCreator(creator);
                    }
                    else
                    {
                        String creatorName = creatorConfig.getCreatorType();
View Full Code Here


            Element include = (Element) nodes.item(i);

            String methodName = include.getAttribute(ATTRIBUTE_METHOD);

            // Try to find the method that we are annotating
            Creator creator = creatorManager.getCreator(javascript, true);
            Class<?> dest = creator.getType();

            Method method = null;
            for (Method test : dest.getMethods())
            {
                if (test.getName().equals(methodName))
View Full Code Here

            CreatorManager creatorManager = container.getBean(CreatorManager.class);
            Loggers.STARTUP.debug("CreatorManager");
            Loggers.STARTUP.debug("  Type: " + creatorManager.getClass().getName());
            for (String creatorName : creatorManager.getCreatorNames(false))
            {
                Creator creator = creatorManager.getCreator(creatorName, false);
                Loggers.STARTUP.debug("  Creator: " + creatorName + " = " + creator + " (" + creator.getClass().getName() + ")");
            }

            // ModuleManager debugging
            ModuleManager moduleManager = container.getBean(ModuleManager.class);
            Loggers.STARTUP.debug("ModuleManager");
View Full Code Here

        if (null == clazz)
        {
            // So we've failed to find a Java class name. We can also lookup by
            // Javascript name to help the situation where there is a dynamic proxy
            // in the way.
            Creator creator = creatorManager.getCreator(type, false);
            if (creator != null)
            {
                clazz = creator.getType();
            }
        }

        if (null != clazz)
        {
View Full Code Here

        {
            Loggers.STARTUP.error("Missing creator: " + typeName + " (while initializing creator for: " + params.get("javascript") + ".js)");
            return;
        }

        Creator creator = clazz.newInstance();

        LocalUtil.setParams(creator, params, ignore);
        creator.setProperties(params);

        // add the creator for the script name
        addCreator(creator);
    }
View Full Code Here

     * @see org.directwebremoting.CreatorManager#addCreator(java.lang.String, org.directwebremoting.Creator)
     */
    public void addCreator(Creator creator) throws IllegalArgumentException
    {
        // Check that we don't have this one already
        Creator other = creators.get(creator.getJavascript());
        if (other != null)
        {
            Loggers.STARTUP.error("Javascript name " + creator.getJavascript() + " is used by 2 classes (" + other.getType().getName() + " and " + creator + ")");
            throw new IllegalArgumentException("Duplicate name found. See logs for details.");
        }

        // Check that it can at least tell us what type of thing we will be getting
        try
View Full Code Here

        else
        {
            Collection<String> noHidden = new HashSet<String>();
            for (Map.Entry<String, Creator> entry : creators.entrySet())
            {
                Creator creator = entry.getValue();
                if (!creator.isHidden())
                {
                    noHidden.add(entry.getKey());
                }
            }
View Full Code Here

    /* (non-Javadoc)
     * @see org.directwebremoting.CreatorManager#getCreator(java.lang.String, boolean)
     */
    public Creator getCreator(String scriptName, boolean includeHidden) throws SecurityException
    {
        Creator creator = creators.get(scriptName);

        if (creator == null)
        {
            StringBuffer buffer = new StringBuffer("Names of known classes are: ");
            for (String key : creators.keySet())
            {
                buffer.append(key);
                buffer.append(' ');
            }

            log.error("Class not found: '" + scriptName + "'");
            log.warn(buffer.toString());
            throw new SecurityException("Class not found");
        }

        if (creator.isHidden() && !includeHidden)
        {
            log.warn("Attempt made to get hidden class with name: " + scriptName + " while includeHidden=false");
            throw new SecurityException("Class not found");
        }

View Full Code Here

TOP

Related Classes of org.directwebremoting.extend.Creator

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.