001/*-
002 * #%L
003 * Smile CDR - CDR
004 * %%
005 * Copyright (C) 2016 - 2025 Smile CDR, Inc.
006 * %%
007 * All rights reserved.
008 * #L%
009 */
010package ca.cdr.api.security.permission;
011
012import ca.cdr.api.model.json.RoleJson;
013import jakarta.annotation.Nonnull;
014
015/**
016 * Persistence service for custom roles
017 */
018public interface ICustomRolePersistenceSvc {
019
020        /**
021         * Save role
022         *
023         * @param theRole the JSON representation of the role to save
024         * @return the saved CustomRoleEntity
025         */
026        RoleJson save(@Nonnull RoleJson theRole);
027
028        /**
029         * Return the JSON representation of the indicated custom role or null if no role with that name is persisted
030         *
031         * @param theRoleName the name of the custom role to return
032         * @return the JSON representation of the requested custom role
033         */
034        RoleJson fetchRole(@Nonnull String theRoleName);
035}