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

org.ligoj.app.iam.GroupOrg Maven / Gradle / Ivy

The newest version!
/*
 * Licensed under MIT (https://github.com/ligoj/ligoj/blob/master/LICENSE)
 */
package org.ligoj.app.iam;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;

import java.util.HashSet;
import java.util.Set;

/**
 * Organizational Group.
* "id" corresponds to the normalized "Distinguished Name".
* "name" corresponds to the real "Common Name", not normalized. */ @Getter @Setter public class GroupOrg extends ContainerOrg { /** * SID */ private static final long serialVersionUID = 1L; /** * Unique user members. Identifier (UID) is used. */ @JsonIgnore private Set members; /** * Unique group members. Identifier (normalized CN) is used. */ @JsonIgnore private Set subGroups; /** * All arguments constructor. * * @param dn "id" corresponds to the "Distinguished Name". * @param name "name" corresponds to the "Common Name". Will be saved in "name", and in "id" in is normalized * form. * @param members unique members. UID is used. */ public GroupOrg(final String dn, final String name, final Set members) { super(dn, name); setMembers(members); setSubGroups(new HashSet<>()); } @Override public boolean equals(final Object other) { return other instanceof GroupOrg org && getId().equals(org.getId()); } @Override public int hashCode() { return getId().hashCode(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy