Package org.auraframework.service

Examples of org.auraframework.service.DefinitionService.find()


    private <T extends Definition> void populate(Map<DefDescriptor<?>, Map<String, String>> unused,
            Set<DefDescriptor<?>> used, Class<T> type) throws QuickFixException {

        DefinitionService definitionService = Aura.getDefinitionService();
        DefDescriptor<T> matcher = definitionService.getDefDescriptor("markup://*:*", type);
        Set<DefDescriptor<T>> descriptors = definitionService.find(matcher);

        for (DefDescriptor<T> desc : descriptors) {
            Map<String, String> values = Maps.newHashMap();
            values.put("name", desc.getDescriptorName());

View Full Code Here


    public CatalogModel() throws QuickFixException {
        DefinitionService definitionService = Aura.getDefinitionService();

        DefDescriptor<ComponentDef> matcher = definitionService.getDefDescriptor("markup://*:*", ComponentDef.class);
        Set<DefDescriptor<ComponentDef>> descriptors = definitionService.find(matcher);

        for (DefDescriptor<ComponentDef> desc : descriptors) {
            Map<String, String> values = Maps.newHashMap();
            values.put("name", desc.getDescriptorName());
            try {
View Full Code Here

            try {
                DefDescriptor<ComponentDef> matcher = definitionService.getDefDescriptor(
                        String.format("markup://%s:*", namespace), ComponentDef.class);

                Set<DefDescriptor<ComponentDef>> descriptors = definitionService.find(matcher);

                for (DefDescriptor<ComponentDef> descriptor : descriptors) {
                    if (descriptor.getDef().isAbstract()
                            || getBlacklistedComponents().contains(descriptor.getQualifiedName())) {
                        continue;
View Full Code Here

        String name = (String) Aura.getContextService().getCurrentContext().getCurrentComponent().getAttributes()
                .getValue("name");

        if (name != null && !name.isEmpty()) {
            Set<DefDescriptor<?>> descriptors = definitionService.find(new DescriptorFilter("markup://" + name));
            if (descriptors.size() > 0) {
                for (DefDescriptor<?> descriptor : descriptors) {

                    DefType type = descriptor.getDefType();
                    switch (type) {
View Full Code Here

    /**
     * @return all descriptors known by the Aura runtime
     */
    public static Set<DefDescriptor<?>> getAllKnownDescriptors() throws QuickFixException {
        DefinitionService definitionService = Aura.getDefinitionService();
        Set<DefDescriptor<?>> descriptors = definitionService.find(new DescriptorFilter("*://*:*"));
        Set<DefDescriptor<?>> includedDescriptors = new HashSet<DefDescriptor<?>>();

        // add bundle ones from RootDefinition elements
        Set<DefDescriptor<?>> bundlesDescriptors = new HashSet<DefDescriptor<?>>();
        for (DefDescriptor<?> descriptor : descriptors) {
View Full Code Here

    private Set<ComponentDef> getUiOutputComponents() throws Exception {
        DefinitionService definitionService = Aura.getDefinitionService();
        DefDescriptor<ComponentDef> matcher = definitionService.getDefDescriptor("markup://ui:output*",
                ComponentDef.class);
        Set<ComponentDef> ret = Sets.newHashSet();
        for (DefDescriptor<ComponentDef> def : definitionService.find(matcher)) {
            if (def.getName().startsWith("output")) {
                ret.add(def.getDef());
            }
        }
        return ret;
View Full Code Here

        DefinitionService definitionService = Aura.getDefinitionService();
        List<TreeNode> ret = Lists.newArrayList();

        Map<String, TreeNode> namespaceTreeNodes = Maps.newHashMap();
        DefDescriptor<E> matcher = definitionService.getDefDescriptor(String.format("%s://*%s*", prefix, sep), type);
        Set<DefDescriptor<E>> descriptors = definitionService.find(matcher);
        ConfigAdapter configAdapter = Aura.getConfigAdapter();
        for (DefDescriptor<E> desc : descriptors) {
            if (desc == null) {
                // Getting null here after commit 2037c31ddc81eae3edaf6ddd5bcfd0009fefe1bd. This causes a NPE and
                // breaks the left nav of the reference tab.
View Full Code Here

    public static void loadMetadataForComponents(Map<String, Map<String, Map<String, Map<String, String>>>> components)
            throws QuickFixException {
        DefinitionService definitionService = Aura.getDefinitionService();

        DefDescriptor<ComponentDef> matcher = definitionService.getDefDescriptor("markup://*:*", ComponentDef.class);
        Set<DefDescriptor<ComponentDef>> descriptors = definitionService.find(matcher);
        Map<String, Map<String, Map<String, String>>> component;
        Map<String, Map<String, String>> componentDetails;

        for (DefDescriptor<ComponentDef> descriptor : descriptors) {
            component = new TreeMap<String, Map<String, Map<String, String>>>();
View Full Code Here

        List<Node> ret = Lists.newArrayList();

        Map<String, Node> namespaceNodes = Maps.newHashMap();
        DefDescriptor<E> matcher = definitionService.getDefDescriptor(String.format("%s://*%s*", prefix, sep), type);
        Set<DefDescriptor<E>> descriptors = definitionService.find(matcher);
        for (DefDescriptor<E> desc : descriptors) {
            String namespace = desc.getNamespace();
            Node namespaceNode = namespaceNodes.get(desc.getNamespace());
            if (namespaceNode == null) {
                namespaceNode = new Node(namespace);
View Full Code Here

        String name = (String)Aura.getContextService().getCurrentContext().getCurrentComponent().getAttributes()
                .getValue("name");

        if (name != null && !name.isEmpty()) {
            Set<DefDescriptor<?>> descriptors = definitionService.find(new DescriptorFilter("markup://" + name, DefType.DOCUMENTATION.name()));
            if (descriptors.size() > 0) {
                for (DefDescriptor<?> descriptor : descriptors) {

                    DefType type = descriptor.getDefType();
                    switch (type) {
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.