Class NewRole

java.lang.Object
ch.ivyteam.ivy.security.role.NewRole

public class NewRole extends Object

Holds information about a new role to create.

Example:


 import ch.ivyteam.ivy.security.role.NewRole;

 NewRole newRole = NewRole
     .create("Manager")
     .displayName("HR Manager")
     .description("The chief of the HR organization")
     .toNewRole();
 ivy.security.roles().create(newRole);
Since:
9.4
See Also:
API:
This is a public API.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Builder for NewRole
  • Method Summary

    Modifier and Type
    Method
    Description
    create(String name)
    Creates a new role builder with the given name.
  • Method Details

    • create

      public static NewRole.Builder create(String name)

      Creates a new role builder with the given name.

      Example:

      
       import ch.ivyteam.ivy.security.role.NewRole;
      
       NewRole newRole = NewRole
           .create("Manager")
           .displayName("HR Manager")
           .description("The chief of the HR organization")
           .toNewRole();
       ivy.security.roles().create(newRole);
      Parameters:
      name -
      Returns:
      builder
      API:
      This public API is available in IvyScript and Java. It has the visibility EXPERT.