Deletes aliases indicated by a filter.<p>

@param dbc the current database context
@param project the current project
@param filter the filter which describes which aliases to delete

@throws CmsException if something goes wrong
179145
public void deleteAliases(CmsDbContext dbc, CmsProject project, CmsAliasFilter filter) throws CmsException {

        I_CmsVfsDriver vfsDriver = getVfsDriver(dbc);
        vfsDriver.deleteAliases(dbc, project, filter);
    }
207967
public OperationFuture<List<LoadBalancerPool>> delete(LoadBalancerPoolFilter filter) {
        List<LoadBalancerPool> loadBalancerPoolList = findLazy(filter)
            .map(metadata -> LoadBalancerPool.refById(
                metadata.getId(),
                LoadBalancer.refById(
                    metadata.getLoadBalancerId(),
                    DataCenter.refById(metadata.getDataCenterId())
                )
            ))
            .collect(toList());

        return delete(loadBalancerPoolList);
    }
518130
public List<CmsRewriteAlias> getRewriteAliases(CmsDbContext dbc, CmsRewriteAliasFilter filter) throws CmsException {

        return getVfsDriver(dbc).readRewriteAliases(dbc, filter);
    }
628251
protected void moveResource(CmsDbContext dbc, CmsResource source, String destination) throws CmsException {

        List<CmsResource> resources = null;

        if (source.isFolder()) {
            if (!CmsResource.isFolder(destination)) {
                // ensure folder name end's with a /
                destination = destination.concat("/");
            }
            // collect all resources in the folder without checking permissions
            resources = m_driverManager.readChildResources(dbc, source, CmsResourceFilter.ALL, true, true, false);
        }

        // target permissions will be checked later
        m_driverManager.moveResource(dbc, source, destination, false);

        // make sure lock is set
        CmsResource destinationResource = m_driverManager.readResource(dbc, destination, CmsResourceFilter.ALL);
        try {
            // the destination must always get a new lock
            m_driverManager.lockResource(dbc, destinationResource, CmsLockType.EXCLUSIVE);
        } catch (Exception e) {
            // could happen with with shared locks on single files
            if (LOG.isWarnEnabled()) {
                LOG.warn(e);
            }
        }

        if (resources != null) {
            // now walk through all sub-resources in the folder
            for (int i = 0; i < resources.size(); i++) {
                CmsResource childResource = resources.get(i);
                String childDestination = destination.concat(childResource.getName());
                // recurse with child resource
                moveResource(dbc, childResource, childDestination);
            }
        }
        CmsProject currentProject = dbc.getRequestContext().getCurrentProject();
        if (!currentProject.isOnlineProject()) {
            List<CmsResource> movedResources = m_driverManager.readChildResources(
                dbc,
                destinationResource,
                CmsResourceFilter.ALL,
                true,
                true,
                false);
            movedResources.add(destinationResource);
            for (CmsResource res : movedResources) {
                m_driverManager.repairCategories(dbc, dbc.getRequestContext().getCurrentProject().getUuid(), res);
            }
        }
    }
917071
public void addFilter(String filter) {

        if (CmsStringUtil.isNotEmpty(filter)) {
            filter = filter.trim().toLowerCase();
            if (FILTERS.contains(filter)) {
                m_filters.add(filter);
            }
        }
    }
1341466
public CmsProject createTempfileProject(CmsDbContext dbc) throws CmsException {

        // read the needed groups from the cms
        CmsGroup projectUserGroup = readGroup(dbc, dbc.currentProject().getGroupId());
        CmsGroup projectManagerGroup = readGroup(dbc, dbc.currentProject().getManagerGroupId());

        CmsProject tempProject = getProjectDriver(dbc).createProject(
            dbc,
            new CmsUUID(),
            dbc.currentUser(),
            projectUserGroup,
            projectManagerGroup,
            I_CmsProjectDriver.TEMP_FILE_PROJECT_NAME,
            Messages.get().getBundle(dbc.getRequestContext().getLocale()).key(
                Messages.GUI_WORKPLACE_TEMPFILE_PROJECT_DESC_0),
            CmsProject.PROJECT_FLAG_HIDDEN,
            CmsProject.PROJECT_TYPE_NORMAL);
        getProjectDriver(dbc).createProjectResource(dbc, tempProject.getUuid(), "/");

        OpenCms.fireCmsEvent(
            new CmsEvent(
                I_CmsEventListener.EVENT_PROJECT_MODIFIED,
                Collections.<String, Object> singletonMap("project", tempProject)));

        return tempProject;
    }
988026
public int deleteProjectPermissionOfAnyUser(DbSession dbSession, long projectId, String permission) {
    return mapper(dbSession).deleteProjectPermissionOfAnyUser(projectId, permission);
  }
