Package org.richfaces.cdk.model

Examples of org.richfaces.cdk.model.Name


    }

    @Override
    public FacesId inferComponentType(ClassName componentClass) throws InvalidNameException {

        Name name = inferNameByClass(componentClass, null, null);

        return FacesId.parseId("org.richfaces.ui." + name.getSimpleName());
    }
View Full Code Here


        // check parameters.
        if (null == componentClass) {
            throw new IllegalArgumentException();
        }

        Name name = Name.create(componentClass.toString());

        processName(classifier, markup, name);
        return name;
    }
View Full Code Here

        // check parameters.
        if (null == type) {
            throw new IllegalArgumentException();
        }

        Name name = Name.create(type.toString());

        processName(classifier, markup, name);
        return name;
    }
View Full Code Here

        if (null == componentType) {
            throw new IllegalArgumentException();
        }

        // Infer UI class name from component type.
        Name name = inferBasicName(componentType);
        name.setSimpleName(UI + name.getSimpleName());

        return new ClassName(name.toString());
    }
View Full Code Here

    public ClassName inferTagHandlerClass(FacesId componentType, String markup) {
        if (null == componentType) {
            throw new IllegalArgumentException();
        }

        Name name = inferBasicName(componentType);
        name.setSimpleName(name.getSimpleName() + "Handler");

        return new ClassName(name.toString());
    }
View Full Code Here

    }

    private Name inferBasicName(FacesId componentType) {
        ComponentModel component = library.getComponentByType(componentType);
        String baseClassName = component.getBaseClass().getName();
        Name name = Name.create(baseClassName);

        name.setClassifier(null);
        name.setMarkup(null);

        String simpleName = name.getSimpleName();
        simpleName = simpleName.replaceFirst("^Abstract", "");

        name.setSimpleName(simpleName);

        return name;
    }
View Full Code Here

    @Override
    public String inferTagName(FacesId componentType) {
        if (null == componentType) {
            throw new IllegalArgumentException();
        }
        Name name = Name.create(componentType.toString());
        return Strings.firstToLowerCase(name.getSimpleName());
    }
View Full Code Here

        if (null == id) {
            throw new IllegalArgumentException();
        }

        // Infer UI class name from component type.
        Name name = Name.create(id.toString());

        name.setClassifier(Classifier.component);
        // All Behavior classes belongs to "component.behavior" package.
        name.setMarkup("behavior");

        return new ClassName(name.toString());
    }
View Full Code Here

        return new ClassName(name.toString());
    }

    @Override
    public FacesId inferBehaviorType(ClassName targetClass) {
        Name name = inferNameByClass(targetClass, Name.Classifier.component, "html");

        return new FacesId(name.toString());
    }
View Full Code Here

        }

        // Infer UI class name from component type.
        RendererModel renderer = library.getRendererByType(rendererType);
        String baseClassName = renderer.getBaseClass().getName();
        Name name = Name.create(baseClassName);

        name.setClassifier(null);
        name.setMarkup(null);

        String simpleName = name.getSimpleName();
        simpleName = simpleName.replaceFirst("Base$", "");

        name.setSimpleName(simpleName);

        return new ClassName(name.toString());
    }
View Full Code Here

TOP

Related Classes of org.richfaces.cdk.model.Name

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.