All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.molgenis.data.security.auth.RoleFactory Maven / Gradle / Ivy

There is a newer version: 8.4.5
Show newest version
package org.molgenis.data.security.auth;

import org.molgenis.data.AbstractSystemEntityFactory;
import org.molgenis.data.populate.EntityPopulator;
import org.molgenis.security.core.model.RoleValue;
import org.springframework.stereotype.Component;

@Component
public class RoleFactory extends AbstractSystemEntityFactory {
  RoleFactory(RoleMetadata roleMetadata, EntityPopulator entityPopulator) {
    super(Role.class, roleMetadata, entityPopulator);
  }

  public Role create(RoleValue roleValue) {
    Role result = create();
    result.setName(roleValue.getName());
    result.setLabel(roleValue.getLabel());
    result.setDescription(roleValue.getDescription());
    return result;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy