Package com.salesforce.ide.core.model

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


    public List<String> getParentTypesWithSubComponentTypes() {
        List<String> componentTypes = getRegisteredComponentTypes();
        List<String> parentComponentTypes = new ArrayList<String>();

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


            // upgrade analysis is a two phase process. if the first phase check, a xml validation against
            // current schema, passes, the second phase checks the local and remote checksum to determine difference.

            // if exist and has changed, store to be exposed in ui and later saved to project
            Component remoteComponent = remoteProjectPackageList.getComponentByFilePath(localComponent
                    .getMetadataFilePath());

            // phase 1 - validate xml against current schema
            MetadataValidationEventCollector metadataValidationEventCollector = new MetadataValidationEventCollector();
            MetadataExt metadataExt = null;
View Full Code Here

        return null;
    }

    public IFile getCompositeFileResource(IFile file) {
        // check is file is a component and is a metadata composite, if so add composite
        Component component = null;
        try {
            component = getComponentFactory().getComponentFromFile(file, true);
        } catch (FactoryException e) {
            logger.warn("Unable to detemine if file '" + file.getName() + "' is a component");
            return null;
        }

        if (component.isPackageManifest() || !component.isMetadataComposite()) {
            return null;
        }

        // load component composite
        String compositeComponentFilePath = component.getCompositeMetadataFilePath();
        if (Utils.isEmpty(compositeComponentFilePath)) {
            logger.warn("Component metadata path is null for " + component.getFullDisplayName());
            return null;
        }
        return getComponentFileForFilePath(file.getProject(), compositeComponentFilePath);
    }
View Full Code Here

        return componentFolders;
    }

    public IFolder getComponentFolderByComponentType(IProject project, String componentType) throws CoreException,
            FactoryException {
        Component component = getComponentFactory().getComponentByComponentType(componentType);
        if (component == null) {
            logger.warn("Unable to find component for type '" + componentType + "'");
            return null;
        }
        return getComponentFolderByName(project, component.getDefaultFolder(), false, new NullProgressMonitor());
    }
View Full Code Here

                componentList.addAll(tmpComponentList);

            } else if (IResource.FILE == componentFolderResource.getType()) {
                IFile componentFile = (IFile) componentFolderResource;
                try {
                    Component tmpComponent = getComponentFactory().getComponentFromFile(componentFile, includeBody);
                    componentList.add(tmpComponent, false, true);
                    if (logger.isDebugEnabled()) {
                        logger.debug("Added component '"
                                + componentFolderResource.getProjectRelativePath().toPortableString() + "' to list");
                    }
View Full Code Here

        ComponentList componentList = getComponentsForComponentFolder(folder, traverse, true);
        if (componentList == null) {
            componentList = getComponentFactory().getComponentListInstance();
        }

        Component component = getComponentFactory().getComponentFromSubFolder(folder, false);
        componentList.add(component);
        return componentList;
    }
View Full Code Here

                logger.info("Filepath not found for file '" + file + "'");
            }
            return false;
        }

        Component component = null;
        try {
            component = getComponentFactory().getComponentByFilePath(file.getProjectRelativePath().toPortableString());
        } catch (FactoryException e) {
            logger.warn("Unable to get component for file '" + file.getProjectRelativePath().toPortableString() + "': "
                    + e.getMessage());
View Full Code Here

            }
            return false;
        }

        String folderName = folder.getName();
        Component component = null;
        try {
            component = getComponentFactory().getComponentByFolderName(folderName);
        } catch (FactoryException e) {
            logger.warn("Unable to get component for folder name '" + folderName + "'", e);
            return false;
View Full Code Here

        return resource.getProject();
    }

    public void setResourceAttributes(IFile file) {
        try {
            Component component = getComponentFactory().getComponentFromFile(file, false);
            if (component.isInstalled()) {
                ResourceAttributes resourceAttributes = new ResourceAttributes();
                resourceAttributes.setReadOnly(true);
            }
        } catch (Exception e) {
            logger.error("Unable to set read-only access son file " + file.getName(), e);
View Full Code Here

            if (selectedDeploymentComponent == null || deploymentPayload == null) {
                return;
            }

            // select associated/dependent components too
            Component component = selectedDeploymentComponent.getComponent();
            if (component != null && component.isWithinFolder()) {
                if (!event.getChecked()
                        && selectedDeploymentComponent.getDestinationSummary().equals(DeploymentSummary.DELETED)) {
                    handleUnCheckedSubFolderComponent(selectedDeploymentComponent);
                } else if (event.getChecked()
                        && selectedDeploymentComponent.getDestinationSummary().equals(DeploymentSummary.NEW)) {
                    handleCheckedSubFolderComponent(selectedDeploymentComponent);
                }
            } else if (component != null && Constants.FOLDER.equals(component.getComponentType())) {
                if (!event.getChecked()) {
                    if (selectedDeploymentComponent.getDestinationSummary().equals(DeploymentSummary.NEW)) {
                        handleUncheckedFolderComponent(selectedDeploymentComponent);
                    }
                } else if (event.getChecked()
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.