Package org.fao.geonet.repository

Examples of org.fao.geonet.repository.GroupRepository.findAll()


  public GroupMapper(ServiceContext context) throws Exception
  {

        final GroupRepository groupRepository = context.getBean(GroupRepository.class);

        for (Group record : groupRepository.findAll()) {
            String id = "" + record.getId();
            String name = record.getName();

            add(name, id);
        }
View Full Code Here


      Element elGroups = new Element(Geonet.Elem.GROUPS);
      List<Group> theGroups;
            List<UserGroup> userGroups;

            if (myProfile == Profile.Administrator && theProfile.equals(Profile.Administrator.name())) {
                theGroups = groupRepository.findAll();

                for (Group group : theGroups) {
                    final Element element = group.asXml();
                    element.addContent(new Element("profile").setText(Profile.Administrator.name()));
                    elGroups.addContent(element);
View Full Code Here

        loginAsAdmin(serviceContext);

        final User principal = serviceContext.getUserSession().getPrincipal();

        final GroupRepository bean = serviceContext.getBean(GroupRepository.class);
        Group group = bean.findAll().get(0);

        MetadataCategory category = serviceContext.getBean(MetadataCategoryRepository.class).findAll().get(0);

        final SourceRepository sourceRepository = serviceContext.getBean(SourceRepository.class);
        Source source = sourceRepository.save(new Source().setLocal(true).setName("GN").setUuid("sourceuuid"));
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.