Package com.salesforce.ide.core.model

Examples of com.salesforce.ide.core.model.Component


                    + "'");
        }

        projectPackage.setPackageRootResource(sourceFolder);
        if (addManifest) {
            Component packageManifest = getPackageManifestFactory().getPackageManifestComponent(project);
            if (packageManifest != null) {
                projectPackage.setPackageManifest(packageManifest);
                projectPackage.addComponent(packageManifest);
            } else {
                logger.error("Package manifest for package '" + packageName + "' is null");
View Full Code Here


        }

        projectPackageList.setProject(file.getProject());

        monitorCheck(monitor);
        Component component = getComponentFactory().getComponentFromFile(file, true);
        if (component == null) {
            logger.warn("File '" + file.getProjectRelativePath().toPortableString()
                    + "' not supported by copy refactoring");
            return projectPackageList;
        }

        boolean exists = projectPackageList.hasComponent(component);
        if (exists) {
            logger.warn("Project package list already contains component " + component.getFullDisplayName()
                    + " for file '" + file.getProjectRelativePath().toPortableString() + "'");
            return projectPackageList;
        }

        projectPackageList.addComponent(component, true);
View Full Code Here

                        .getClass());
        return root.getValue();
    }

    private Component getComponentBean(String id) {
        Component component = null;
        try {
            component = (Component) getBean(id);
        } catch (Exception e) {
            logger.warn("Unable to get component for id '" + id + "': " + e.getMessage());
            return null;
View Full Code Here

        if (Utils.isNotEmpty(projectPackage.getName()) && filePath.startsWith(projectPackage.getName() + "/")) {
            tmpFilePath = filePath.substring(filePath.indexOf("/") + 1);
        }

        // get object type specific instance of file and set file to new object
        Component component = getComponentByFilePath(tmpFilePath);

        return loadComponentProperties(projectPackage, component, filePath, file, fileMetadataHandler);
    }
View Full Code Here

            }
        }
    }

    public boolean hasAssociatedComponentTypes(String componentType) throws FactoryException {
        Component component = getComponentByComponentType(componentType);
        return Utils.isEmpty(component) ? false : component.hasAssociatedComponentTypes();
    }
View Full Code Here

        Component component = getComponentByComponentType(componentType);
        return Utils.isEmpty(component) ? false : component.hasAssociatedComponentTypes();
    }

    public List<String> getSubComponentTypes(String componentType) throws FactoryException {
        Component component = getComponentByComponentType(componentType);
        return Utils.isEmpty(component) ? null : component.getSubComponentTypes();
    }
View Full Code Here

        Component component = getComponentByComponentType(componentType);
        return Utils.isEmpty(component) ? null : component.getSubComponentTypes();
    }

    public boolean hasSubComponentTypesForComponentType(String componentType) throws FactoryException {
        Component component = getComponentByComponentType(componentType);
        return Utils.isEmpty(component) ? false : component.hasSubComponentTypes();
    }
View Full Code Here

    public List<String> getSubComponentTypes() {
        List<String> componentTypes = getRegisteredComponentTypes();
        List<String> childComponentTypes = new ArrayList<String>();

        if (Utils.isNotEmpty(componentTypes)) {
            Component component = null;
            for (String componentType : componentTypes) {
                try {
                    component = getComponentByComponentType(componentType);
                    if (component != null && component.hasSubComponentTypes()) {
                        childComponentTypes.addAll(component.getSubComponentTypes());
                    }
                } catch (FactoryException e) {
                    logger.error("Unable to get child components for component types '" + componentType + "'", e);
                }
            }
View Full Code Here

                projectPackageList.addComponents(componentList, false);
            } else if (isSubComponentFolder(resource)) {
                ComponentList componentList = getComponentsForSubComponentFolder((IFolder) resource, true);
                projectPackageList.addComponents(componentList, false);
            } else if (isManagedFile(resource)) { //if we're in a force.com project. "isManaged" is misleading.
                Component component = getComponentFactory().getComponentFromFile((IFile) resource);
                projectPackageList.addComponent(component, true);

                // add dependent or associated components such as folder metadata component if component is sub-folder component
                if (includeAssociated) {
                    ComponentList componentList = getComponentFactory().getAssociatedComponents(component);
                    if (Utils.isNotEmpty(componentList)) {
                        projectPackageList.addComponents(componentList, false);
                    }
                }
            }
        }
        //filter out any built in folder stuff.
        // if component subfolder is built-in subfolder, then this subfolder will be available in dest org (also this subfolder is not retrievable/deployable)
        // so no need to add subfolder component to deploy list. W-623512
        ComponentList allComponentsList = getComponentFactory().getComponentListInstance();
        allComponentsList.addAll(projectPackageList.getAllComponents());
        for (Component component : allComponentsList) {
            if (Utils.isNotEmpty(component.getBuiltInSubFolders())) {
                for (String builtInSubFolder : component.getBuiltInSubFolders()) {
                    if (builtInSubFolder.equals(component.getName())) {
                        projectPackageList.removeComponent(component);
                    }
                }
            }
        }
View Full Code Here

                logger.info("Did not find folder for type '" + componentType);
            }
            return null;
        }

        Component componentTypeInfo = getComponentFactory().getComponentByComponentType(componentType);
        IResource[] resources = componentFolder.members();
        for (IResource resource : resources) {
            String fullName = componentName;
            if (!componentName.contains(componentTypeInfo.getFileExtension())) {
                fullName = componentName + "." + componentTypeInfo.getFileExtension();
            }
            // because trigger and class may have the same name, so need to match the file extension as well
            if (resource.getType() == IResource.FILE && ((IFile) resource).getName().equalsIgnoreCase(fullName)) {
                if (logger.isInfoEnabled()) {
                    StringBuilder stringBuilder = new StringBuilder("File '");
View Full Code Here

TOP

Related Classes of com.salesforce.ide.core.model.Component

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.