74295
@RequestMapping(value = "changeLog/fileFilter/{projectId}/{name}/delete", method = RequestMethod.DELETE)
    public Ack deleteChangeLogFileFilter(@PathVariable ID projectId, @PathVariable String name) {
        securityService.checkProjectFunction(projectId.get(), ProjectConfig.class);
        securityService.asAdmin(() ->
                        entityDataService.withData(
                                structureService.getProject(projectId),
                                SCMFileChangeFilters.class.getName(),
                                SCMFileChangeFilters.class,
                                (SCMFileChangeFilters filters) -> filters.remove(name)
                        )
        );
        return Ack.OK;
    }
1109750
void filterTree(String filter) {

        HierarchicalContainer container = (HierarchicalContainer)m_tree.getContainerDataSource();
        container.removeAllContainerFilters();
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(filter)) {
            final String lowerCaseFilter = filter.toLowerCase();
            container.addContainerFilter(new Filter() {

                private static final long serialVersionUID = 1L;

                public boolean appliesToProperty(Object propertyId) {

                    return true;
                }

                public boolean passesFilter(Object itemId, Item item) throws UnsupportedOperationException {

                    CmsCategory cat = (CmsCategory)itemId;

                    return cat.getPath().toLowerCase().contains(lowerCaseFilter)
                        || ((cat.getTitle() != null) && cat.getTitle().toLowerCase().contains(lowerCaseFilter));
                }
            });
        }
    }
600932
public void saveAliases(CmsUUID structureId, List<CmsAliasBean> aliasBeans) throws CmsException {

        CmsAliasManager aliasManager = OpenCms.getAliasManager();
        CmsObject cms = m_cms;
        List<CmsAlias> aliases = new ArrayList<CmsAlias>();
        for (CmsAliasBean aliasBean : aliasBeans) {
            CmsAlias alias = new CmsAlias(
                structureId,
                cms.getRequestContext().getSiteRoot(),
                aliasBean.getSitePath(),
                aliasBean.getMode());
            aliases.add(alias);
        }
        aliasManager.saveAliases(cms, structureId, aliases);
    }
1223212
public void clearCategoriesForResource(CmsObject cms, String resourcePath) throws CmsException {

        CmsRelationFilter filter = CmsRelationFilter.TARGETS;
        filter = filter.filterType(CmsRelationType.CATEGORY);
        cms.deleteRelationsFromResource(resourcePath, filter);
    }
634506
public List<CmsAlias> getAliasesForStructureId(CmsObject cms, CmsUUID structureId) throws CmsException {

        List<CmsAlias> aliases = m_securityManager.readAliasesById(cms.getRequestContext(), structureId);
        Collections.sort(aliases, new Comparator<CmsAlias>() {

            public int compare(CmsAlias first, CmsAlias second) {

                return first.getAliasPath().compareTo(second.getAliasPath());
            }
        });
        return aliases;
    }
1328908
public void addAlias(CmsDbContext dbc, CmsProject project, CmsAlias alias) throws CmsException {

        I_CmsVfsDriver vfsDriver = getVfsDriver(dbc);
        vfsDriver.insertAlias(dbc, project, alias);
    }
756310
public void deletePropertyDefinition(CmsDbContext dbc, String name) throws CmsException {

        CmsPropertyDefinition propertyDefinition = null;

        try {
            // first read and then delete the metadefinition.
            propertyDefinition = readPropertyDefinition(dbc, name);
            getVfsDriver(dbc).deletePropertyDefinition(dbc, propertyDefinition);
            getHistoryDriver(dbc).deletePropertyDefinition(dbc, propertyDefinition);
        } finally {

            // fire an event that a property of a resource has been deleted
            OpenCms.fireCmsEvent(
                new CmsEvent(
                    I_CmsEventListener.EVENT_PROPERTY_DEFINITION_MODIFIED,
                    Collections.<String, Object> singletonMap("propertyDefinition", propertyDefinition)));
        }
    }
611487
public void writePublishJob(CmsDbContext dbc, CmsPublishJobInfoBean publishJob) throws CmsException {

        getProjectDriver(dbc).writePublishJob(dbc, publishJob);
    }
589319
@RequestMapping(value = "branches/{branchId}/filters/{name}", method = RequestMethod.DELETE)
    public Ack deleteFilter(@PathVariable ID branchId, @PathVariable String name) {
        return buildFilterService.deleteFilter(branchId, name);
    }
561931
private void deleteResource(final String sitePath) {

        CmsRpcAction<Void> action = new CmsRpcAction<Void>() {

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#execute()
             */
            @Override
            public void execute() {

                CmsCoreProvider.getVfsService().deleteResource(sitePath, this);

            }

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object)
             */
            @Override
            protected void onResponse(Void result) {

                onAfterDeletion();
            }
        };
        action.execute();
    }