Examples of deleteAllByIdAttribute()


Examples of org.fao.geonet.repository.OperationAllowedRepository.deleteAllByIdAttribute()

            //--- the administrator could change privileges and categories using the
      //--- web interface so we have to re-set both

            OperationAllowedRepository repository = context.getBean(OperationAllowedRepository.class);
            repository.deleteAllByIdAttribute(OperationAllowedId_.metadataId, Integer.parseInt(id));
            addPrivileges(id, params.getPrivileges(), localGroups, dataMan, context, log);

            metadata.getCategories().clear();
            addCategories(metadata, params.getCategories(), localCateg, context, log, null);
View Full Code Here

Examples of org.fao.geonet.repository.OperationAllowedRepository.deleteAllByIdAttribute()

                boolean index = false;
                String language = context.getLanguage();
                final Metadata metadata = dataMan.updateMetadata(context, id, md, validate, ufo, index, language, ri.changeDate, true);

                OperationAllowedRepository repository = context.getBean(OperationAllowedRepository.class);
        repository.deleteAllByIdAttribute(OperationAllowedId_.metadataId, Integer.parseInt(id));

                addPrivileges(id, params.getPrivileges(), localGroups, dataMan, context, log);

                metadata.getCategories().clear();
                addCategories(metadata, params.getCategories(), localCateg, context, log, null);
View Full Code Here

Examples of org.fao.geonet.repository.OperationAllowedRepository.deleteAllByIdAttribute()

        final Metadata metadata = dataMan.updateMetadata(context, id, xml, validate, ufo, index, language, changeDate,
                true);

        OperationAllowedRepository operationAllowedRepository = context.getBean(OperationAllowedRepository.class);
        operationAllowedRepository.deleteAllByIdAttribute(OperationAllowedId_.metadataId, Integer.parseInt(id));
        aligner.addPrivileges(id, params.getPrivileges(), localGroups, dataMan, context, log);

        metadata.getCategories().clear();
        aligner.addCategories(metadata, params.getCategories(), localCateg, context, log, null);
View Full Code Here

Examples of org.fao.geonet.repository.OperationAllowedRepository.deleteAllByIdAttribute()

                    date, false);

            //--- the administrator could change privileges and categories using the
      //--- web interface so we have to re-set both
            OperationAllowedRepository repository = context.getBean(OperationAllowedRepository.class);
            repository.deleteAllByIdAttribute(OperationAllowedId_.metadataId, Integer.parseInt(record.id));
            addPrivileges(record.id, params.getPrivileges(), localGroups, dataMan, context, log);

            metadata.getCategories().clear();
            addCategories(metadata, params.getCategories(), localCateg, context, log, null);
View Full Code Here

Examples of org.fao.geonet.repository.OperationAllowedRepository.deleteAllByIdAttribute()

                Importer.addCategoriesToMetadata(metadata, categs, context);
            }
        }
   
        OperationAllowedRepository repository = context.getBean(OperationAllowedRepository.class);
        repository.deleteAllByIdAttribute(OperationAllowedId_.metadataId, Integer.parseInt(id));
        if (((ArrayList<Group>)params.getGroupCopyPolicy()).size() == 0) {
            addPrivileges(id, params.getPrivileges(), localGroups, dataMan, context, log);
        } else {
            addPrivilegesFromGroupPolicy(id, info.getChild("privileges"));
        }
View Full Code Here

Examples of org.fao.geonet.repository.OperationAllowedRepository.deleteAllByIdAttribute()

        final Metadata metadata = dataMan.updateMetadata(context, id, xml, validate, ufo, index, language, changeDate,
                true);

        OperationAllowedRepository repository = context.getBean(OperationAllowedRepository.class);
        repository.deleteAllByIdAttribute(OperationAllowedId_.metadataId, Integer.parseInt(id));
        aligner.addPrivileges(id, params.getPrivileges(), localGroups, dataMan, context, log);

        metadata.getCategories().clear();
        aligner.addCategories(metadata, params.getCategories(), localCateg, context, log, null);
View Full Code Here

Examples of org.fao.geonet.repository.OperationAllowedRepository.deleteAllByIdAttribute()

        boolean index = false;
        String language = context.getLanguage();
                final Metadata metadata = dataMan.updateMetadata(context, id, md, validate, ufo, index, language, ri.changeDate, false);

                OperationAllowedRepository repository = context.getBean(OperationAllowedRepository.class);
                repository.deleteAllByIdAttribute(OperationAllowedId_.metadataId, Integer.parseInt(id));
                addPrivileges(id, params.getPrivileges(), localGroups, dataMan, context, log);

                metadata.getCategories().clear();
                addCategories(metadata, params.getCategories(), localCateg, context, log, null);
                dataMan.flush();
View Full Code Here

Examples of org.fao.geonet.repository.OperationAllowedRepository.deleteAllByIdAttribute()

        GroupRepository groupRepo = context.getBean(GroupRepository.class);

    Integer iId = Integer.valueOf(id);
        List<Integer> reindex = operationAllowedRepo.findAllIds(OperationAllowedSpecs.hasGroupId(iId), OperationAllowedId_.metadataId);

        operationAllowedRepo.deleteAllByIdAttribute(OperationAllowedId_.groupId, iId);
        userGroupRepo.deleteAllByIdAttribute(UserGroupId_.groupId, Arrays.asList(iId));
        groupRepo.delete(iId);
    //--- reindex affected metadata

    GeonetContext gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME);
View Full Code Here

Examples of org.fao.geonet.repository.OperationAllowedRepository.deleteAllByIdAttribute()

         int iId = Integer.parseInt(id);

         final MetadataRepository metadataRepository = context.getBean(MetadataRepository.class);
         Metadata metadata = metadataRepository.findOne(iId);
         OperationAllowedRepository repository = context.getBean(OperationAllowedRepository.class);
         repository.deleteAllByIdAttribute(OperationAllowedId_.metadataId, iId);
         addPrivileges(id, params.privileges, localGroups, dataMan, context, log);

         metadata.getCategories().clear();
         addCategories(metadata, params.categories, localCateg, context, log, null);
View Full Code Here

Examples of org.fao.geonet.repository.OperationAllowedRepository.deleteAllByIdAttribute()

        OperationAllowedRepository operationAllowedRepository = context.getBean(OperationAllowedRepository.class);
       
        if (skipAllIntranet) {
            operationAllowedRepository.deleteAllByMetadataIdExceptGroupId(Integer.valueOf(metadataId), ReservedGroup.intranet.getId());
        } else {
            operationAllowedRepository.deleteAllByIdAttribute(OperationAllowedId_.metadataId, Integer.valueOf(metadataId));
        }
    }

    //--------------------------------------------------------------------------
    //---
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.