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

com.enonic.xp.security.EditableRole Maven / Gradle / Ivy

There is a newer version: 7.14.4
Show newest version
package com.enonic.xp.security;

import java.time.Instant;

import com.enonic.xp.annotation.PublicApi;

@PublicApi
public final class EditableRole
{
    public final Role source;

    public PrincipalKey key;

    public String displayName;

    public Instant modifiedTime;

    public String description;

    public EditableRole( final Role source )
    {
        this.source = source;
        this.displayName = source.getDisplayName();
        this.key = source.getKey();
        this.modifiedTime = source.getModifiedTime();
        this.description = source.getDescription();
    }

    public Role build()
    {
        return Role.create( this.source ).
            displayName( displayName ).
            key( key ).
            modifiedTime( modifiedTime ).
            description( description ).
            build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy